Difference between revisions of "Using the CTP DicomPixelAnonymizer"

From MircWiki
Jump to: navigation, search
m (Configuration Hints)
m (Configuration Hints)
Line 33: Line 33:
 
When configuring a pipeline that may have to process both JPEGBaseline and non-JPEGBaseline compressed images, you must decompress the non-JPEGBaseline images. The easiest way to do so is to include a DicomDecompressor stage before the DicomPixelAnonymizer stage. To avoid decompressing the JPEGBaseline images, you can set the DicomDecompressor's <b>skipJPEGBaseline</b> attribute to <b>yes</b>. This will ensure that all images will be in a form that the DicomPixelAnonymizer can accept.
 
When configuring a pipeline that may have to process both JPEGBaseline and non-JPEGBaseline compressed images, you must decompress the non-JPEGBaseline images. The easiest way to do so is to include a DicomDecompressor stage before the DicomPixelAnonymizer stage. To avoid decompressing the JPEGBaseline images, you can set the DicomDecompressor's <b>skipJPEGBaseline</b> attribute to <b>yes</b>. This will ensure that all images will be in a form that the DicomPixelAnonymizer can accept.
  
Note that, as described in [[The CTP DICOM Pixel Anonymizer]], the DicomPixelAnonymizer determines whether to modify an image based on an examination of the image's non-pixel data (sometimes called the image's header). It is important, therefore, that if the non-pixel data is also to be de-identified, the DicomPixelAnonymizer must occur in the pipeline before the DicomAnonymizer modifies the header elements.
+
Note that, as described in [[The CTP DICOM Pixel Anonymizer]], the DicomPixelAnonymizer determines whether to modify an image based on an examination of the image's non-pixel data (sometimes called the image's header). It is important, therefore, that if the header elements are also to be de-identified, the DicomPixelAnonymizer must occur in the pipeline before the DicomAnonymizer modifies the header elements.
  
If it is desired to recompress images after modification, you can include a DicomTranscoder stage after the DicomPixelAnmonymizer. The DicomTranscoder does not support transcoding to the JPEGBaseline transfer syntax. Normally, you would transcode to the JPEGLossLess transfer syntax (1.2.840.10008.1.2.4.70), but it doesn't make sense to transcode a JPEGBaseline image as it is already compressed better than JPEGLossLess, and transcoding can only degrade it. To avoid this situation, you can set the DicomTranscoder's <b>skipJPEGBaseline</b> attribute to <b>yes</b>.
+
If it is desired to recompress images after modification, you can include a DicomTranscoder stage after the DicomPixelAnonymizer. The DicomTranscoder does not support transcoding to the JPEGBaseline transfer syntax. Normally, you would transcode to the JPEGLossLess transfer syntax (1.2.840.10008.1.2.4.70), but it doesn't make sense to transcode a JPEGBaseline image as it is already compressed better than JPEGLossLess, and transcoding can only degrade it. To avoid this situation, you can set the DicomTranscoder's <b>skipJPEGBaseline</b> attribute to <b>yes</b>.
  
 
Note that you can use the script feature of the DicomDecompressor and DicomTranscoder stages to do much more sophisticated selection of which images to decompress or recompress.
 
Note that you can use the script feature of the DicomDecompressor and DicomTranscoder stages to do much more sophisticated selection of which images to decompress or recompress.

Revision as of 18:06, 5 January 2015

The CTP DicomPixelAnonymizer is a pipeline stage that modifies regions of pixels in a DICOM image. It is configured with a script file that specifies which regions are to be modified, based on information in the non-pixel part of the DICOM dataset. This article describes how to use the DicomPixelAnonymizer to best advantage. The intended audience for this information is clinical trial coordinators at principal investigator sites.

1 Supported Transfer Syntaxes

Tthe DicomPixelAnonymizer can modify any uncompressed DICOM image. It can also modify compressed images that have the JPEGBaselilne transfer syntax (1.2.840.10008.1.2.4.50).

For uncompressed images, the stage's test attribute specifies whether to replace modified regions with black or mir-gray, the latter typically used during initial configuration to make it clear which regions are being modified.

For JPEGBaseline images, the stage modifies the internal compressed values directly, thus avoiding the requirement to decompress the image and subsequently recompress it, with the accompanying loss of quality. The effect is a blurring of the regions that renders them unintelligible.

2 Examples

Here are the effects on a sample image that is encoded as JPEGBaseline.

This is the original image:

Error creating thumbnail: Unable to save thumbnail to destination


This is the result of decompressing the original image to obtain an uncompressed version and then processing it with the test attribute set to yes:

Error creating thumbnail: Unable to save thumbnail to destination


This is the result of decompressing the original image to obtain an uncompressed version and then processing it with the test attribute set to no:

Error creating thumbnail: Unable to save thumbnail to destination


This is the result of processing the original image without decompression:

Error creating thumbnail: Unable to save thumbnail to destination

3 Configuration Hints

When configuring a pipeline that may have to process both JPEGBaseline and non-JPEGBaseline compressed images, you must decompress the non-JPEGBaseline images. The easiest way to do so is to include a DicomDecompressor stage before the DicomPixelAnonymizer stage. To avoid decompressing the JPEGBaseline images, you can set the DicomDecompressor's skipJPEGBaseline attribute to yes. This will ensure that all images will be in a form that the DicomPixelAnonymizer can accept.

Note that, as described in The CTP DICOM Pixel Anonymizer, the DicomPixelAnonymizer determines whether to modify an image based on an examination of the image's non-pixel data (sometimes called the image's header). It is important, therefore, that if the header elements are also to be de-identified, the DicomPixelAnonymizer must occur in the pipeline before the DicomAnonymizer modifies the header elements.

If it is desired to recompress images after modification, you can include a DicomTranscoder stage after the DicomPixelAnonymizer. The DicomTranscoder does not support transcoding to the JPEGBaseline transfer syntax. Normally, you would transcode to the JPEGLossLess transfer syntax (1.2.840.10008.1.2.4.70), but it doesn't make sense to transcode a JPEGBaseline image as it is already compressed better than JPEGLossLess, and transcoding can only degrade it. To avoid this situation, you can set the DicomTranscoder's skipJPEGBaseline attribute to yes.

Note that you can use the script feature of the DicomDecompressor and DicomTranscoder stages to do much more sophisticated selection of which images to decompress or recompress.