public class CompressedFrameEncoder
extends java.lang.Object
The CompressedFrameEncoder
class implements compression of specified frames
in various supported Transfer Syntaxes, which can then be incorporated in DICOM encapsulated images.
Constructor and Description |
---|
CompressedFrameEncoder() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
chooseOutputFormatForTransferSyntax(java.lang.String transferSyntaxUID)
Determine the output format string used by the JIIO codecs for the DICOM Transfer Syntax.
|
static java.lang.String |
chooseTransferSyntaxForOutputFormat(java.lang.String outputFormat)
Determine the DICOM Transfer Syntax for the output format string used by the JIIO codecs.
|
static java.io.File |
getCompressedFrameAsFile(AttributeList list,
java.awt.image.BufferedImage renderedImage,
java.lang.String outputFormat,
java.io.File tmpFrameFile)
Compress the supplied frame.
|
public static java.lang.String chooseOutputFormatForTransferSyntax(java.lang.String transferSyntaxUID)
Determine the output format string used by the JIIO codecs for the DICOM Transfer Syntax.
Though not supported by the JIIO codecs, an output format string of "rle" is also recognized.
transferSyntaxUID
- the DICOM Transfer Syntax UIDpublic static java.lang.String chooseTransferSyntaxForOutputFormat(java.lang.String outputFormat)
Determine the DICOM Transfer Syntax for the output format string used by the JIIO codecs.
Though not supported by the JIIO codecs, an output format string of "rle" is also recognized.
outputFormat
- the format string (lower case)public static java.io.File getCompressedFrameAsFile(AttributeList list, java.awt.image.BufferedImage renderedImage, java.lang.String outputFormat, java.io.File tmpFrameFile) throws java.io.IOException, java.io.FileNotFoundException, DicomException
Compress the supplied frame.
list
- the AttributeList from which the frame was extractedrenderedImage
- the frame as an imageoutputFormat
- the compression format to use [jpeg2000|jpeg-lossless|jpeg-ls|rle]tmpFrameFile
- the file to write the compressed bit stream tojava.io.IOException
- if there is an error writing the filejava.io.FileNotFoundException
- if the supplied file path cannot be foundDicomException
- if the image cannot be compressed