D DICOM Processing and Supported Formats

This appendix describes processing operations and supported formats for DICOM content.

This appendix includes these sections:

See Chapter 7 and Chapter 8 for reference information about the processCopy( ) method.

See Also:

Oracle Multimedia Reference for a complete list of image processing operators and details about each operator

D.1 DICOM Image Content and Compression Formats

Photometric interpretation of DICOM image content is specified by the tag <00280004>. Table D-1 shows the supported photometric interpretations for the processCopy( ) method with DICOM images.

Table D-1 DICOM Content Photometric Interpretations

Action Supported Photometric Interpretation Values

READING

MONOCHROME1, MONOCHROME2, RGB, PALETTECOLOR, YBR_FULL, YBR_FULL_422, YBR_RCT, and YBR_ICT

WRITING

MONOCHROME1, MONOCHROME2, RGB, YBR_FULL, YBR_FULL_422, YBR_RCT, and YBR_ICT


For the action READING, DICOM images with the listed photometric interpretation values can be decoded and the pixel data can be extracted. For the action WRITING, DICOM images with the listed photometric interpretation values can be encoded and the pixel data can be written with the corresponding photometric interpretations.

Compression format type in DICOM images is specified by the transfer syntax UID value or the tag <00020010>. Table D-2 shows the supported compression formats for the processCopy( ) method with DICOM images.

Table D-2 DICOM Content Compression Formats

Action Supported Compression Format Values

READING

DEFLATE, JPEG, JPEG 2000Foot 1 , MPEG,Foot 2  RAWFoot 3 , and RLE

WRITING

DEFLATE, JPEG, JPEG 2000Footref 1, MPEGFoot 4 , RAWFootref 3, and RLEFoot 5 


Footnote 1 With JAI image I/O installations (see Appendix C)

Footnote 2 Supports extracting MPEG content from DICOM format to MPEG format (with processCopy( ) method only). No other processing operations are supported.

Footnote 3 With multibit from 8-bit to 16-bit, inclusive

Footnote 4 Supports encapsulating MPEG content into DICOM format (with createDicomImage( ) method only)

Footnote 5 When writing DICOM images with RLE compression, specify DICOMRLE as the compression format value (see Section 3.2.6).

For the action READING, DICOM images with the listed compression format values can be decoded and the pixel data can be decompressed. For the action WRITING, DICOM images with the compression format values can be encoded and the pixel data can be compressed with the corresponding compression format types.

To specify the compression format for the processCopy( ) method, use the compressionFormat operator. If the image is not compressed (the compression format value is RAW), the encoding bits of each pixel are specified in the user's metadata, which is passed as one argument of the processCopy( ) method.

See Chapter 7 and Chapter 8 for reference information about the processCopy( ) method, and for more information about the compressionFormat operator.

The following subsections describe some content compression formats in more detail:

D.1.1 DEFLATE Compression Format

For the DEFLATE compression format, you can specify the speed or the amount of compression with the deflateLevel operator. This operator accepts either a string or an integer from 1 to 9. The valid values are further defined in the following table:

Value Type Description
bestspeed String Fastest compression rate
bestcompression String Highest compression level
defaultcompression String Default value
1 through 9 Integer A range of values, representing these results:
  • The lower the value, the faster the compression rate

  • The higher the value, the higher the compression level


To specify the highest DEFLATE compression level using a string value for the deflateLevel operator (highlighted in bold), use the following syntax:

