diff --git a/atlas/models.py b/atlas/models.py index 3dcb8b04..534bb7d1 100644 --- a/atlas/models.py +++ b/atlas/models.py @@ -1470,7 +1470,7 @@ class UncategorisedDicom(models.Model): def get_basic_dicom_tags(self, dataset=None): try: if dataset is None: - dataset = pydicom.read_file(self.image) + dataset = pydicom.dcmread(self.image) to_include = ( "StudyDescription", "Modality", diff --git a/generic/models.py b/generic/models.py index 8e33c59f..a29298ca 100644 --- a/generic/models.py +++ b/generic/models.py @@ -316,14 +316,14 @@ class SeriesImageBase(models.Model): def get_dicom_json(self): try: - json = pydicom.read_file(self.image).to_json() + json = pydicom.dcmread(self.image).to_json() except pydicom.errors.InvalidDicomError: return {} return json def get_dicom_info(self): try: - info = pretty_print_dicom(pydicom.read_file(self.image)) + info = pretty_print_dicom(pydicom.dcmread(self.image)) except pydicom.errors.InvalidDicomError: info = "File is not a dicom." return info diff --git a/helpers/pydicom_PIL.py b/helpers/pydicom_PIL.py index fe3a38fd..7cec5855 100644 --- a/helpers/pydicom_PIL.py +++ b/helpers/pydicom_PIL.py @@ -4,7 +4,7 @@ Usage: >>> import pydicom >>> from pydicom.contrib.pydicom_PIL import show_PIL ->>> ds = pydicom.read_file("filename") +>>> ds = pydicom.dcmread("filename") >>> show_PIL(ds) Requires Numpy: http://numpy.scipy.org/