Heesung Yang
Linux command - dcmdump / dicom file dump
- DCMTK version: 3.6.5
- Sample dicom file name :
sample.dcm
Print all tags
~$ dcmdump sample.dcm
# Dicom-File-Format
# Dicom-Meta-Information-Header
# Used TransferSyntax: Little Endian Explicit
(0002,0000) UL 216 # 4, 1 FileMetaInformationGroupLength
(0002,0001) OB 00\01 # 2, 1 FileMetaInformationVersion
(0002,0002) UI =BreastTomosynthesisImageStorage # 30, 1 MediaStorageSOPClassUID
(0002,0003) UI [1.2.840.113845.13.6533.1581875921.128629056237121] # 50, 1 MediaStorageSOPInstanceUID
(0002,0010) UI =JPEGLossless:Non-hierarchical-1stOrderPrediction # 22, 1 TransferSyntaxUID
(0002,0012) UI [1.2.276.0.7230010.3.0.3.6.5] # 28, 1 ImplementationClassUID
(0002,0013) SH [OFFIS_DCMTK_365] # 16, 1 ImplementationVersionName
...
...
Print specific tags
~$ dcmdump +P 0028,0002 +P 0028,0004 sample.dcm
(0028,0002) US 1 # 2, 1 SamplesPerPixel
(0028,0004) CS [MONOCHROME2] # 12, 1 PhotometricInterpretation
Print hierarchical structure as a simple tree
~$ dcmdump +T sample.dcm
...
...
AcquisitionContextSequence
EntranceDoseInmGy [2.7495]
GenericGroupLength 114
ViewCodeSequence
| Item
| | GenericGroupLength 58
| | CodeValue [R-10226]
| | CodingSchemeDesignator [SRT]
| | CodeMeaning [medio-lateral oblique]
| | GenericGroupLength 12
| | ViewModifierCodeSequence
GenericGroupLength 74
...
...
Prepend sequence hierarchy
- Should be used with
+P
option
~$ dcmdump --prepend +P 0008,0100 ${FILE}
(0018,9506).(0040,0260).(0008,0100) SH [FCR2310-0000] # 12, 1 CodeValue
(0040,0260).(0008,0100) SH [FCR2310-0000] # 12, 1 CodeValue
(0054,0220).(0008,0100) SH [R-10226] # 8, 1 CodeValue
(5200,9229).(0008,9124).(0008,9215).(0008,0100) SH [113074] # 6, 1 CodeValue
(5200,9229).(0020,9071).(0008,2218).(0008,0100) SH [T-04000] # 8, 1 CodeValue
Print with filename
~$ dcmdump +F +P 0028,0004 *.dcm
# dcmdump (1/4): LCC.dcm
(0028,0004) CS [MONOCHROME2] # 12, 1 PhotometricInterpretation
# dcmdump (2/4): LMLO.dcm
(0028,0004) CS [MONOCHROME2] # 12, 1 PhotometricInterpretation
# dcmdump (3/4): RCC.dcm
(0028,0004) CS [MONOCHROME2] # 12, 1 PhotometricInterpretation
# dcmdump (4/4): RMLO.dcm
(0028,0004) CS [MONOCHROME2] # 12, 1 PhotometricInterpretation
Don’t map well-known UID numbers to names
-
default
~$ dcmdump +P 0002,0002 LCC.dcm
(0002,0002) UI =DigitalMammographyXRayImageStorageForPresentation # 28, 1 MediaStorageSOPClassUID
-
do not map
~$ dcmdump -Un +P 0002,0002 LCC.dcm
(0002,0002) UI [1.2.840.10008.5.1.4.1.1.1.2] # 28, 1 MediaStorageSOPClassUID
Colorize
~$ dcmdump +C ${FILE}
Previous post
Git Branch CheatsheetNext post
How to secure nginx docker container