Package com.pixelmed.dicom
Class CompressedFrameDecoder
- java.lang.Object
-
- com.pixelmed.dicom.CompressedFrameDecoder
-
public class CompressedFrameDecoder extends java.lang.ObjectThe
CompressedFrameDecoderclass implements decompression of selected frames in various supported Transfer Syntaxes once already extracted from DICOM encapsulated images.
-
-
Constructor Summary
Constructors Constructor 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 Description static booleancanDecompress(java.io.File file)Returns a whether or not a DICOM file contains pixel data that can be decompressed using this class.voiddispose()booleangetColorSpaceConvertedToRGBDuringDecompression()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.BufferedImagegetDecompressedFrameAsBufferedImage(int f)javax.imageio.metadata.IIOMetadatagetIIOMetadata(int frame)Returns a reference to theIIOMetadataobject for the selected frame, or null if none was available during reading.static booleanisPixelMedLosslessJPEGReader(javax.imageio.ImageReader reader)static booleanisStandardJPEGReader(javax.imageio.ImageReader reader)static voidscanForCodecs()static javax.imageio.ImageReaderselectReaderFromCodecsAvailable(java.lang.String readerWanted, java.lang.String transferSyntaxUID, int bytesPerSample)
-
-
-
Constructor Detail
-
CompressedFrameDecoder
public CompressedFrameDecoder(java.lang.String transferSyntaxUID, byte[][] frames, int bytesPerSample, java.awt.color.ColorSpace colorSpace) throws DicomException- Throws:
DicomException
-
-
Method Detail
-
scanForCodecs
public static void scanForCodecs()
-
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
IIOMetadataobject for the selected frame, or null if none was available during reading.- Parameters:
frame- the frame number, from 0- Returns:
- an
IIOMetadataobject, 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
-
isStandardJPEGReader
public static boolean isStandardJPEGReader(javax.imageio.ImageReader reader)
-
isPixelMedLosslessJPEGReader
public static boolean isPixelMedLosslessJPEGReader(javax.imageio.ImageReader reader)
-
selectReaderFromCodecsAvailable
public static javax.imageio.ImageReader selectReaderFromCodecsAvailable(java.lang.String readerWanted, java.lang.String transferSyntaxUID, int bytesPerSample) throws DicomException- Throws:
DicomException
-
getDecompressedFrameAsBufferedImage
public java.awt.image.BufferedImage getDecompressedFrameAsBufferedImage(int f) throws DicomException, java.io.IOException- Throws:
DicomExceptionjava.io.IOException
-
dispose
public void dispose() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
-