pixelmed
Public Member Functions | List of all members
com.pixelmed.codec.jpeg.EntropyCodedSegment Class Reference

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
 
 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
 

Detailed Description

A JPEG Entropy Coded Segment.

Development of this class was supported by funding from MDDX Research and Informatics.

Author
dclunie

Definition at line 23 of file EntropyCodedSegment copy.java.

Constructor & Destructor Documentation

◆ EntropyCodedSegment() [1/2]

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.

Parameters
sosSOS marker segment contents
sofSOF marker segment contents
htByClassAndIdentiferHuffman tables
qtByIdentiferquantization tables
nMCUHorizontallythe number of MCUs in a single row
redactionShapesa Vector of Shape that are Rectangle
copyingtrue if copying
dumpingtrue if dumping
decompressingtrue if decompressing
decompressedOutputthe decompressed output (with specified or default endianness if precision > 8)
Exceptions
Exceptionif JPEG process not supported

Definition at line 286 of file EntropyCodedSegment copy.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(), and com.pixelmed.codec.jpeg.Markers.isLossless().

Here is the call graph for this function:

◆ EntropyCodedSegment() [2/2]

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.

Parameters
sosSOS marker segment contents
sofSOF marker segment contents
htByClassAndIdentiferHuffman tables
qtByIdentiferquantization tables
nMCUHorizontallythe number of MCUs in a single row
redactionShapesa Vector of Shape that are Rectangle
copyingtrue if copying
dumpingtrue if dumping
decompressingtrue if decompressing
decompressedOutputthe decompressed output (with specified or default endianness if precision > 8)
Exceptions
Exceptionif JPEG process not supported

Definition at line 286 of file EntropyCodedSegment.java.

References com.pixelmed.codec.jpeg.Markers.getAbbreviation(), com.pixelmed.codec.jpeg.Markers.getDescription(), com.pixelmed.codec.jpeg.Markers.isDCT(), com.pixelmed.codec.jpeg.Markers.isHuffman(), and com.pixelmed.codec.jpeg.Markers.isLossless().

Here is the call graph for this function:

Member Function Documentation

◆ finish() [1/2]

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.

Parameters
bytesToDecompressthe bytes in the EntropyCodedSeqment
mcuCountthe number of MCUs encoded by this EntropyCodedSeqment
mcuOffsetthe number of MCUs that have previously been read for the frame containing this EntropyCodedSeqment
Returns
the bytes in a copy of the EntropyCodedSeqment appropriately redacted
Exceptions
Exceptionif bad things happen parsing the EntropyCodedSeqment, like running out of bits, caused by malformed input
IOExceptionif bad things happen reading or writing the bytes

Definition at line 616 of file EntropyCodedSegment copy.java.

Referenced by com.pixelmed.codec.jpeg.Parse.parse().

Here is the caller graph for this function:

◆ finish() [2/2]

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.

Parameters
bytesToDecompressthe bytes in the EntropyCodedSeqment
mcuCountthe number of MCUs encoded by this EntropyCodedSeqment
mcuOffsetthe number of MCUs that have previously been read for the frame containing this EntropyCodedSeqment
Returns
the bytes in a copy of the EntropyCodedSeqment appropriately redacted
Exceptions
Exceptionif bad things happen parsing the EntropyCodedSeqment, like running out of bits, caused by malformed input
IOExceptionif bad things happen reading or writing the bytes

Definition at line 650 of file EntropyCodedSegment.java.