.
This commit is contained in:
+2
-2
@@ -24,7 +24,7 @@ from sortedm2m.fields import SortedManyToManyField
|
||||
|
||||
import string
|
||||
from collections import defaultdict
|
||||
from helpers.images import image_as_base64
|
||||
from helpers.images import image_as_base64, pretty_print_dicom
|
||||
|
||||
from anatomy.models import Modality
|
||||
|
||||
@@ -317,7 +317,7 @@ class LongSeriesImage(models.Model):
|
||||
|
||||
def get_dicom_info(self):
|
||||
try:
|
||||
info = pydicom.read_file(self.image).to_json()
|
||||
info = pretty_print_dicom(pydicom.read_file(self.image))
|
||||
except pydicom.errors.InvalidDicomError:
|
||||
info = "File is not a dicom."
|
||||
return(info)
|
||||
|
||||
Reference in New Issue
Block a user