public class JPEG2KDecoder
extends java.lang.Object
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
Modifier and Type | Field and Description |
---|---|
private BlockDecodeState |
bdState |
private ClientJPEG2KCodestream |
codestream |
private int[] |
componentIndexes
Is an one-dimensional array with the component indexes which belong to
the WOI.
|
private Dequantization |
dequantization |
private ImageBuild |
imageBuild |
private float[][][] |
imageSamplesFloat
Temporal structure.
|
private long |
initStageTime
Used for verbose information (time for stage).
|
private long |
initTime
Used for verbose information (total time).
|
private InverseWaveletTransform |
iwt |
private LevelUnshift |
lu |
private int |
numThreads
Number of threads to be used in the decoding process.
|
private RangeRecovery |
rangeRecovery |
private RangeCheck |
rc |
private static int |
RC_TYPE
Range type to apply.
|
private ClientJPEG2KTile |
tileObj |
private ViewWindowField |
viewWindow
Definition in
CADI.Client.ClientLogicalTarget.JPEG2000.JPEG2KLogicalTarget#viewWindow . |
Constructor and Description |
---|
JPEG2KDecoder(ClientJPEG2KCodestream codestream)
Constructor.
|
JPEG2KDecoder(ClientJPEG2KCodestream codestream,
int numThreads)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
float[][][] |
decode(ViewWindowField viewWindow)
Decodes the
viewWindow Windof of Interest. |
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 |
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 statistics.
|
java.lang.String |
toString() |
private ClientJPEG2KCodestream codestream
private ClientJPEG2KTile tileObj
private ViewWindowField viewWindow
CADI.Client.ClientLogicalTarget.JPEG2000.JPEG2KLogicalTarget#viewWindow
.private int numThreads
Only positive values are allowed.
A negative value means the number of threads to be used is the number core processors.
private BlockDecodeState bdState
private ImageBuild imageBuild
private Dequantization dequantization
private InverseWaveletTransform iwt
private RangeRecovery rangeRecovery
private LevelUnshift lu
private RangeCheck rc
private static final int RC_TYPE
Valid values are:
private int[] componentIndexes
private float[][][] imageSamplesFloat
private long initStageTime
0 is initial time.
private long initTime
0 is initial time.
public JPEG2KDecoder(ClientJPEG2KCodestream codestream)
codestream
- public JPEG2KDecoder(ClientJPEG2KCodestream codestream, int numThreads)
codestream
- definition in codestream
.numThreads
- definition in numThreads
.public float[][][] decode(ViewWindowField viewWindow) throws ErrorException
viewWindow
Windof of Interest.viewWindow
- definition in viewWindow
.precinctStreams
- definition in #precinctStreams
.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.Object
public void list(java.io.PrintStream out)
out
- an output stream.private float[][][] run() throws ErrorException
imageSamplesFloat
.ErrorException
- when an error has been occurred in an stage of
the JPEG2000 decoding process.private void showTimeMemory(java.lang.String stage)
stage
- string that will be displayedprivate void showDequantizedImage()
private void showDetransformedImage()
private void showDecodedImage()
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)