xml2dcm

Overview 

Modify existing or create new DICOM file according given XML presentation and store result as ACR/NEMA-2 dump (option: -a) or DICOM Part 10 file (option: -d). If neither option -a nor -d is specified, inclusion of Part 10 File Meta Information depends, if the input DICOM file or the XML presentation already includes File Meta Information attributes (0002,eeee). Either option -i <dcmfile> or-x [<xmlfile>] (or both) must be specified.

Usage

 xml2dcm [-geEuUVh] [-a|-d] [-t <tsuid>] [-i <dcmfile>] [-x [<xmlfile>] -d <basedir>] -o <dcmfile>

Options

 -o <dcmfile>        Generated DICOM file or ACR/NEMA-2 dump
 -U,--undefseqlen    Encode all sequences with undefined length. Mutual
                     exclusive with option -E.
 -d,--dicom          Store result as DICOM Part 10 File. Mutual exclusive
                     with option -a
 -a,--acrnema2       Store result as ACR/NEMA 2 dump. Mutual exclusive
                     with option -d
 -u,--undefitemlen   Encode all sequence items with undefined length.
                     Mutual exclusive with option -e.
 -e,--explitemlen    Encode sequence items with explicit length. At
                     default, non-empty sequence items are encoded with
                     undefined length.
 -E,--explseqlen     Encode sequences with explicit length. At default,
                     non-empty sequences are encoded with undefined length.
 -V,--version        print the version information and exit
 -g,--grlen          Include (gggg,0000) Group Length attributes.By
                     default, optional Group Length attributes are excluded.
 -h,--help           print this message
 -i <dcmfile>        Update attributes in specified DICOM file instead
                     generating new one.
 -t <tsuid>          Store result with specified Transfer Syntax.
 -x <xmlfile>        XML input, used to update or generate new DICOM
                     file.Without <xmlfile>, read from standard input.

Example

xml2dcm -x in.xml -o out.dcm

Convert XML presentation in.xml to DICOM file out.dcm

xml2dcm -d -t 1.2.840.10008.1.2.1.99 -i in.dcm -o out.dcm

Load DICOM object from file in.dcm and store it as DICOM (Part 10) file encoded with Deflated Explicit VR Little Endian Transfer Syntax.