RAWTODC(1)

NAME
rawtodc - ACR/NEMA DICOM PS3 ... Create DICOM from raw file

SYNOPSIS

rawtodc -rows|-height|-h rows -columns|-width|-w cols -bits|-depth|-d bits [ -frames frames ] [ -little|-l|-big|-b ] [ -samples samples ] [ -gray|-grey|-rgb|-argb|-hsv|-cmyk ] [ -photometric-interpretation xxx ] [ -color-by-pixel|-color-by-plane ] [ -imagepixelmoduleonly ] [ -v|verbose ]

DESCRIPTION

rawtodc reads the named raw input file and converts it to a DICOM Secondary Capture Image Storage SOP Class instance stored in a DICOM file. Only uncompressed raw images with one sample per byte or word are supported, though multiple samples per pixel are allowed. The planar configuration can be specified but not re-ordered.

During the translation, specific attributes may be deleted, added or replaced, class and instance unique identifiers generated or removed, group lengths added, or private attributes removed, as specified by the replacement options described in dcintro(1). This allows the specification of additional DICOM attributes, such as the patient's name, necessary to make a complete and useful SC instance.

OPTIONS
The verbose output goes to standard error.

The basic switches are described in dcintro(1). Options specific to this program are:

-rows|-height|-h rows
    Required.

-columns|-width|-w cols
    Required.

-bits|-depth|-d bits
    Required.

-little|-big
    Required if bit depth is greater than 8.

-frames frames
    Defaults to 1.

-samples samples
    Defaults to appropriate value for photometric interpretation, or 1 if none specified. Only needs to be specified for unusual photometric interpretations.

-gray|-grey|-rgb|-argb|-hsv|-cmyk
    Recognized photometric interpretations, defaults to gray if no samples specified or samples is 1, and rgb if samples is 3.

-photometric-interpretation xxx
    Explicitly specify string value for photometric interpretation attribute; will need value for samples.

-color-by-pixel|-color-by-plane
    Specifies the planar configuration. Required if samples not 1 (explicitly or deduced from photometric interpretation). No default.

