|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthabibviewer.jpeg2000.Decoder
public class Decoder
This class is alteration of the main class of JJ2000's decoder. It instantiates all objects and performs the decoding operations. It then writes the image to the output file or displays it.
First the decoder should be initialized with a input file name and loading parameters given through the constructor. When the run() method is invoked the decoder executes. The exit code of the class can be obtained with the getExitCode() method, after the constructor and after the run method. A non-zero value indicates that an error has ocurred.
The decoding chain corresponds to the following sequence of modules:
The behaviour of each module may be modified according to the current tile-component. All the specifications are kept in modules extending ModuleSpec and accessible through an instance of DecoderSpecs class.
BitstreamReaderAgent
,
EntropyDecoder
,
ROIDeScaler
,
Dequantizer
,
InverseWT
,
ImgDataConverter
,
InvCompTransf
,
BlkImgDataSrcImageProducer
,
ModuleSpec
,
DecoderSpecs
Field Summary | |
---|---|
jj2000.j2k.image.BlkImgDataSrc |
decodedImage
Decoded image |
java.lang.String |
errorMessage
Error output stream |
int |
nCompCod
Number of Components in codestream |
int |
nLayers
Number of layers |
int |
nTiles
Number of tiles |
int |
reconstructedImageHeight
Reconstructed image height |
int |
reconstructedImageWidth
Reconstructed image width |
int |
reconstructedResolutionLevel
Reconstructed resolution level |
float |
targetBitrate
Target bitrate |
int |
targetImageHeight
Target image height |
int |
targetImageWidth
Target image width |
int |
targetResolutionLevel
Target resolution level |
int |
tileHeight
Tile height |
int |
tileWidth
Tile width |
Constructor Summary | |
---|---|
Decoder(jj2000.disp.ImgScrollPane isp,
java.lang.String inputFile,
float rate,
int nbytes,
int layers,
int bitplanes,
int codeblocks)
Instantiates a decoder object, with the input file name string given as argument, a component where to display the image and decoding parameters, like target bitrate, number of layers, number of bit planes and number of code blocks. |
Method Summary | |
---|---|
java.lang.String[] |
getCOMInfo()
Return the information found in the COM marker segments encountered in the decoded codestream. |
int |
getExitCode()
Returns the exit code of the class. |
void |
run()
Runs the decoder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String errorMessage
public jj2000.j2k.image.BlkImgDataSrc decodedImage
public int nLayers
public int nCompCod
public int nTiles
public int targetImageWidth
public int targetImageHeight
public int tileWidth
public int tileHeight
public int reconstructedResolutionLevel
public int targetResolutionLevel
public int reconstructedImageWidth
public int reconstructedImageHeight
public float targetBitrate
Constructor Detail |
---|
public Decoder(jj2000.disp.ImgScrollPane isp, java.lang.String inputFile, float rate, int nbytes, int layers, int bitplanes, int codeblocks)
isp
- The component where the image is to be displayedinputFile
- Name of the input filerate
- Decoding rate in bits per pixelnbytes
- Decoding rate in byteslayers
- Maximum number of layers to decode for any code-blockbitplanes
- Maximum number of bit planes to decode for any code-blockcodeblocks
- Maximum number of code-blocksMethod Detail |
---|
public int getExitCode()
public void run()
run
in interface java.lang.Runnable
getExitCode()
public java.lang.String[] getCOMInfo()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |