add split by image type to series

This commit is contained in:
Ross
2023-12-18 12:54:13 +00:00
parent 2cfc52ee23
commit a0ed2aa499
2 changed files with 6 additions and 1 deletions
+3
View File
@@ -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(",")])