Image Action Set
Loading DICOM Attributes Along with DICOM Images
This example is not available for the CAS programming language.
Loading DICOM Attributes Along with DICOM Images
This example is not available for the Lua programming language.
Loading DICOM Attributes Along with DICOM Images
This section contains Python code. For more information about coding in Python, see Getting Started with SAS Viya for Python and SAS Viya: System Programming Guide.
The following statements load certain DICOM attributes, along with the DICOM series and other metadata in a directory tree whose root is MyDICOMDirectory in the CAS library dlib:
medical = s.CASTable(name='medical', replace=True)
r = s.image.loadImages(
path = 'MyDICOMDirectory',
caslib='dlib',
casOut=medical,
addColumns=dict(
general={"WIDTH", "HEIGHT", "DEPTH"},
dicomAttributes=dict(
tags={'0010,0010', '0010,1010'},
keywords={'PatientSex', 'PatientBirthDate'})),
series=dict(dicom=True),
recurse=True)
The output table will have columns named _0010_0010_, _0010_1010_, _PatientSex_, and _PatientBirthDate_ that contain string representations of the DICOM attributes that correspond to those tags or keywords.
Loading DICOM Attributes Along with DICOM Images
This example is not available for the R programming language.