improve suggest answers (and fix some other issues)

This commit is contained in:
Ross
2025-01-20 09:54:56 +00:00
parent 9cb83b62d2
commit 0ca17c23b5
10 changed files with 114 additions and 21 deletions
-18
View File
@@ -568,24 +568,6 @@ class SeriesImage(SeriesImageBase):
help_text="Reference to the object that has replaced this one.",
)
def get_file_size(self):
try:
return self.image.size
# We catch this for when the image does not exist
except FileNotFoundError:
return 0
def get_dicom_data(self):
try:
with pydicom.dcmread(self.image) as d:
return d
except InvalidDicomError:
return {}
def get_series(self):
return self.series
# def get_image_dicom_json(self, image_index):
# try:
# with pydicom.dcmread(self.image) as ds: