pixelmed
|
Public Member Functions | |
EntropyCodedSegment (MarkerSegmentSOS sos, MarkerSegmentSOF sof, Map< String, HuffmanTable > htByClassAndIdentifer, Map< String, QuantizationTable > qtByIdentifer, int nMCUHorizontally, Vector< Shape > redactionShapes, boolean copying, boolean dumping, boolean decompressing, Parse.DecompressedOutput decompressedOutput) throws Exception | |
final byte [] | finish (byte[] bytesToDecompress, int mcuCount, int mcuOffset) throws Exception, IOException |
A JPEG Entropy Coded Segment.
Development of this class was supported by funding from MDDX Research and Informatics.
Definition at line 23 of file EntropyCodedSegment.java.
com.pixelmed.codec.jpeg.EntropyCodedSegment.EntropyCodedSegment | ( | MarkerSegmentSOS | sos, |
MarkerSegmentSOF | sof, | ||
Map< String, HuffmanTable > | htByClassAndIdentifer, | ||
Map< String, QuantizationTable > | qtByIdentifer, | ||
int | nMCUHorizontally, | ||
Vector< Shape > | redactionShapes, | ||
boolean | copying, | ||
boolean | dumping, | ||
boolean | decompressing, | ||
Parse.DecompressedOutput | decompressedOutput | ||
) | throws Exception |
Set up the environment to decode an EntropyCodedSeqment to dump, redact or copy as required.
sos | SOS marker segment contents |
sof | SOF marker segment contents |
htByClassAndIdentifer | Huffman tables |
qtByIdentifer | quantization tables |
nMCUHorizontally | the number of MCUs in a single row |
redactionShapes | a Vector of Shape that are Rectangle |
copying | true if copying |
dumping | true if dumping |
decompressing | true if decompressing |
decompressedOutput | the decompressed output (with specified or default endianness if precision > 8) |
Exception | if JPEG process not supported |
Definition at line 251 of file EntropyCodedSegment.java.
References com.pixelmed.codec.jpeg.Markers.getAbbreviation(), com.pixelmed.codec.jpeg.MarkerSegmentSOS.getACEntropyCodingTableSelector(), com.pixelmed.codec.jpeg.MarkerSegmentSOS.getDCEntropyCodingTableSelector(), com.pixelmed.codec.jpeg.Markers.getDescription(), com.pixelmed.codec.jpeg.MarkerSegmentSOF.getHorizontalSamplingFactor(), com.pixelmed.codec.jpeg.MarkerSegmentSOF.getMarker(), com.pixelmed.codec.jpeg.MarkerSegmentSOS.getNComponentsPerScan(), com.pixelmed.codec.jpeg.MarkerSegmentSOF.getNSamplesPerLine(), com.pixelmed.codec.jpeg.MarkerSegmentSOF.getSamplePrecision(), com.pixelmed.codec.jpeg.MarkerSegmentSOS.getStartOfSpectralOrPredictorSelection(), com.pixelmed.codec.jpeg.MarkerSegmentSOS.getSuccessiveApproximationBitPositionLowOrPointTransform(), com.pixelmed.codec.jpeg.MarkerSegmentSOF.getVerticalSamplingFactor(), com.pixelmed.codec.jpeg.Markers.isDCT(), com.pixelmed.codec.jpeg.Markers.isHuffman(), com.pixelmed.codec.jpeg.Markers.isLossless(), com.pixelmed.codec.jpeg.OutputArrayOrStream.writeByte(), and com.pixelmed.codec.jpeg.OutputArrayOrStream.writeShort().
final byte [] com.pixelmed.codec.jpeg.EntropyCodedSegment.finish | ( | byte [] | bytesToDecompress, |
int | mcuCount, | ||
int | mcuOffset | ||
) | throws Exception, IOException |
Decode the supplied bytes that comprise a complete EntropyCodedSeqment and redact or copy them as required.
bytesToDecompress | the bytes in the EntropyCodedSeqment |
mcuCount | the number of MCUs encoded by this EntropyCodedSeqment |
mcuOffset | the number of MCUs that have previously been read for the frame containing this EntropyCodedSeqment |
Exception | if bad things happen parsing the EntropyCodedSeqment, like running out of bits, caused by malformed input |
IOException | if bad things happen reading or writing the bytes |
Definition at line 544 of file EntropyCodedSegment.java.
Referenced by com.pixelmed.codec.jpeg.Parse.parse().