|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Client.ClientLogicalTarget.JPEG2000.JPEG2KDecoder
public class JPEG2KDecoder
This class implements the JPEG2000 decoder engine.
If this class has to be called to decode several WOIs of the same image,
this class is ready to be called without destroing and creating a new
object. It is more efficient to create the object and call necessary times
to the decode(ViewWindowField, Hashtable, Hashtable) method. In
this case, the three-dimensional array returned by the
decode(ViewWindowField, Hashtable, Hashtable) method with the
decompresed WOI cannot be destroied because it will be re-used in the
next call.
Usage example:
constructor
decode
| Field Summary | |
|---|---|
private int[][] |
blocksPerPrecinctHeights
Definition in GenerateImageStructure.blocksPerPrecinctHeights |
private int[][] |
blocksPerPrecinctWidths
Definition in GenerateImageStructure.blocksPerPrecinctWidths |
private int[] |
componentIndexes
Is an one-dimensional array with the component indexes which belong to the WOI. |
private float[][][] |
imageSamplesFloat
Temporal structure. |
private int[][][] |
imageSamplesInt
Temporal structure. |
private long |
initStageTime
Used for verbose information (time for stage). |
private long |
initTime
Used for verbose information (total time). |
private JPCParameters |
jpcParameters
Definition in JPEG2KLogicalTarget.jpcParameters. |
private java.util.Hashtable<java.lang.Long,ByteStream[][][][]> |
precinctsByteStreams
Definition in JPEG2KLogicalTarget.precinctsByteStreams. |
private static float |
Q_RECONSTRUCTION
Reconstruction parameter used to adjust better the dequantitzation process (when QTypes == 1). |
private int[] |
QComponentsBits
Definition in SIZParameters.precision |
private static int |
RC_TYPE
Range type to apply. |
private ViewWindowField |
viewWindow
Definition in JPEG2KLogicalTarget.viewWindow. |
private int[] |
WTLevels
Definition in CODParameters.WTLevels |
private int[] |
WTTypes
Definition in CODParameters.WTTypes |
private java.util.Hashtable<java.lang.Long,int[][][]> |
zeroBitPlanes
Definition in JPEG2KLogicalTarget.zeroBitPlanes. |
private int |
zSize
Definition in SIZParameters.zSize |
| Constructor Summary | |
|---|---|
JPEG2KDecoder(JPCParameters jpcParameters,
int[][] blocksPerPrecinctWidths,
int[][] blocksPerPrecinctHeights)
Constructor. |
|
| Method Summary | |
|---|---|
float[][][] |
decode(ViewWindowField viewWindow,
java.util.Hashtable<java.lang.Long,ByteStream[][][][]> precinctsByteStreams,
java.util.Hashtable<java.lang.Long,int[][][]> zeroBitPlanes)
Decodes the WOI. |
private int[] |
getRelevantComponents(int[][] comps)
Calculates which are the necessary components to invert a multiple component transformation. |
void |
list(java.io.PrintStream out)
Prints this JPEG2K Decoder fields out to the specified output stream. |
private float[][][] |
run()
Performs the WOI decoding. |
private void |
setParameters(ViewWindowField viewWindow,
java.util.Hashtable<java.lang.Long,ByteStream[][][][]> precinctsByteStreams,
java.util.Hashtable<java.lang.Long,int[][][]> zeroBitPlanes)
Sets the parameters to decode the WOI. |
private void |
showDecodedImage()
For debugging purposes. |
private void |
showDequantizedImage()
|
private void |
showDetransformedImage()
For debugging purposes. |
private void |
showTimeMemory(java.lang.String stage)
Show some time and memory usage statisticals. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private JPCParameters jpcParameters
JPEG2KLogicalTarget.jpcParameters.
private int[][] blocksPerPrecinctWidths
GenerateImageStructure.blocksPerPrecinctWidths
private int[][] blocksPerPrecinctHeights
GenerateImageStructure.blocksPerPrecinctHeights
private ViewWindowField viewWindow
JPEG2KLogicalTarget.viewWindow.
private java.util.Hashtable<java.lang.Long,ByteStream[][][][]> precinctsByteStreams
JPEG2KLogicalTarget.precinctsByteStreams.
private java.util.Hashtable<java.lang.Long,int[][][]> zeroBitPlanes
JPEG2KLogicalTarget.zeroBitPlanes.
private static final float Q_RECONSTRUCTION
Recommened values between 0 to 1.
private static final int RC_TYPE
Valid values are:
private int zSize
SIZParameters.zSize
private int[] componentIndexes
private int[] WTTypes
CODParameters.WTTypes
private int[] WTLevels
CODParameters.WTLevels
private int[] QComponentsBits
SIZParameters.precision
private float[][][] imageSamplesFloat
private int[][][] imageSamplesInt
private long initStageTime
0 is initial time.
private long initTime
0 is initial time.
| Constructor Detail |
|---|
public JPEG2KDecoder(JPCParameters jpcParameters,
int[][] blocksPerPrecinctWidths,
int[][] blocksPerPrecinctHeights)
jpcParameters - definition in jpcParameters.blocksPerPrecinctWidths - definition in blocksPerPrecinctWidths.blocksPerPrecinctHeights - definition in blocksPerPrecinctHeights.| Method Detail |
|---|
public float[][][] decode(ViewWindowField viewWindow,
java.util.Hashtable<java.lang.Long,ByteStream[][][][]> precinctsByteStreams,
java.util.Hashtable<java.lang.Long,int[][][]> zeroBitPlanes)
throws ErrorException
viewWindow - definition in viewWindow.precinctsByteStreams - definition in precinctsByteStreams.zeroBitPlanes - definition in zeroBitPlanes.
imageSamplesFloat.
ErrorException - when a error has been found in an stage of the
JPEG2000 decoding process.public java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.
private void setParameters(ViewWindowField viewWindow,
java.util.Hashtable<java.lang.Long,ByteStream[][][][]> precinctsByteStreams,
java.util.Hashtable<java.lang.Long,int[][][]> zeroBitPlanes)
viewWindow - definition in viewWindow.precinctsByteStreams - definition in precinctsByteStreams.zeroBitPlanes - definition in zeroBitPlanes.
private float[][][] run()
throws ErrorException
imageSamplesFloat.
ErrorException - when an error has been ocurred in an stage of
the JPEG2000 decoding process.
private int[] getRelevantComponents(int[][] comps)
throws ErrorException
ErrorExceptionprivate void showTimeMemory(java.lang.String stage)
stage - string that will be displayedprivate void showDequantizedImage()
private void showDetransformedImage()
private void showDecodedImage()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||