-imagepixelmoduleonly
    Write only the image pixel data module and not the basic mandatory secondary capture and composite IOD modules as well (e.g., prior to dcmerge'ing with an existing SOP instance that has its pixel data deleted); use the -nodisclaimer switch to avoid generating Image Comments and the -n switch to avoid adding a meta-information header (will fail if you do not since there is no SOP Class UID to use in the meta-information header).

ENVIRONMENT

EXAMPLES

# Create a gray image from 16 bit big-endian ...
% rawtodc -rows 256 -columns 256 -bits 16 -big \
          /tmp/test.big /tmp/test.dc3
# Create a gray image from 8 bit ...
% rawtodc -rows 256 -columns 256 -bits 8 \
          /tmp/test.byte /tmp/test.dc3
# Create an rgb color-by-pixel image from 8 bit ...
% rawtodc -v -rows 256 -columns 256 -bits 8 \
             -rgb -color-by-pixel \
          /tmp/test.byte3 /tmp/test.dc3
 ...
(0x0028,0x0002) US Samples per Pixel [0x0003]
(0x0028,0x0004) CS Photometric Interpretation <RGB >
(0x0028,0x0006) US Planar Configuration [0x0000]
 ...
# Create a gray image from 12 bit little endian ...
% rawtodc -v -rows 256 -columns 256 -bits 12 -little \
          /tmp/test.little /tmp/test.dc3
Converting ...
******** As read ... ********
(0x0008,0x0020) DA Study Date <>
(0x0008,0x0030) TM Study Time <>
(0x0008,0x0050) SH Accession Number <>
(0x0008,0x0060) CS Modality <OT>
(0x0008,0x0064) CS Conversion Type <WSD >
(0x0008,0x0070) LO Manufacturer <>
(0x0008,0x0090) PN Referring Physician's Name <^^^^>
(0x0010,0x0010) PN Patient's Name <^^^^>
(0x0010,0x0020) LO Patient's ID <>
(0x0010,0x0030) DA Patient's Birth Date <>
(0x0010,0x0040) CS Patient's Sex <>
(0x0020,0x0010) SH Study ID <>
(0x0020,0x0011) IS Series Number <>
(0x0020,0x0013) IS Image Number <>
(0x0020,0x0020) CS Patient Orientation <>
(0x0028,0x0002) US Samples per Pixel [0x0001]
(0x0028,0x0004) CS Photometric Interpretation <MONOCHROME2>
(0x0028,0x0008) IS Number of Frames <1 >
(0x0028,0x0010) US Rows [0x0100]
(0x0028,0x0011) US Columns [0x0100]
(0x0028,0x0100) US Bits Allocated [0x0010]
(0x0028,0x0101) US Bits Stored [0x000c]
(0x0028,0x0102) US High Bit [0x000b]
(0x0028,0x0103) US Pixel Representation [0x0000]
(0x7fe0,0x0010) OX Pixel Data VR=<OW> VL=<0x20000>
******** As written ... ********
(0x0002,0x0000) UL Meta Element Group Length [0x000000a4]
(0x0002,0x0001) OB File Meta Information Version \
                   [0x00,0x01]
(0x0002,0x0002) UI Media Storage SOP Class UID \
                   <1.2.840.10008.5.1.4.1.1.7>
(0x0002,0x0003) UI Media Storage SOP Instance UID \
                   <0.0.0.0.1.0.0.0.830260380>
(0x0002,0x0010) UI Transfer Syntax UID \
                   <1.2.840.10008.1.2>
(0x0002,0x0012) UI Implementation Class UID <0.0.0.0>
(0x0002,0x0013) SH Implementation Version Name \
                   <NOTSPECIFIED>
(0x0002,0x0016) AE Source Application Entity Title \
                   <NOTSPECIFIED>
(0x0008,0x0016) UI SOP Class UID \
                   <1.2.840.10008.5.1.4.1.1.7>
(0x0008,0x0018) UI SOP Instance UID \
                   <0.0.0.0.1.0.0.0.830260380>
(0x0008,0x0020) DA Study Date <>
(0x0008,0x0030) TM Study Time <>
(0x0008,0x0050) SH Accession Number <>
(0x0008,0x0060) CS Modality <OT>
(0x0008,0x0064) CS Conversion Type <WSD >
(0x0008,0x0070) LO Manufacturer <>
(0x0008,0x0090) PN Referring Physician's Name <^^^^>
(0x0010,0x0010) PN Patient's Name     <^^^^>
(0x0010,0x0020) LO Patient's ID <>
(0x0010,0x0030) DA Patient's Birth Date <>
(0x0010,0x0040) CS Patient's Sex <>
(0x0020,0x000d) UI Study Instance UID \
                   <0.0.0.0.2.0.830260380>
(0x0020,0x000e) UI Series Instance UID \
                   <0.0.0.0.3.0.0.830260380>
(0x0020,0x0010) SH Study ID <>
(0x0020,0x0011) IS Series Number <>
(0x0020,0x0013) IS Image Number <>
(0x0020,0x0020) CS Patient Orientation <>
(0x0028,0x0002) US Samples per Pixel [0x0001]
(0x0028,0x0004) CS Photometric Interpretation <MONOCHROME2>
(0x0028,0x0008) IS Number of Frames <1 >
(0x0028,0x0010) US Rows [0x0100]
(0x0028,0x0011) US Columns [0x0100]
(0x0028,0x0100) US Bits Allocated [0x0010]
(0x0028,0x0101) US Bits Stored [0x000c]
(0x0028,0x0102) US High Bit [0x000b]
(0x0028,0x0103) US Pixel Representation [0x0000]
(0x7fe0,0x0010) OX Pixel Data VR=<OW> VL=<0x20000>

FILES

SEE ALSO
dccp(1), dctoraw(1), pnmtodc(1), dciodvfy(1), dcintro(1), dcmerge(1)

AUTHOR
Copyright (C) 1993-2010. David A. Clunie DBA PixelMed Publishing. All rights reserved.

BUGS