.
This commit is contained in:
+15
-14
@@ -939,20 +939,6 @@ class UncategorisedDicom(models.Model):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def get_basic_dicom_tags(self):
|
def get_basic_dicom_tags(self):
|
||||||
to_include = (
|
|
||||||
"StudyDescription",
|
|
||||||
"Modality",
|
|
||||||
"ProtocolName",
|
|
||||||
"SeriesDescription",
|
|
||||||
"SeriesInstanceUID",
|
|
||||||
"BodyPartExamined",
|
|
||||||
"SliceThickness",
|
|
||||||
)
|
|
||||||
tags = {}
|
|
||||||
for i in to_include:
|
|
||||||
tags[i] = "12345"
|
|
||||||
|
|
||||||
return tags
|
|
||||||
try:
|
try:
|
||||||
with pydicom.read_file(self.image) as ds:
|
with pydicom.read_file(self.image) as ds:
|
||||||
to_include = (
|
to_include = (
|
||||||
@@ -977,6 +963,21 @@ class UncategorisedDicom(models.Model):
|
|||||||
except pydicom.errors.InvalidDicomError:
|
except pydicom.errors.InvalidDicomError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
to_include = (
|
||||||
|
"StudyDescription",
|
||||||
|
"Modality",
|
||||||
|
"ProtocolName",
|
||||||
|
"SeriesDescription",
|
||||||
|
"SeriesInstanceUID",
|
||||||
|
"BodyPartExamined",
|
||||||
|
"SliceThickness",
|
||||||
|
)
|
||||||
|
tags = {}
|
||||||
|
for i in to_include:
|
||||||
|
tags[i] = "12345"
|
||||||
|
|
||||||
|
return tags
|
||||||
|
|
||||||
|
|
||||||
class DuplicateDicom(Exception):
|
class DuplicateDicom(Exception):
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user