com.pixelmed.dicom

## Class CompressedFrameDecoder

- java.lang.Object
- - com.pixelmed.dicom.CompressedFrameDecoder

-     public class CompressedFrameDecoder
      extends java.lang.Object

  The `CompressedFrameDecoder` class implements decompression of selected frames in various supported Transfer Syntaxes once already extracted from DICOM encapsulated images.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompressedFrameDecoder(java.lang.String transferSyntaxUID, byte[][] frames, int bytesPerSample, java.awt.color.ColorSpace colorSpace)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `canDecompress(java.io.File file)` Returns a whether or not a DICOM file contains pixel data that can be decompressed using this class.
    `void` | `dispose()`
    `boolean` | `getColorSpaceConvertedToRGBDuringDecompression()` Returns a whether or not the color space will be converted to RGB during compression if it was YBR in the first place.
    `java.awt.image.BufferedImage` | `getDecompressedFrameAsBufferedImage(int f)`
    `javax.imageio.metadata.IIOMetadata` | `getIIOMetadata(int frame)` Returns a reference to the `IIOMetadata` object for the selected frame, or null if none was available during reading.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CompressedFrameDecoder

          public CompressedFrameDecoder(java.lang.String transferSyntaxUID,
                                        byte[][] frames,
                                        int bytesPerSample,
                                        java.awt.color.ColorSpace colorSpace)
                                 throws DicomException

      Throws:
        `DicomException`

  - ### Method Detail

    - #### canDecompress

          public static boolean canDecompress(java.io.File file)

      Returns a whether or not a DICOM file contains pixel data that can be decompressed using this class.

      Parameters:
        `file` - the file
      Returns:
        true if file can be decompressed using this class

    - #### getIIOMetadata

          public javax.imageio.metadata.IIOMetadata getIIOMetadata(int frame)

      Returns a reference to the `IIOMetadata` object for the selected frame, or null if none was available during reading.

      Parameters:
        `frame` - the frame number, from 0
      Returns:
        an `IIOMetadata` object, or null.

    - #### getColorSpaceConvertedToRGBDuringDecompression

          public boolean getColorSpaceConvertedToRGBDuringDecompression()

      Returns a whether or not the color space will be converted to RGB during compression if it was YBR in the first place.

      Returns:
        true if RGB after compression

    - #### getDecompressedFrameAsBufferedImage

          public java.awt.image.BufferedImage getDecompressedFrameAsBufferedImage(int f)
                                                                           throws DicomException,
                                                                                  java.io.IOException

      Throws:
        `DicomException`
        `java.io.IOException`

    - #### dispose

          public void dispose()
                       throws java.lang.Throwable

      Throws:
        `java.lang.Throwable`