1GDCM2VTK(1)                   DICOM Manipulation.                  GDCM2VTK(1)
2
3
4

NAME

6       gdcm2vtk - Convert a file supported by VTK into DICOM.
7

SYNOPSIS

9           gdcm2vtk [options] file-in file-out
10

DESCRIPTION

12       The gdcm2vtk takes as input any file supported by VTK (including DICOM
13       file) and will generate as output a DICOM file.
14

PARAMETERS

16           file-in   input filename (DICOM or VTK supported)
17
18           file-out  output filename (DICOM or VTK supported)
19

OPTIONS

21   specific options
22                --force-rescale    force rescale.
23                --force-spacing    force spacing.
24                --palette-color    when supported generate a PALETTE COLOR file.
25                --argb             when supported generate a ARGB file.
26                --compress         when supported generate a compressed file.
27                --use-vtkdicom     Use vtkDICOMImageReader (instead of GDCM).
28                --modality         set Modality.
29                --lower-left       set lower left.
30                --shift            set shift.
31                --scale            set scale.
32                --compress         set compression (MetaIO).
33             -T --study-uid        Study UID.
34             -S --series-uid       Series UID.
35                --root-uid         Root UID.
36                --imageformat      Image Format [1-8] (aka PhotometricInterpretation).
37                --ipp-sort         When input is directory, sort instances using IOP/IPP.
38
39   compression options
40             -J --jpeg             Compress image in jpeg.
41             -K --j2k              Compress image in j2k.
42             -L --jpegls           Compress image in jpeg-ls.
43             -R --rle              Compress image in rle (lossless only).
44
45   general options
46             -h   --help
47                    print this help text and exit
48
49             -v   --version
50                    print version information and exit
51
52             -V   --verbose
53                    verbose mode (warning+error).
54
55             -W   --warning
56                    warning mode, print warning information
57
58             -E   --error
59                    error mode, print error information
60
61             -D   --debug
62                    debug mode, print debug information
63
64   environment variable
65             GDCM_ROOT_UID Root UID
66

DESCRIPTION

68       Convert a file supported by VTK into DICOM.
69
70       Typical usage is:
71
72           $ gdcm2vtk inputfile output.dcm
73
74       It uses the internal factory mechanism of VTK to recognize a file
75       (CanRead function). See VTK supported file here:
76
77             What image file formats can VTK read and write? http://www.vtk.org/Wiki/VTK_FAQ#What_image_file_formats_can_VTK_read_and_write.3F
78
79       If your input file has 4 components, the 4th comp (alpha) will be
80       removed from the output file as DICOM does not support alpha component
81       anymore (see –argb option).
82
83       Special care was taken for the following file format:
84
85              1. DICOM: Direction Cosines and vtkMedicalImageInformation are passed to the output
86              2. BMP: The file can be saved with a Lookup Table (see --palette-color)
87              3. GE Signa: vtkMedicalImageProperties is passed to the output
88              4. MINC: Direction Cosines is passed to the output
89              5. TIFF: vtkTIFFReader is currently in bad shape in VTK (different behavior in VTK 5.2 and git/master). Only use it, if you know what you are doing.
90
91   CONVERT MetaImage (mhd, mha)
92           $ gdcm2vtk inputfile output.mha
93
94       This command will convert the input DICOM file: inputfile into a
95       MetaImage .mha file. Same goes for .mhd file.
96
97   CONVERT MHA/MHD
98           $ gdcm2vtk inputfile output.mha
99
100       or
101
102           $ gdcm2vtk inputfile output.mhd
103
104       This command will convert the input DICOM file: inputfile into a
105       MetaImageData .mha/.mhd file.
106
107   CONVERT VTI
108           $ gdcm2vtk inputfile output.vti
109
110       This command will convert the input DICOM file: inputfile into a XML
111       VTK ImageData .vti file.
112
113   CONVERT VTK
114           $ gdcm2vtk inputfile output.vtk
115
116       This command will convert the input DICOM file: inputfile into an old
117       VTK Structured PointSets .vtk file.
118

CONVERT DICOM

120           $ gdcm2vtk input.dcm output.dcm
121
122       vtkGDCMImageReader will be used to read in a DICOM file, not the
123       default vtkDICOMImageReader. See option –use-vtkdicom to use
124       vtkDICOMImageReader.
125

ROUNDTRIP DICOM TO MHD TO DICOM

127           $ gdcm2vtk input_ybr.dcm output.mhd
128           $ gdcm2vtk --modality US --imageformat 7 output.mhd output.dcm
129
130       The above refsection shows how to convert a DICOM using the Photometric
131       Interpretation of YBR_FULL (or even YBR_FULL_422 is lossy) into another
132       file format: MetaImage (mhd). Since this file format does not handle
133       color space, we have to explicitly set it using the –imageformat
134       command line option. The –modality command line option is required in
135       this case since the default Secondary Capture Image Storage Class
136       family does not allow for YBR Photometric Interpretation.
137

GDCM2VTK NOTES

139       IMPORTANT NOTE: The internal VTK structured will be filled from the
140       input DICOM, and then pass to the output DICOM writer. Some information
141       might be lost during the conversion DICOM to VTK to DICOM. This option
142       is mostly used to test the vtkGDCMImageReader/vtkGDCMImageWriter
143       combination.
144
145       IMPORTANT NOTE: When converting from a lossy format such as JPEG, the
146       information of lossiness is important. The output DICOM will contains
147       the required Lossy Image Compression attribute that indicates that
148       image was lossy-compressed somewhere along the pipeline. See also
149       gdcmimg (better handling of JPEG in general).
150
151       IMPORTANT NOTE: When using –use-vtkdicom the output DICOM file will
152       always be written as MR Image Storage as this information is not
153       available from the reader itself. This allow setting the Image
154       Orientation (Patient) properly.
155

SEE ALSO

157       gdcmdump(1), gdcmviewer(1), gdcmimg(1)
158

AUTHOR

160       Mathieu Malaterre
161           Main developer
162
164       Copyright © 2006, 2011 Mathieu Malaterre
165
166
167
168GDCM 3.0.12                       08/02/2022                       GDCM2VTK(1)
Impressum