|
Isis 3.0 Object Programmers' Reference |
Home |
JPEG2000 encoder class. More...
#include <JP2Encoder.h>

Public Member Functions | |
| JP2Encoder (const QString &jp2file, const unsigned int nsamps, const unsigned int nlines, const unsigned int nbands, const Isis::PixelType type) | |
| Constructs a JPEG2000 encoder object. | |
| ~JP2Encoder () | |
| JP2Encoder destructor. | |
| JP2Error * | kakadu_error () const |
| void | OpenFile () |
| Open the JPEG2000 file and initialize it. | |
| void | Write (unsigned char **inbuf) |
| Write 8-bit data to JP2 file. | |
| void | Write (short int **inbuf) |
| Write 16-bit data to JP2 file. | |
Private Attributes | |
| QString | p_jp2File |
| Output file name. | |
| unsigned int | p_sampleDimension |
| Sample dimension of output file. | |
| unsigned int | p_lineDimension |
| Line dimension of output file. | |
| unsigned int | p_bandDimension |
| Band dimension of output file. | |
| unsigned int | p_resolutionLevels |
| Number of resolution levels used to make output file. | |
| std::string | p_progressionOrder |
| Progression order used to create output file. | |
| unsigned int | p_codeBlockSize |
| Code block size used to create output file. | |
| bool | p_signedData |
| Determines if output file will contain signed/unsigned <data. | |
| unsigned int | p_tileSizeWidth |
| Width of tiles used to create output file. | |
| unsigned int | p_tileSizeHeight |
| Height of tiles used to create output file. | |
| std::vector< unsigned int > | p_precinctSize |
| Precinct size(s) used to create output file. | |
| unsigned int | p_pixelBits |
| Number of bits per pixel used to create output file. | |
| unsigned int | p_pixelBytes |
| Number of bytes per pixel used to create output file. | |
| int | p_flushLines |
| Number of lines to store in memory before flushing the <buffer that is written to the codestream. | |
| bool | p_writeStripes |
| Number of lines written per call to Write methods. | |
| int * | p_stripeHeights |
| Determines the number of lines to be written at a time <to the codestream. | |
| int * | p_maxStripeHeights |
| Determines the maximum number of lines that can be <written at a time to the codestream. | |
| int * | p_precisions |
| Determines bit precision of each band in the output <JP2 file. | |
| bool * | p_isSigned |
| Determines if the data is signed/unsigned for each <band in the JP2 file. | |
| JP2Error * | Kakadu_Error |
| JP2 Error handling facility. | |
JPEG2000 encoder class.
This class is used to convert image data into JPEG2000 format.
Here is an example of how to use JP2Encoder
char **jp2buf; ProcessExport p; Cube *icube; JP2Encoder *JP2_encoder; icube = p.SetInputCube("FROM",Isis::OneBand); p.SetInputRange(); p.SetFormat(ProcessExport::BIL); jp2buf = new char* [1]; jp2buf[0] = new char[icube->Samples()]; p.SetOutputType(Isis::UnsignedByte); p.SetOutputRange(1.0,255.0); p.SetOutputNull(0.0); JP2_encoder = new JP2Encoder(ui.GetFileName("TO"),icube->Samples(), icube->Lines(),icube->Bands(),Isis::UnsignedByte); JP2_encoder->OpenFile(); p.StartProcess(toJP2); p.EndProcess(); delete JP2_encoder;
If you would like to see JP2Encoder being used in implementation, see isis2std.cpp
For internal use only.
Definition at line 80 of file JP2Encoder.h.
| Isis::JP2Encoder::JP2Encoder | ( | const QString & | jp2file, | |
| const unsigned int | nsamps, | |||
| const unsigned int | nlines, | |||
| const unsigned int | nbands, | |||
| const Isis::PixelType | type | |||
| ) |
Constructs a JPEG2000 encoder object.
| jp2file | Name of file where the encoded JP2 data will be stored. | |
| nsamps | Sample dimension of image that will be encoded. | |
| nlines | Line dimension of image that will be encoded. | |
| nbands | Band dimension of image that will be encoded. | |
| type | Pixel type of data that will be encoded. |
Definition at line 46 of file JP2Encoder.cpp.
References _FILEINFO_, Kakadu_Error, p_bandDimension, p_codeBlockSize, p_jp2File, p_lineDimension, p_pixelBits, p_pixelBytes, p_precinctSize, p_progressionOrder, p_resolutionLevels, p_sampleDimension, p_signedData, p_tileSizeHeight, p_tileSizeWidth, and Isis::IException::Programmer.
| Isis::JP2Encoder::~JP2Encoder | ( | ) |
JP2Encoder destructor.
Definition at line 296 of file JP2Encoder.cpp.
References p_isSigned, p_maxStripeHeights, p_precisions, and p_stripeHeights.
| void Isis::JP2Encoder::OpenFile | ( | ) |
Open the JPEG2000 file and initialize it.
Definition at line 118 of file JP2Encoder.cpp.
References p_bandDimension, p_codeBlockSize, p_flushLines, p_isSigned, p_jp2File, p_lineDimension, p_maxStripeHeights, p_pixelBits, p_pixelBytes, p_precinctSize, p_precisions, p_progressionOrder, p_resolutionLevels, p_sampleDimension, p_signedData, p_stripeHeights, p_tileSizeHeight, p_tileSizeWidth, and size.
Referenced by Isis::JP2Exporter::write().
| void Isis::JP2Encoder::Write | ( | short int ** | inbuf | ) |
Write 16-bit data to JP2 file.
| inbuf | The array of pointers to byte buffers that will be used to write out the image data. One byte buffer is required for each band in the image. Kakadu writes in a BIL manner. |
Definition at line 285 of file JP2Encoder.cpp.
References p_flushLines, p_isSigned, p_precisions, p_stripeHeights, and p_writeStripes.
| void Isis::JP2Encoder::Write | ( | unsigned char ** | inbuf | ) |
Write 8-bit data to JP2 file.
| inbuf | The array of pointers to byte buffers that will be used to write out the image data. One byte buffer is required for each band in the image. Kakadu writes in a BIL manner. |
Definition at line 270 of file JP2Encoder.cpp.
References p_flushLines, p_precisions, p_stripeHeights, and p_writeStripes.
Referenced by Isis::JP2Exporter::writeLine().
JP2Error* Isis::JP2Encoder::Kakadu_Error [private] |
JP2 Error handling facility.
Definition at line 128 of file JP2Encoder.h.
Referenced by JP2Encoder().
unsigned int Isis::JP2Encoder::p_bandDimension [private] |
Band dimension of output file.
Definition at line 105 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
unsigned int Isis::JP2Encoder::p_codeBlockSize [private] |
Code block size used to create output file.
Definition at line 108 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
int Isis::JP2Encoder::p_flushLines [private] |
Number of lines to store in memory before flushing the <buffer that is written to the codestream.
Definition at line 116 of file JP2Encoder.h.
Referenced by OpenFile(), and Write().
bool* Isis::JP2Encoder::p_isSigned [private] |
Determines if the data is signed/unsigned for each <band in the JP2 file.
Definition at line 125 of file JP2Encoder.h.
Referenced by OpenFile(), Write(), and ~JP2Encoder().
QString Isis::JP2Encoder::p_jp2File [private] |
Output file name.
Definition at line 102 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
unsigned int Isis::JP2Encoder::p_lineDimension [private] |
Line dimension of output file.
Definition at line 104 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
int* Isis::JP2Encoder::p_maxStripeHeights [private] |
Determines the maximum number of lines that can be <written at a time to the codestream.
Definition at line 121 of file JP2Encoder.h.
Referenced by OpenFile(), and ~JP2Encoder().
unsigned int Isis::JP2Encoder::p_pixelBits [private] |
Number of bits per pixel used to create output file.
Definition at line 114 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
unsigned int Isis::JP2Encoder::p_pixelBytes [private] |
Number of bytes per pixel used to create output file.
Definition at line 115 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
std::vector<unsigned int> Isis::JP2Encoder::p_precinctSize [private] |
Precinct size(s) used to create output file.
Definition at line 113 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
int* Isis::JP2Encoder::p_precisions [private] |
Determines bit precision of each band in the output <JP2 file.
Definition at line 123 of file JP2Encoder.h.
Referenced by OpenFile(), Write(), and ~JP2Encoder().
std::string Isis::JP2Encoder::p_progressionOrder [private] |
Progression order used to create output file.
Definition at line 107 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
unsigned int Isis::JP2Encoder::p_resolutionLevels [private] |
Number of resolution levels used to make output file.
Definition at line 106 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
unsigned int Isis::JP2Encoder::p_sampleDimension [private] |
Sample dimension of output file.
Definition at line 103 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
bool Isis::JP2Encoder::p_signedData [private] |
Determines if output file will contain signed/unsigned <data.
Definition at line 109 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
int* Isis::JP2Encoder::p_stripeHeights [private] |
Determines the number of lines to be written at a time <to the codestream.
Definition at line 119 of file JP2Encoder.h.
Referenced by OpenFile(), Write(), and ~JP2Encoder().
unsigned int Isis::JP2Encoder::p_tileSizeHeight [private] |
Height of tiles used to create output file.
Definition at line 112 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
unsigned int Isis::JP2Encoder::p_tileSizeWidth [private] |
Width of tiles used to create output file.
Definition at line 111 of file JP2Encoder.h.
Referenced by JP2Encoder(), and OpenFile().
bool Isis::JP2Encoder::p_writeStripes [private] |
Number of lines written per call to Write methods.
Definition at line 118 of file JP2Encoder.h.
Referenced by Write().