OS Manuals

/usr/bin/img2dcm

DCMTK is a collection of libraries and applications implementing large parts the DICOM standard.

From dcmtk 3.7.1-r0 (os), captured 2026-11-05 by running img2dcm --help (exit 0). permalink

$dcmtk: img2dcm v3.7.1 2026-10-15 $

img2dcm: Convert standard image formats into DICOM format
usage: img2dcm [options] imgfile-in... dcmfile-out

parameters:
  imgfile-in                     image input filename
  dcmfile-out                    DICOM output filename ("-" for stdout)

general options:
  -h      --help                 print this help text and exit
          --version              print version information and exit
          --arguments            print expanded command line arguments
  -q      --quiet                quiet mode, print no warnings and errors
  -v      --verbose              verbose mode, print processing details
  -d      --debug                debug mode, print debug information
  -ll     --log-level            [l]evel: string constant
                                 (fatal, error, warn, info, debug, trace)
                                 use level l for the logger
  -lc     --log-config           [f]ilename: string
                                 use config file f for the logger
input options:
  general:
    -i    --input-format         [i]nput file format: string
                                 supported formats: JPEG (default), BMP
    -df   --dataset-from         [f]ilename: string
                                 use dataset from DICOM file f
    -dx   --dataset-from-xml     [f]ilename: string
                                 use dataset from XML file f
    -stf  --study-from           [f]ilename: string
                                 read patient/study from DICOM file f
    -sef  --series-from          [f]ilename: string
                                 read patient/study/series from DICOM file f
    -ii   --instance-inc         increase instance number read from DICOM file
  JPEG format:
    -dp   --disable-progr        disable support for progressive JPEG
    -de   --disable-ext          disable support for extended sequential JPEG
    -jf   --insist-on-jfif       insist on JFIF header
    -ka   --keep-appn            keep APPn sections (except JFIF)
          --keep-app             [n]umber: integer (0..15)
                                 keep single APPn marker, e.g. 14 (Adobe)
    -rc   --remove-com           remove COM segment
  XML validation:
    +Vd   --validate-document    validate XML document against DTD
    +Vn   --check-namespace      check XML namespace in document root
processing options:
  attribute checking:
          --do-checks            enable attribute validity checking (default)
          --no-checks            disable attribute validity checking
    +i2   --insert-type2         insert missing type 2 attributes (default)
                                 (only with --do-checks)
    -i2   --no-type2-insert      do not insert missing type 2 attributes
                                 (only with --do-checks)
    +i1   --invent-type1         invent missing type 1 attributes (default)
                                 (only with --do-checks)
    -i1   --no-type1-invent      do not invent missing type 1 attributes
                                 (only with --do-checks)
  character set conversion of study/series file:
    -Ct   --transliterate        try to approximate characters that cannot be
                                 represented through similar looking characters
    -Cd   --discard-illegal      discard characters that cannot be represented
                                 in destination character set
  other processing options:
    -k    --key                  [k]ey: gggg,eeee="str", path or dict name="str"
                                 add further attribute
output options:
  target SOP class:
    -sc   --sec-capture          write Secondary Capture SOP class (default)
    -nsc  --new-sc               write new Secondary Capture SOP classes
    -vlp  --vl-photo             write Visible Light Photographic SOP class
    -oph  --oph-photo            write Ophthalmic Photography SOP classes
  output file format:
    +F    --write-file           write file format (default)
    -F    --write-dataset        write data set without file meta information
  group length encoding:
    +g=   --group-length-recalc  recalculate group lengths if present (default)
    +g    --group-length-create  always write with group length elements
    -g    --group-length-remove  always write without group length elements
  length encoding in sequences and items:
    +e    --length-explicit      write with explicit lengths (default)
    -e    --length-undefined     write with undefined lengths
  data set trailing padding (not with --write-dataset):
    -p    --padding-off          no padding (implicit if --write-dataset)
    +p    --padding-create       [f]ile-pad [i]tem-pad: integer
                                 align file on multiple of f bytes
                                 and items on multiple of i bytes
Options (35)
OptionDescriptionSource
-h--help print this help text and exithelp
--versionprint version information and exithelp
--argumentsprint expanded command line argumentshelp
-q--quiet quiet mode, print no warnings and errorshelp
-v--verbose verbose mode, print processing detailshelp
-d--debug debug mode, print debug informationhelp
-ll--log-level [l]evel: string constant (fatal, error, warn, info, debug, trace) use level l for the loggerhelp
-lc--log-config [f]ilename: string use config file f for the loggerhelp
-i--input-format [i]nput file format: string supported formats: JPEG (default), BMPhelp
-df--dataset-from [f]ilename: string use dataset from DICOM file fhelp
-dx--dataset-from-xml [f]ilename: string use dataset from XML file fhelp
-stf--study-from [f]ilename: string read patient/study from DICOM file fhelp
-sef--series-from [f]ilename: string read patient/study/series from DICOM file fhelp
-ii--instance-inc increase instance number read from DICOM filehelp
-dp--disable-progr disable support for progressive JPEGhelp
-de--disable-ext disable support for extended sequential JPEGhelp
-jf--insist-on-jfif insist on JFIF headerhelp
-ka--keep-appn keep APPn sections (except JFIF)help
--keep-app[n]umber: integer (0..15) keep single APPn marker, e.g. 14 (Adobe)help
-rc--remove-com remove COM segmenthelp
--do-checksenable attribute validity checking (default)help
--no-checksdisable attribute validity checkinghelp
-i2--no-type2-insert do not insert missing type 2 attributes (only with --do-checks)help
-i1--no-type1-invent do not invent missing type 1 attributes (only with --do-checks)help
-Ct--transliterate try to approximate characters that cannot be represented through similar looking charactershelp
-Cd--discard-illegal discard characters that cannot be represented in destination character sethelp
-k--key [k]ey: gggg,eeee="str", path or dict name="str" add further attributehelp
-sc--sec-capture write Secondary Capture SOP class (default)help
-nsc--new-sc write new Secondary Capture SOP classeshelp
-vlp--vl-photo write Visible Light Photographic SOP classhelp
-oph--oph-photo write Ophthalmic Photography SOP classeshelp
-F--write-dataset write data set without file meta informationhelp
-g--group-length-remove always write without group length elementshelp
-e--length-undefined write with undefined lengthshelp
-p--padding-off no padding (implicit if --write-dataset)help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.