Manipulate DICOM image file.

gdcmimg is a low level tool to allow de-/encapsulation from/to DICOM image. This tool does not understand Transfer Syntax conversion. It will encapsulate the raw data as-is. This has some impact in some cases, see special warnings below.

It is important to note that gdcmimg can only encapsulate proper input file, for instance JPG and or JP2 are accepted since an associated DICOM Transfer Syntax can be found. However input such as TIFF and/or PNG are not, since DICOM does not support those. See instead a tool such as gdcm2vtk.

For RAW file format, you should take special care of the --endian option. For the (old) JPEG file format, both the lossy and lossless format are supported, user should pay attention to the --sign option. For file format such as RLE or RAW, user is expected to fill in information required to find the dimension and type of input data as there is no other way to find this information. For all other file format, the properties are derived from the file format itself.

Warning

There are a couple of issues with gdcmimg implementation:

For RAW file, one should pay attention that when using --endian MSB the Pixel Data will be encapsulated as is (not touched by gdcmimg). Therefore the only possible transfer syntax available is Implicit VR Big Endian DLX (G.E Private). GDCM does handle this private Transfer Syntax. So if you need to convert this Transfer Syntax to another one (and allow Pixel Data manipulation), you can use: