42 int mult = (type == Isis::UnsignedByte) ? 1 : 2;
45 for (
int i = 0; i <
bands(); i++)
59 QString compression) {
83 ((
unsigned char *)
m_buffer[b])[s] = (
unsigned char) dn;
86 ((
short int *)
m_buffer[b])[s] = (
short int) dn;
89 ((
short unsigned int *)
m_buffer[b])[s] = (
short unsigned int) dn;
93 "Invalid pixel type for data [" +
toString(type) +
"]",
106 if (type == Isis::UnsignedByte)
121 return format ==
"jp2";
QString extension() const
Gets the extension for the output image.
File name manipulation and expansion.
char ** m_buffer
Two dimensional array containing all color channels for a line.
int bands() const
Number of bands (channels) in the output image.
virtual void setBuffer(int s, int b, int dn) const
Set the DN value at the given sample and band of the line buffer.
JP2Encoder * m_encoder
Object responsible for writing data to the output image.
FileName addExtension(const QString &extension) const
Adds a new extension to the file name.
int samples() const
Number of samples (columns) in the output image.
PixelType pixelType() const
Returns the pixel type.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
This error is for when a programmer made an API call that was illegal.
virtual void createBuffer()
Creates the buffer to store a chunk of streamed line data with one or more bands. ...
void setExtension(QString extension)
Sets the extension for the output image and generates the extension for the world file from it...
PixelType
Enumerations for Isis Pixel Types.
virtual void writeLine(int l) const
Writes a line of buffered data to the output image on disk.
void OpenFile()
Open the JPEG2000 file and initialize it.
virtual ~JP2Exporter()
Destruct the exporter.
void Write(unsigned char **inbuf)
Write 8-bit data to JP2 file.
#define _FILEINFO_
Macro for the filename and line number.
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
int lines() const
Number of lines (rows) in the output image.
static bool canWriteFormat(QString format)
Returns true if the format is "jp2".
virtual void write(FileName outputName, int quality=100, QString compression="none")
Export the Isis cube channels to the given standard image.
Namespace for ISIS/Bullet specific routines.
Exports cubes into a standard format in incremental pieces.
virtual void write(FileName outputName, int quality=100, QString compression="none")
Initialize the encoder, open the output file for writing, then let the base ImageExporter handle the ...
JP2Exporter()
Construct the JPEG 2000 exporter.