GDCMTAR(1)

πŸ’… GDCMTAR(1) β€” the DICOM Manipulation manual, bestie edition πŸŽ€

okay so this is the page for gdcmtar(1) out of the DICOM Manipulation manual set, and ngl it's a whole vibe. it concatenates and extracts DICOM files. that's the main character energy right there ✨


🌸 NAME 🌸

gdcmtar β€” Concatenate/Extract DICOM files.

πŸ¦‹ SYNOPSIS πŸ¦‹

gdcmtar [options] file-in file-out

πŸ’– DESCRIPTION πŸ’–

So gdcmtar is a command line tool, right? and what it does is tar/untar multi-frames images β€” and yes that includes SIEMENS MOSAIC files, we love an inclusive icon πŸ’…. she's giving utility, she's giving archive energy.

🌈 PARAMETERS 🌈

  • file-in β€” DICOM input filename (the one you're reading from, obvi)
  • file-out β€” DICOM output filename (the one you're writing to, slay)

✨ OPTIONS ✨

πŸ“ specific options πŸ“

  • --enhance β€” Enhance. this is the default btw, no cap.
  • -U, --unenhance β€” Unenhance. the reverse vibe.
  • -M, --mosaic β€” Split SIEMENS Mosaic image into multiple frames. iconic behaviour honestly.
  • --mosaic-private β€” When splitting SIEMENS Mosaic image into multiple frames, preserve private attributes. > ⚠️ advanced user only β€” like, actually. don't come for me if you're not an advanced user, bestie.
  • -p, --pattern β€” Specify trailing file pattern. this is how you name the little babies πŸŽ€
  • --root-uid β€” Root UID. the root of all UID-ness, iykyk.

🧚 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_ROOT_UID β€” Root UID

πŸ‘‘ TYPICAL USAGE πŸ‘‘

πŸ”₯ SIEMENS Mosaic πŸ”₯

okay so this option will turn a 2D frame containing sub-frame of a SIEMENS MOSAIC into a set of MR Image Storage (legacy). literally a glow-up for your frame πŸ¦‹

$ gdcminfo MR-sonata-3D-as-Tile.dcm

MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage]
TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian]
NumberOfDimensions: 2
Dimensions: (384,384,1)
...

then you hit her with:

$ gdcmtar --mosaic -i MR-sonata-3D-as-Tile.dcm -o mosaic --pattern %03d.dcm

Will output:

-rw-r--r--   1 mathieu mathieu 72882 2009-08-10 11:14 mosaic000.dcm
-rw-r--r--   1 mathieu mathieu 72886 2009-08-10 11:14 mosaic001.dcm
-rw-r--r--   1 mathieu mathieu 72886 2009-08-10 11:14 mosaic002.dcm
-rw-r--r--   1 mathieu mathieu 72886 2009-08-10 11:14 mosaic003.dcm
-rw-r--r--   1 mathieu mathieu 72886 2009-08-10 11:14 mosaic004.dcm
-rw-r--r--   1 mathieu mathieu 72886 2009-08-10 11:14 mosaic005.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic006.dcm
-rw-r--r--   1 mathieu mathieu 72882 2009-08-10 11:14 mosaic007.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic008.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic009.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic010.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic011.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic012.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic013.dcm
-rw-r--r--   1 mathieu mathieu 72882 2009-08-10 11:14 mosaic014.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic015.dcm
-rw-r--r--   1 mathieu mathieu 72882 2009-08-10 11:14 mosaic016.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic017.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic018.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic019.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic020.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic021.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic022.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic023.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic024.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic025.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic026.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic027.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic028.dcm
-rw-r--r--   1 mathieu mathieu 72884 2009-08-10 11:14 mosaic029.dcm
-rw-r--r--   1 mathieu mathieu 72882 2009-08-10 11:14 mosaic030.dcm

thirty-one files, all ate and left no crumbs πŸ’€βœ¨

and then:

$ gdcminfo mosaic000.dcm

MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage]
TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian]
NumberOfDimensions: 2
Dimensions: (64,64,1)
...

look at that. 384,384,1 β†’ 64,64,1. the split is real and it's spectacular 🫢

⚠️ important bestie, listen up: by default all private attributes are removed since they may not match the newly generated SOP Instance. so like, they're gone-gone unless you say otherwise. one way to preserve the private attributes is to use the --mosaic-private command line option πŸ™ˆ
$ gdcmtar --mosaic --mosaic-private -i MR-sonata-3D-as-Tile.dcm -o mosaic --pattern %03d.dcm

πŸŽ€ SEE ALSO πŸŽ€

gdcmdump(1), gdcmraw(1), gdcminfo(1) β€” go read those too, they're all in the friend group πŸ’–

⭐ AUTHOR ⭐

Mathieu Malaterre

  • Main developer

Copyright Β© 2006, 2011 Mathieu Malaterre


and that's the page!! πŸ¦‹ this whole thing is GDCM 3.0.24, dated 12/25/2025, and it's the GDCMTAR(1) page in the DICOM Manipulation set β€” merry christmas to everyone who celebrates 🎁✨ thanks for reading, ily, go tar some multi-frames πŸ’