Skip to content

Instantly share code, notes, and snippets.

@OmarAlkousa
Created December 31, 2022 15:25
Show Gist options
  • Save OmarAlkousa/03ce85834bdfbb0e65bda9a7989f5e3d to your computer and use it in GitHub Desktop.
Save OmarAlkousa/03ce85834bdfbb0e65bda9a7989f5e3d to your computer and use it in GitHub Desktop.
These GitHub gists are meant to explain the output of the .elements() method of DataSet class from PyDicom Package. This is a follow-up gist for the previous gist in the following link https://gist.github.com/OmarAlkousa/53b35934cd3fac3d381f0448b8e27073. You can see the DICOM dataset on Kaggle following the link: https://www.kaggle.com/datasets/…
# Extract the top-level elements of the Dataset Class
[*dcm_data.elements()]
[(0008, 0005) Specific Character Set CS: 'ISO_IR 100',
(0008, 0008) Image Type CS: ['ORIGINAL', 'PRIMARY', 'AXIAL', 'CT_SOM5 SPI'],
(0008, 0016) SOP Class UID UI: CT Image Storage,
(0008, 0018) SOP Instance UID UI: 1.3.6.1.4.1.14519.5.2.1.7085.2626.214140401149739061368142942055,
(0008, 0020) Study Date DA: '20100227',
(0008, 0021) Series Date DA: '20100227',
(0008, 0022) Acquisition Date DA: '20100227',
(0008, 0023) Content Date DA: '20100227',
(0008, 0030) Study Time TM: '161937.171',
(0008, 0031) Series Time TM: '162536.14',
(0008, 0032) Acquisition Time TM: '162203.028699',
(0008, 0033) Content Time TM: '162203.028699',
(0008, 0050) Accession Number SH: '1598252606449858',
(0008, 0060) Modality CS: 'CT',
(0008, 0070) Manufacturer LO: 'SIEMENS',
(0008, 0090) Referring Physician's Name PN: '',
(0008, 1030) Study Description LO: 'CT CHEST W IV CONTRAST',
(0008, 103e) Series Description LO: 'LUNG 3.0 B70f',
(0008, 1090) Manufacturer's Model Name LO: 'Sensation 16',
<Sequence, length 1>,
<Sequence, length 1>,
<Sequence, length 1>,
(0009, 0010) Private Creator LO: 'SIEMENS CT VA1 DUMMY',
(0010, 0010) Patient's Name PN: 'C3N-00247',
(0010, 0020) Patient ID LO: 'C3N-00247',
(0010, 0030) Patient's Birth Date DA: '',
(0010, 0040) Patient's Sex CS: 'F',
(0010, 1010) Patient's Age AS: '077Y',
(0010, 2160) Ethnic Group SH: '8',
(0012, 0050) Clinical Trial Time Point ID LO: '97',
(0012, 0051) Clinical Trial Time Point Descripti ST: 'Days offset from diagnosis',
(0012, 0062) Patient Identity Removed CS: 'YES',
(0012, 0063) De-identification Method LO: 'Per DICOM PS 3.15 AnnexE. Details in 0012,0064',
<Sequence, length 8>,
(0013, 0010) Private Creator LO: 'CTP',
(0013, 1010) Private tag data LO: 'CPTAC-LSCC',
(0013, 1013) Private tag data LO: '70852626',
(0018, 0015) Body Part Examined CS: 'CHEST',
(0018, 0050) Slice Thickness DS: '3.0',
(0018, 0060) KVP DS: '100.0',
(0018, 0090) Data Collection Diameter DS: '500.0',
(0018, 1020) Software Versions LO: 'syngo CT 2014A',
(0018, 1030) Protocol Name LO: 'CHEST_ROUTINE_SMALL',
(0018, 1100) Reconstruction Diameter DS: '289.0',
(0018, 1110) Distance Source to Detector DS: '1040.0',
(0018, 1111) Distance Source to Patient DS: '570.0',
(0018, 1120) Gantry/Detector Tilt DS: '0.0',
(0018, 1130) Table Height DS: '137.0',
(0018, 1140) Rotation Direction CS: 'CW',
(0018, 1150) Exposure Time IS: '500',
(0018, 1151) X-Ray Tube Current IS: '237',
(0018, 1152) Exposure IS: '131',
(0018, 1160) Filter Type SH: '0',
(0018, 1170) Generator Power IS: '35',
(0018, 1190) Focal Spot(s) DS: '1.2',
(0018, 1200) Date of Last Calibration DA: '20100227',
(0018, 1201) Time of Last Calibration TM: '061404',
(0018, 1210) Convolution Kernel SH: 'B70f',
(0018, 5100) Patient Position CS: 'HFS',
(0018, 9306) Single Collimation Width FD: 1.5,
(0018, 9307) Total Collimation Width FD: 24.0,
(0018, 9309) Table Speed FD: 43.0,
(0018, 9310) Table Feed per Rotation FD: 21.6,
(0018, 9311) Spiral Pitch Factor FD: 0.9,
(0018, 9323) Exposure Modulation Type CS: 'XYZ_EC',
(0018, 9324) Estimated Dose Saving FD: 29.4,
(0018, 9345) CTDIvol FD: 5.924999999999999,
(0019, 0010) Private Creator LO: 'SIEMENS CT VA0 COAD',
(0019, 10b0) [Feed per Rotation] DS: '21.6',
(0020, 000d) Study Instance UID UI: 1.3.6.1.4.1.14519.5.2.1.7085.2626.258626612405225511766549337110,
(0020, 000e) Series Instance UID UI: 1.3.6.1.4.1.14519.5.2.1.7085.2626.242193282649561899185427104083,
(0020, 0010) Study ID SH: '',
(0020, 0011) Series Number IS: '2',
(0020, 0012) Acquisition Number IS: '2',
(0020, 0013) Instance Number IS: '75',
(0020, 0032) Image Position (Patient) DS: [-143.2177734375, -287.2177734375, -216],
(0020, 0037) Image Orientation (Patient) DS: [1, 0, 0, 0, 1, 0],
(0020, 0052) Frame of Reference UID UI: 1.3.6.1.4.1.14519.5.2.1.7085.2626.118309119521421997707953128381,
(0020, 1040) Position Reference Indicator LO: '',
(0020, 1041) Slice Location DS: '-216.0',
(0020, 4000) Image Comments LT: '\nPOST CONTRAST',
(0021, 0010) Private Creator LO: 'SIEMENS MED',
(0021, 1011) [Target] DS: [1, -6],
(0028, 0002) Samples per Pixel US: 1,
(0028, 0004) Photometric Interpretation CS: 'MONOCHROME2',
(0028, 0010) Rows US: 512,
(0028, 0011) Columns US: 512,
(0028, 0030) Pixel Spacing DS: [0.564453125, 0.564453125],
(0028, 0100) Bits Allocated US: 16,
(0028, 0101) Bits Stored US: 12,
(0028, 0102) High Bit US: 11,
(0028, 0103) Pixel Representation US: 0,
(0028, 0106) Smallest Image Pixel Value US: 0,
(0028, 0107) Largest Image Pixel Value US: 4095,
(0028, 0303) Longitudinal Temporal Information M CS: 'MODIFIED',
(0028, 1050) Window Center DS: [-500, 40],
(0028, 1051) Window Width DS: [1500, 400],
(0028, 1052) Rescale Intercept DS: '-1024.0',
(0028, 1053) Rescale Slope DS: '1.0',
(0028, 1055) Window Center & Width Explanation LO: ['WINDOW1', 'WINDOW2'],
(0029, 0010) Private Creator LO: 'SIEMENS CSA HEADER',
(0029, 0011) Private Creator LO: 'SIEMENS MEDCOM HEADER',
(0029, 0012) Private Creator LO: 'MITRA PRESENTATION 1.0',
(0031, 0010) Private Creator LO: 'AGFA PACS Archive Mirroring 1.0',
(0032, 000a) Study Status ID CS: 'READ',
(0032, 000c) Study Priority ID CS: 'LOW',
(0032, 1030) Reason for Study LO: 'Malignant neoplasm of lower lobe, right bronchus or lung, RLL bi',
(0032, 1060) Requested Procedure Description LO: 'CT CHEST W IV CONTRAST',
(0032, 4000) Study Comments LT: '',
(0033, 0010) Private Creator LO: 'MITRA OBJECT UTF8 ATTRIBUTES 1.0',
(0040, 0244) Performed Procedure Step Start Date DA: '20100227',
(0040, 0245) Performed Procedure Step Start Time TM: '161937.171',
(7fe0, 0010) Pixel Data OW: Array of 524288 elements]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment