Class for encoding and decoding a JPEG2000 raster image More...
#include <Inventor/image/SoJP2ImageRW.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoJP2ImageRW () | |
virtual | ~SoJP2ImageRW () |
virtual SbBool | open (SoRasterImageIO *rasterImageIO, OpenMode openMode) |
virtual SbBool | write (SbRasterImage *rasterImage, unsigned int xPos=0, unsigned int yPos=0) |
virtual SbBool | read (SbRasterImage *rasterImage, SbBool infoOnly=FALSE) |
virtual SbBool | readRegion (SbRasterImage *rasterImage, const SbBox2i32 ®ion) |
virtual SbBool | isMultipleBufferInverted () const |
virtual SoRasterImageRW::WriteCapability | getWriteCapability () const |
virtual SoRasterImageRW::ReadCapability | getReadCapability () const |
void | setOutputQuality (float quality) |
float | getOutputQuality () const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
This class is used for encoding and decoding a JPEG2000 raster image. This class also support reading of ECW and ECWP file format.
The writeCapability is WRITE_FULL_IMAGE and isMultipleBufferInverted is FALSE.
See SoRasterImageRW for more information and code examples.
SoRasterImageFile, SoRasterImageRW, SbRasterImage
SoJP2ImageRW::SoJP2ImageRW | ( | ) |
Constructor.
virtual SoJP2ImageRW::~SoJP2ImageRW | ( | ) | [virtual] |
Destructor.
static SoType SoJP2ImageRW::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoRasterImageRW.
float SoJP2ImageRW::getOutputQuality | ( | ) | const |
Returns the output quality.
virtual SoRasterImageRW::ReadCapability SoJP2ImageRW::getReadCapability | ( | ) | const [virtual] |
Returns the read capability of the raster format.
Reimplemented from SoRasterImageRW.
virtual SoType SoJP2ImageRW::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Implements SoRasterImageRW.
virtual SoRasterImageRW::WriteCapability SoJP2ImageRW::getWriteCapability | ( | ) | const [virtual] |
Returns the write capability of the raster format.
Reimplemented from SoRasterImageRW.
virtual SbBool SoJP2ImageRW::isMultipleBufferInverted | ( | ) | const [virtual] |
Returns the write direction when using multiple buffers.
Returns FALSE if buffers are written from top to bottom. Returns TRUE if buffers are written from bottom to top.
Reimplemented from SoRasterImageRW.
virtual SbBool SoJP2ImageRW::open | ( | SoRasterImageIO * | rasterImageIO, | |
OpenMode | openMode | |||
) | [virtual] |
Opens the reader/writer in the specified open mode.
Returns true if successful.
Reimplemented from SoRasterImageRW.
virtual SbBool SoJP2ImageRW::read | ( | SbRasterImage * | rasterImage, | |
SbBool | infoOnly = FALSE | |||
) | [virtual] |
Read the current open image into rasterImage.
Returns true if successful. Call the open() method before calling this method.
If infoOnly is TRUE, then the buffer will not be read; the parameter rasterImage will be set with raster size and raster number of components, the buffer will be NULL.
Implements SoRasterImageRW.
virtual SbBool SoJP2ImageRW::readRegion | ( | SbRasterImage * | rasterImage, | |
const SbBox2i32 & | region | |||
) | [virtual] |
Read the specified region of current open image into rasterImage.
Returns true if successful. Call the open() method before calling this method.
After calling this method successfully, the size of the SbRasterImage is the requested region size. The requested region may extend outside the source image. In this case, undefined pixels are set to zero. The region may be as small as a single pixel, e.g. (1,1,1,1), but xmin must be <= xmax and ymin <= ymax.
Reimplemented from SoRasterImageRW.
void SoJP2ImageRW::setOutputQuality | ( | float | quality | ) |
Sets the output quality of the image, from 0.0 (lowest quality) to 1.0 (highest quality).
Default is 0.7
virtual SbBool SoJP2ImageRW::write | ( | SbRasterImage * | rasterImage, | |
unsigned int | xPos = 0 , |
|||
unsigned int | yPos = 0 | |||
) | [virtual] |
Writes and encodes the given data in this specific format.
If you are using the multiple writing mode, then you can specify the offset (with xPos,yPos) you want to write to.
Implements SoRasterImageRW.