Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis Developer Reference
Isis::JP2Encoder Class Reference

JPEG2000 encoder class. More...

#include <JP2Encoder.h>

Collaboration diagram for Isis::JP2Encoder:
Collaboration graph

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.
 
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.
 

Detailed Description

JPEG2000 encoder class.

This class is used to convert image data into JPEG2000 format with GDAL (OpenJPEG backend).

Author
2009-01-11 Janet Barrett

Constructor & Destructor Documentation

◆ JP2Encoder()

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.

Parameters
jp2fileName of file where the encoded JP2 data will be stored.
nsampsSample dimension of image that will be encoded.
nlinesLine dimension of image that will be encoded.
nbandsBand dimension of image that will be encoded.
typePixel type of data that will be encoded.

◆ ~JP2Encoder()

Isis::JP2Encoder::~JP2Encoder ( )

JP2Encoder destructor.

Converts the temporary GeoTIFF to JP2 via GDAL CreateCopy, then removes the temp file.

Member Function Documentation

◆ OpenFile()

void Isis::JP2Encoder::OpenFile ( )

Open the JPEG2000 file and initialize it.

Creates a temporary GeoTIFF for staging pixel data. The actual JP2 encoding happens in the destructor via GDAL CreateCopy.

◆ Write() [1/2]

void Isis::JP2Encoder::Write ( short int ** inbuf)

Write 16-bit data to JP2 file.

Parameters
inbufThe 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. Data is written in a BIL manner.

References Isis::toString().

◆ Write() [2/2]

void Isis::JP2Encoder::Write ( unsigned char ** inbuf)

Write 8-bit data to JP2 file.

Parameters
inbufThe 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. Data is written in a BIL manner.

References Isis::toString().


The documentation for this class was generated from the following files: