EnglishFrenchSpanish

OnWorks favicon

gdcm2vtk - Online in the Cloud

Run gdcm2vtk in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command gdcm2vtk that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


gdcm2vtk - Convert a file supported by VTK into DICOM.

SYNOPSIS


gdcm2vtk [options] file-in file-out

DESCRIPTION


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

PARAMETERS


file-in input filename (DICOM or VTK supported)

file-out output filename (DICOM or VTK supported)

OPTIONS


specific options
--force-rescale force rescale.
--force-spacing force spacing.
--palette-color when supported generate a PALETTE COLOR file.
--argb when supported generate a ARGB file.
--compress when supported generate a compressed file.
--use-vtkdicom Use vtkDICOMImageReader (instead of GDCM).
--modality set Modality.
--lower-left set lower left.
--shift set shift.
--scale set scale.
--compress set compression (MetaIO).
-T --study-uid Study UID.
-S --series-uid Series UID.
--root-uid Root UID.

compression options
-J --jpeg Compress image in jpeg.
-K --j2k Compress image in j2k.
-L --jpegls Compress image in jpeg-ls.
-R --rle Compress image in rle (lossless only).

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

DESCRIPTION


Convert a file supported by VTK into DICOM.

Typical usage is:

$ gdcm2vtk inputfile output.dcm

It uses the internal factory mechanism of VTK to recognize a file (CanRead function). See
VTK supported file here:

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

If your input file has 4 components, the 4th comp (alpha) will be removed from the output
file as DICOM does not support alpha component anymore (see –argb option).

Special care was taken for the following file format:

1. DICOM: Direction Cosines and vtkMedicalImageInformation are passed to the output
2. BMP: The file can be saved with a Lookup Table (see --palette-color)
3. GE Signa: vtkMedicalImageProperties is passed to the output
4. MINC: Direction Cosines is passed to the output
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.

CONVERT MetaImage (mhd, mha)
$ gdcm2vtk inputfile output.mha

This command will convert the input DICOM file: inputfile into a MetaImage .mha file. Same
goes for .mhd file.

CONVERT MHA/MHD
$ gdcm2vtk inputfile output.mha

or

$ gdcm2vtk inputfile output.mhd

This command will convert the input DICOM file: inputfile into a MetaImageData .mha/.mhd
file.

CONVERT VTI
$ gdcm2vtk inputfile output.vti

This command will convert the input DICOM file: inputfile into a XML VTK ImageData .vti
file.

CONVERT VTK
$ gdcm2vtk inputfile output.vtk

This command will convert the input DICOM file: inputfile into an old VTK Structured
PointSets .vtk file.

CONVERT DICOM


$ gdcm2vtk input.dcm output.dcm

vtkGDCMImageReader will be used to read in a DICOM file, not the default
vtkDICOMImageReader. See option –use-vtkdicom to use vtkDICOMImageReader.

ROUNDTRIP DICOM TO MHD TO DICOM


$ gdcm2vtk input_ybr.dcm output.mhd
$ gdcm2vtk --modality US --imageformat 7 output.mhd output.dcm

The above refsection shows how to convert a DICOM using the Photometric Interpretation of
YBR_FULL (or even YBR_FULL_422 is lossy) into another file format: MetaImage (mhd). Since
this file format does not handle color space, we have to explicitly set it using the
–imageformat command line option. The –modality command line option is required in this
case since the default Secondary Capture Image Storage Class family does not allow for YBR
Photometric Interpretation.

GDCM2VTK NOTES


IMPORTANT NOTE: The internal VTK structured will be filled from the input DICOM, and then
pass to the output DICOM writer. Some information might be lost during the conversion
DICOM to VTK to DICOM. This option is mostly used to test the
vtkGDCMImageReader/vtkGDCMImageWriter combination.

IMPORTANT NOTE: When converting from a lossy format such as JPEG, the information of
lossiness is important. The output DICOM will contains the required Lossy Image
Compression attribute that indicates that image was lossy-compressed somewhere along the
pipeline. See also gdcmimg (better handling of JPEG in general).

IMPORTANT NOTE: When using –use-vtkdicom the output DICOM file will always be written as
MR Image Storage as this information is not available from the reader itself. This allow
setting the Image Orientation (Patient) properly.

Use gdcm2vtk online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Avogadro
    Avogadro
    Avogadro is an advanced molecular
    editor designed for cross-platform use
    in computational chemistry, molecular
    modeling, bioinformatics, materials
    science and ...
    Download Avogadro
  • 2
    XMLTV
    XMLTV
    XMLTV is a set of programs to process
    TV (tvguide) listings and help manage
    your TV viewing, storing listings in an
    XML-based format. There are utilities to
    do...
    Download XMLTV
  • 3
    strikr
    strikr
    Strikr Free Software project. Artifacts
    released under a 'intent based'
    dual license: AGPLv3 (community) and
    CC-BY-NC-ND 4.0 international
    (commercial)...
    Download strikr
  • 5
    GIFLIB
    GIFLIB
    giflib is a library for reading and
    writing gif images. It is API and ABI
    compatible with libungif which was in
    wide use while the LZW compression
    algorithm was...
    Download GIFLIB
  • 6
    Alt-F
    Alt-F
    Alt-F provides a free and open source
    alternative firmware for the DLINK
    DNS-320/320L/321/323/325/327L and
    DNR-322L. Alt-F has Samba and NFS;
    supports ext2/3/4...
    Download Alt-F
  • More »

Linux commands

  • 1
    4s-queryJ
    4s-queryJ
    4s-query � Run SPARQL queries on a
    4store storage backend ...
    Run 4s-queryJ
  • 2
    4ti2-circuits
    4ti2-circuits
    4ti2 - software package for algebraic,
    geometric and combinatorial problems on
    linear spaces ...
    Run 4ti2-circuits
  • 3
    cpufreq-set
    cpufreq-set
    cpufreq-set - A small tool which allows
    to modify cpufreq settings. SYNTAX:
    cpufreq-set [options] DESCRIPTION:
    cpufreq-set allows you to modify cpufreq
    setting...
    Run cpufreq-set
  • 4
    cpufreqd-get
    cpufreqd-get
    cpufreqd-get - Issues "get" commands to
    cpufreqd. SYNTAX: cpufreqd-get [-l]
    PARAMETERS: -l list applied Profiles for
    all cpus. DESCRIPTION: cpufreqd-get
    issues...
    Run cpufreqd-get
  • 5
    gammu
    gammu
    gammu - Does some neat things with your
    cellular phone or modem. ...
    Run gammu
  • 6
    ganglia2pcp
    ganglia2pcp
    ganglia2pcp - import ganglia data and
    create a PCP archive ...
    Run ganglia2pcp
  • More »

Ad