From a0ed2aa4998001ab4480998e8aa42d28b40343a1 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 18 Dec 2023 12:54:13 +0000 Subject: [PATCH] add split by image type to series --- atlas/api.py | 3 +++ atlas/templates/atlas/series_viewer.html | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/atlas/api.py b/atlas/api.py index d5e0989a..97b44a72 100644 --- a/atlas/api.py +++ b/atlas/api.py @@ -266,6 +266,9 @@ def view_dicom_tags(request, hash: str): def series_split_by_tag(request, series_id: int, dicom_tag:str): series = get_object_or_404(Series, pk=series_id) + if not series.check_user_can_edit(request.user): + return {"status": "permission denied"} + if dicom_tag.startswith("(") and dicom_tag.endswith(")"): dicom_tag = tuple([hex(int(i.strip(),16)) for i in dicom_tag[1:-1].split(",")]) diff --git a/atlas/templates/atlas/series_viewer.html b/atlas/templates/atlas/series_viewer.html index b6d7c31b..1b37fc8e 100755 --- a/atlas/templates/atlas/series_viewer.html +++ b/atlas/templates/atlas/series_viewer.html @@ -84,7 +84,9 @@ Order dicoms by SeriesInstanceUID Order by uploaded filename + title="orders dicom by uploaded filename">Order by uploaded filename
+ Split the series by the ImageType dicom tag