Skip to content

Latest commit

 

History

History
75 lines (74 loc) · 3.91 KB

File metadata and controls

75 lines (74 loc) · 3.91 KB
usage: jpg2dcm [options] <jpeg|jp2|jph|mpeg2|mp4|mov-file> <dicom-file>
or jpg2dcm [options] <jpeg|jp2|jph|mpeg2|mp4|mov-file>... <dicom-outdir>
or jpg2dcm [options] <jpeg|jp2|jph|mpeg2|mp4|mov-indir>... <dicom-outdir>

Encapsulate JPEG, JPEG 2000 Part 1, JPEG 2000 Part 15 (HTJ2K) image or
MPEG2, MP4 or Quicktime video file(s) (or present in directories) into
DICOM file(s) (or into DICOM directory). DICOM attributes can be specified
via command line (using -m option) or a XML file (using -f option). If
both the options are specified, system will generate metadata first from
sample metadata file then from file specified by user, then add the
attributes specified individually on command line and lastly read the
header from the file to get specific information in accordance with the
content type of the file. The Type 1 and Type 2 attributes, if missing
will be generated by the system.
-
Options:
    --content-type <type>   Explicitly specify the content type of the
                            file(s). Enumerated values: image/jpeg,
                            image/jp2, image/j2c, of image/jph,
                            image/jphc, video/mpeg, video/mp4,
                            video/quicktime. If not specified, attempt to
                            probe the content type of the file(s).
 -f <xml-file>              specify included DICOM attributes by XML
                            presentation in <xml-file>
 -F,--fragment <length>     maximum length of one fragment. If the
                            JPEG/MPEG stream exceeds that value, it will
                            be split into several fragments, using a
                            Fragmentable Encapsulated Transfer Syntax;
                            4294967294 (=2^32-2) by default.
 -h,--help                  display this help and exit
 -s <[seq.]attr=value>      specify included DICOM Attribute. attr can be
                            specified by keyword or tag value (in hex),
                            e.g. PatientName or00100010. Attributes in
                            nested Datasets can be specified by including
                            the keyword/tag value of the sequence
                            attribute,e.g. 00400275.00400009 for Scheduled
                            Procedure Step ID in the Request Attributes
                            Sequence. Overrides DICOM attributesspecified
                            by -f <xml-file>
    --no-app                remove application segments APPn from
                            encapsulated JPEG stream; encapsulate JPEG
                            stream verbatim by default.
    --tsuid <uid>           Explicitly specify Transfer Syntax UID to
                            override the one returned by parser, added in
                            the file meta information.
 -V,--version               output version information and exit
    --xc                    generate sample metadata for VL Photographic
                            Image from
                            etc/jpg2dcm/vlPhotographicImageMetadata.xml
                            file.
-
Example 1: jpg2dcm -f metadata.xml image.jpg image.dcm
=> Encapsulate JPEG Image verbatim with DICOM attributes specified in
metadata.xml into DICOM Image Object.
-
Example 2: jpg2dcm --no-app -m PatientName=Simson^Homer -m PatientSex=M --
homer.jpg image.dcm
=> Encapsulate JPEG Image without application segments with specified
DICOM attributes into DICOM Image Object.
-
Example 3: jpg2dcm video.mpeg video.dcm
=> Encapsulate MPEG2 Video into DICOM Video Object.
-
Example 4: jpg2dcm video.mp4 videoMP4.dcm
=> Encapsulate MP4 Video into DICOM Video Object.
-
Example 5: jpg2dcm img1.jpeg video1.mp4 dicom-dir
=> Encapsulate the specified image and video files to DICOM objects in
dicom-dir.
-
Example 6: jpg2dcm image-dir mp4-dir mpeg2-dir dicom-object-dir
=> Encapsulate images and videos specified in mentioned directories to
DICOM objects in dicom-object-dir.