dicom.processcopy('fileformat=dicom, compressionFormat=deflate,
 deflateLevel=bestcompression', sop_instance_uid, dest); 

This processing operation, which is performed at a relatively slow rate, results in an image with a high amount of compression. Specifying the string value bestspeed, by contrast, would cause the image to be processed at a fast rate and result in an image with a low amount of compression.

To specify the highest DEFLATE compression level using an integer value for the deflateLevel operator (highlighted in bold), use the following syntax:

dicom.processcopy('fileformat=dicom, compressionFormat=deflate, 
deflateLevel=9', sop_instance_uid, dest);

This processing operation is also performed at a slow rate. Similar to the previous example, it results in an image with a high amount of compression. In general, using an integer value enables you to fine-tune the speed and the level of compression. In this example, specifying the highest integer value (9) results in the same level of compression as with the string value bestcompression.

D.1.2 MPEG Compression Format

With the processCopy( ) method, you can read MPEG content from DICOM format and extract it to MPEG format.

With the createDicomImage( ) method, you can write MPEG content into DICOM format.

D.1.3 RLE Compression Format

You can write DICOM images with RLE compression using the following syntax:

'fileFormat=dicom, compressionFormat=dicomrle'

D.2 The frame Image Processing Operator

Oracle Multimedia provides the frame operator for DICOM image processing. You can use the frame operator to extract a specific frame image from a multiframe DICOM image. You can also combine the frame operator with other image processing operators, such as scale and rotate, to perform multiple operations on a single frame extracted from a multiframe DICOM image.

To extract a specific frame by the number of the frame, use the following syntax:

frame = <frame number>

If the specified frame number is less than 1 or greater than the maximum number of frames in the DICOM image, the attempted operation returns an invalid frame exception. The frame operator can be used for DICOM images with only one frame. However, in this case, the value for the frame number must always be 1.

D.3 Other Image Processing Operators

Other image processing operators include fileFormat, contentFormat, compressionFormat, cut, scale, and rotate.

See Also:

Oracle Multimedia Reference for a complete list of image processing operators and details about each operator

D.4 Multiframe Image Processing and Creation

Oracle Multimedia supports the creation and processing of multiframe DICOM images.

To process a single frame in a multiframe DICOM image, specify the frame within the frame operator statement in the processCopy command (see Section D.2 for an example of this syntax). You can also combine the frame operator with other operators, such as scale and rotate, to perform multiple operations on a single frame extracted from a multiframe DICOM image.

To create a multiframe DICOM image, use the following syntax:

frame = ALL

Alternatively, you can combine the frame operator with other operators, such as scale and rotate, to perform multiple operations on all the frames in a multiframe DICOM image.

You can also use the frame = ALL syntax to specify processing operations to be performed on single-frame DICOM images.

See Also:

Oracle Multimedia Reference for a complete list of image processing operators and details about each operator

D.5 Multiframe DICOM Content Processing to AVI Format

Oracle Multimedia supports the processing of multiframe DICOM content to the Microsoft Video for Windows Audio Video Interleave (AVI) format. You can generate output in AVI format from multiframe DICOM content (such as MRIs, CTs, and Ultrasound videos).

To process multiframe DICOM content into AVI output, invoke the processCopy( ) method (or relational procedure) on the DICOM content and convert it into AVI format. Use the following syntax to specify the processCopy( ) method (or procedure) with the value of the fileFormat operator set to avi, as shown in the example:

'fileFormat=avi'

The preceding example shows the fileFormat operator set to avi, with no other parameters. Optionally, in addition to specifying avi as the value of the fileFormat operator, you can also specify either the framerate or the frametime parameter. The framerate parameter represents the number of frames or images of the resulting AVI video that are displayed each second. The frametime parameter represents the duration or time, in number of seconds, that each frame or image in the resulting AVI video is displayed. The default value for both of these optional parameters is 1.

The following code segment shows how to specify the framerate parameter for a display of ten frames of AVI video in each second:

'fileFormat=avi, framerate=10'

The following code segment shows how to specify the frametime parameter for a display of one frame of AVI video for every one-tenth of a second:

'fileFormat=avi, frametime=0.1'

Note:

Specify at most one optional parameter each time you invoke the processCopy( ) method (or procedure) with the fileFormat operator set to avi. Specifying both optional parameters at the same time causes an exception to be thrown.

When the value of the fileFormat operator is set to avi, you can also combine this operator with other operators, such as scale and rotate, to perform multiple operations on multiframe DICOM content.

See processCopy( ) to BLOBs for reference information about the processCopy( ) method that supports this feature. See processCopy( ) for BFILEs and processCopy( ) for BLOBs for reference information about the processCopy( ) relational procedures that support this feature.

See Also:

Oracle Multimedia Reference for more information about the AVI data format

D.6 Order of Precedence with processCopy( ) Method Arguments

When you use the processCopy( ) method to process a DICOM image to another DICOM image, you can specify the optional metadata argument, SYS.XMLTYPE. The processCopy( ) method uses this metadata argument to specify the encoding rules for the output DICOM image. If a conflict exists between the command argument and the metadata argument, the command argument takes precedence over the metadata argument. The encoding information in the output DICOM image is updated with the result of the processing operation, as specified by the command argument and the metadata argument (in that order).

See Also:

Oracle XML DB Developer's Guide for more information about XMLType operations