GDCMINFO(1)
π GDCMINFO(1) π
okay bestie, welcome to the gdcminfo page from the DICOM Manipulation manual β it's literally here to spill the meta tea about your DICOM files, no cap. π«Άβ¨
πΈ NAME πΈ
gdcminfo β Display meta info about the input DICOM file.
π¦ SYNOPSIS π¦
gdcminfo [options] [file-in/dir-in...]
π DESCRIPTION π
The gdcminfo command line program takes as input a DICOM file, or a directory, and processes it to extract meta-information about the DICOM file(s) processed. she's a whole detective for your DICOM metadata, fr fr. ππ
π PARAMETERS π
file-in/dir-inβ DICOM input filename/dirname
β¨ OPTIONS β¨
π specific options
-r,--recursiveβ recursive traversal of an input directory-d,--check-deflatedβ check if file is proper deflated syntax.--resources-pathβ Resources path.--md5sumβ Compute md5sum of Pixel Data attribute value.--check-compressionβ check the encapsulated stream compression (lossless/lossy).--force-rescaleβ force rescale.--force-spacingβ force spacing.--mosaicβ dump image information of MOSAIC.
π¦ general options
-h,--helpβ print this help text and exit-v,--versionβ print version information and exit-V,--verboseβ verbose mode (warning+error).-W,--warningβ warning mode, print warning information-E,--errorβ error mode, print error information-D,--debugβ debug mode, print debug information
π§ environment variable
GDCM_RESOURCES_PATHβ path pointing to resources files (Part3.xml, ...)
πΈ SIMPLE USAGE πΈ
π gdcmData
Using data from gdcmData:
$ gdcminfo gdcmData/012345.002.050.dcm
MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage]
NumberOfDimensions: 2
Dimensions: (256,256)
Origin: (-85,21.6,108.7)
Spacing: (0.664062,0.664062,1.5)
DirectionCosines: (1,0,0,0,0,-1)
Rescale Intercept/Slope: (0,1)
SamplesPerPixel :1
BitsAllocated :16
BitsStored :16
HighBit :15
PixelRepresentation:1
Orientation Label: CORONAL
π¦ Davie Clunie datasets
Using data from David Clunie datasets:
$ gdcminfo BRTUM001.dcm
MediaStorage is 1.2.840.10008.5.1.4.1.1.4.1 [Enhanced MR Image Storage]
NumberOfDimensions: 3
Dimensions: (256,256,15)
Origin: (40,-105,105)
Spacing: (0.820312,0.820312,6)
DirectionCosines: (0,1,0,0,0,-1)
Rescale Intercept/Slope: (0,1)
SamplesPerPixel :1
BitsAllocated :16
BitsStored :16
HighBit :15
PixelRepresentation:1
Orientation Label: SAGITTAL
π Checking the md5sum of the Pixel Data
After compressing a DICOM file (see gdcmconv) using a lossless compression algorithm, it is fairly easy to compare the two files for differences at DICOM attribute level. However one operation is slightly easier to do: how to make sure the compression was actually lossless? In this case one could use the --md5sum operation. iconic little move, honestly. π
Take an uncompressed DICOM image file:
$ gdcminfo --md5sum SIEMENS_ImageLocationUN.dcm
The tool return: 0621954acd5815e0b4f7b65fcc6506b1
Now compress this file:
$ gdcmconv --jpegls SIEMENS_ImageLocationUN.dcm lossless_compressed.dcm
and then check again the md5sum:
$ gdcminfo --md5sum lossless_compressed.dcm
The tool return: 0621954acd5815e0b4f7b65fcc6506b1
π₯ Checking if Pixel Data is lossless
In some environment one wish to check whether or not the DICOM file is lossless. It is fairly easy to do that in most cases. Only on two occasions this is not clear from the sole DICOM Attributes. When the Transfer Syntax is JPEG 2000 Image Compression (1.2.840.10008.1.2.4.91) and when the Transfer Syntax is JPEG-LS Lossy (Near-Lossless) Image Compression (1.2.840.10008.1.2.4.81). π
In this case, the only solution is to open the Pixel Data element, read the specific JPEG header and check whether or not the JPEG transformation was lossless or not:
$ gdcminfo --check-compression gdcmData/MAROTECH_CT_JP2Lossy.dcm
The tool returns: βEncapsulated Stream was found to be: lossyβ
β οΈ Pay attention that this tool also checks the Image Lossy Compression attribute(0028,2110). This means--check-compressionwill also returns a value of lossy if a predecessor was found to be lossy compressed. π
π CHECKING IMAGE AS IF MOSAIC
Dump the image as if MOSAIC. If the input is really MOSAIC image, then print the information of the true underlying MOSAIC volume. bestie said βshow me the real volume,β and honestly? valid. π«Ά
$ gdcminfo --mosaic siemens_mosaic.dcm
π SEE ALSO π
πΈ AUTHOR πΈ
- Mathieu Malaterre β Main developer
π COPYRIGHT π
Copyright Β© 2006, 2011 Mathieu Malaterre
kisses and slay from GDCM 3.0.24, dated 12/25/2025 β bye bestie, ily! π«Άπ π
π¦ where this page comes from
- opensuse-leap 16.0: gdcm-applications 3.0.24-bp160.2.1 Β· BSD-3-Clause
- opensuse-leap 16.0: gdcm-applications 3.0.24-bp160.2.1 Β· BSD-3-Clause
- opensuse-leap 16.0: gdcm-applications 3.0.24-bp160.2.1 Β· BSD-3-Clause
- opensuse-leap 16.0: gdcm-applications 3.0.24-bp160.2.1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms