Isis 3.0 Object Programmers' Reference |
Home |
JPEG2000 decoder class. More...
#include <JP2Decoder.h>
Public Member Functions | |
JP2Decoder (const QString &jp2file) | |
Constructs a JPEG2000 decoder object. | |
~JP2Decoder () | |
JP2Decoder destructor. | |
JP2Error * | kakadu_error () const |
void | OpenFile () |
Open the JPEG2000 file. | |
int | GetSampleDimension () const |
int | GetLineDimension () const |
int | GetBandDimension () const |
int | GetPixelBytes () const |
bool | GetSignedData () const |
void | Read (unsigned char **inbuf) |
Read data from JP2 file containing 8-bit data. | |
void | Read (short int **inbuf) |
Read data from JP2 file containing 16-bit data. | |
Static Public Member Functions | |
static bool | IsJP2 (QString filename) |
Private Member Functions | |
void | SetResolutionAndRegion () |
Sets resolution of data that will be decompressed. <Also determines the image dimensions at the requested <resolution. | |
Private Attributes | |
QString | p_jp2File |
Input file name. | |
unsigned int | p_resolutionLevel |
Resolution level that file will be decompressed | |
unsigned int | p_numSamples |
Number of samples in JP2 file. | |
unsigned int | p_numLines |
Number of lines in JP2 file. | |
unsigned int | p_numBands |
Number of bands in JP2 file. | |
unsigned int | p_pixelBits |
Number of bits per pixel in JP2 file. | |
unsigned int | p_pixelBytes |
Number of bytes per pixel in JP2 file. | |
bool | p_signedData |
Set to true if data in JP2 file is signed. | |
unsigned int | p_highestResLevel |
Total number of available resolution levels in | |
int * | p_stripeHeights |
Determines how many lines are read at a time | |
int * | p_maxStripeHeights |
Determines the maximum number of lines that can | |
int * | p_precisions |
Determines the bit precision of each band in | |
bool * | p_isSigned |
Determines if the data is signed/unsigned for | |
JP2Error * | Kakadu_Error |
JP2 Error handling facility. | |
bool | p_readStripes |
Number of lines read per call to Read methods. | |
JPEG2000 decoder class.
This class is used to decode a JPEG2000 image.
Here is an example of how to use JP2Decoder
If you would like to see JP2Decoder being used in implementation, see std2isis.cpp or for a class that implements JP2Decoder, see ProcessImport
2009-12-18 Janet Barrett - Original version.
2012-04-06 Kris Becker - Fixed condition compilation where support for JP2K is disabled
Definition at line 92 of file JP2Decoder.h.
Isis::JP2Decoder::JP2Decoder | ( | const QString & | jp2file | ) |
Constructs a JPEG2000 decoder object.
jp2file | The name of the JP2 file that needs to be decoded. |
Definition at line 42 of file JP2Decoder.cpp.
References _FILEINFO_.
Isis::JP2Decoder::~JP2Decoder | ( | ) |
JP2Decoder destructor.
Definition at line 206 of file JP2Decoder.cpp.
void Isis::JP2Decoder::OpenFile | ( | ) |
Open the JPEG2000 file.
Definition at line 62 of file JP2Decoder.cpp.
References _FILEINFO_.
Referenced by Isis::JP2Importer::JP2Importer(), and Isis::ProcessImport::ProcessJp2().
void Isis::JP2Decoder::Read | ( | unsigned char ** | inbuf | ) |
Read data from JP2 file containing 8-bit data.
inbuf | The array of pointers to byte buffers that will be used to read in the image data. One byte buffer is required for each band in the image. Kakadu reads in a BIL manner. It is up to the calling routine to do the casting necessary to convert the byte data to the actual pixel type (UnsignedByte, UnsignedWord, SignedWord). |
Definition at line 178 of file JP2Decoder.cpp.
Referenced by Isis::ProcessImport::ProcessJp2(), and Isis::JP2Importer::updateRawBuffer().
void Isis::JP2Decoder::Read | ( | short int ** | inbuf | ) |
Read data from JP2 file containing 16-bit data.
inbuf | The array of pointers to byte buffers that will be used to read in the image data. One byte buffer is required for each band in the image. Kakadu reads in a BIL manner. It is up to the calling routine to do the casting necessary to convert the byte data to the actual pixel type (UnsignedByte, UnsignedWord, SignedWord). |
Definition at line 195 of file JP2Decoder.cpp.
|
private |
Sets resolution of data that will be decompressed.
<Also determines the image dimensions at the requested <resolution.
Set resolution level of the JPEG2000 file.
This class is currently set up to only read a file at full resolution.
Definition at line 155 of file JP2Decoder.cpp.
|
private |
JP2 Error handling facility.
Definition at line 167 of file JP2Decoder.h.
|
private |
Total number of available resolution levels in
<JP2 file.
Definition at line 148 of file JP2Decoder.h.
|
private |
Determines if the data is signed/unsigned for
<each band in the JP2 file.
Definition at line 156 of file JP2Decoder.h.
|
private |
Input file name.
Definition at line 139 of file JP2Decoder.h.
|
private |
Determines the maximum number of lines that can
<be read at a time from the JP2 file.
Definition at line 152 of file JP2Decoder.h.
|
private |
Number of bands in JP2 file.
Definition at line 144 of file JP2Decoder.h.
|
private |
Number of lines in JP2 file.
Definition at line 143 of file JP2Decoder.h.
|
private |
Number of samples in JP2 file.
Definition at line 142 of file JP2Decoder.h.
|
private |
Number of bits per pixel in JP2 file.
Definition at line 145 of file JP2Decoder.h.
|
private |
Number of bytes per pixel in JP2 file.
Definition at line 146 of file JP2Decoder.h.
|
private |
Determines the bit precision of each band in
<the JP2 file.
Definition at line 154 of file JP2Decoder.h.
|
private |
Number of lines read per call to Read methods.
Definition at line 168 of file JP2Decoder.h.
|
private |
Resolution level that file will be decompressed
<at. Always full resolution.
Definition at line 140 of file JP2Decoder.h.
|
private |
Set to true if data in JP2 file is signed.
Definition at line 147 of file JP2Decoder.h.
|
private |
Determines how many lines are read at a time
<from the JP2 file.
Definition at line 150 of file JP2Decoder.h.