|
MrSID Decode SDK for Raster Reference Manual 9.5.5.5244
|
image reader for JPEG 2000 images More...
#include <J2KImageReader.h>


Public Member Functions | |
| LT_STATUS | initialize (const LTFileSpec &fileSpec, bool isPersistent=true, float maxBpp=-1.0f, bool useWorldFile=true) |
| initializer More... | |
| LT_STATUS | initialize (LTIOStreamInf &stream, bool isPersistent=true, float maxBpp=-1.0f, bool useWorldFile=true) |
| initializer More... | |
precision control | |
| LT_STATUS | setParameter_Precision (lt_uint32 precision) |
| control decoder use of bits of precision More... | |
| lt_uint32 | getParameter_Precision () const |
| control decoder use of bits of precision More... | |
| lt_uint32 | getParameter_MinPrecision () const |
| control decoder use of bits of precision More... | |
| lt_uint32 | getParameter_MaxPrecision () const |
| control decoder use of bits of precision More... | |
| lt_uint32 | getParameter_DefaultPrecision () const |
| control decoder use of bits of precision More... | |
Public Member Functions inherited from LTIImageFilter | |
| lt_uint32 | getWidth () const |
| get image width More... | |
| lt_uint32 | getHeight () const |
| get image height More... | |
| LT_STATUS | getDimsAtMag (double mag, lt_uint32 &width, lt_uint32 &height) const |
| get image width and height at given magnification More... | |
| const LTIPixel & | getPixelProps () const |
| get the pixel properties of the image More... | |
| const LTIPixel * | getBackgroundPixel () const |
| get the values of the background pixel More... | |
| const LTIPixel * | getNoDataPixel () const |
| get the values of the "no data" (transparency) pixel More... | |
| const LTIPixelLookupTable * | getPixelLookupTable () const |
| get the color lookup table, if any More... | |
| const LTIPixel & | getMinDynamicRange () const |
| get the minimum dynamic range value of image More... | |
| const LTIPixel & | getMaxDynamicRange () const |
| get the maximum dynamic range value of image More... | |
| const LTIGeoCoord & | getGeoCoord () const |
| get the geographic coordinates of the image More... | |
| bool | isGeoCoordImplicit () const |
| is geo information "real" or not More... | |
| const LTIMetadataDatabase & | getMetadata () const |
| get the metadata associated with the image More... | |
| double | getMinMagnification () const |
| get the minimum magnification More... | |
| double | getMaxMagnification () const |
| get the maximum magnification More... | |
| bool | isSelective () const |
| check if image supports "random access" decoding More... | |
| lt_uint32 | getModifications (const LTIScene &scene) const |
| get the modification bitfield for this image More... | |
| LT_STATUS | getMetadataBlob (const char *type, LTIOStreamInf *&stream) const |
| extract the metadata associated with the image of the given type More... | |
| bool | hasMetadataBlob (const char *type) const |
| void | setProgressDelegate (LTIProgressDelegate *delegate) |
| set progress delegate More... | |
| LTIProgressDelegate * | getProgressDelegate () const |
| get progress delegate More... | |
| void | setInterruptDelegate (LTIInterruptDelegate *delegate) |
| set interrupt delegate More... | |
| LTIInterruptDelegate * | getInterruptDelegate () const |
| get interrupt delegate More... | |
| lt_uint32 | getStripHeight () const |
| get strip height More... | |
| LT_STATUS | setStripHeight (lt_uint32 stripHeight) |
| set the strip height More... | |
| lt_int64 | getEncodingCost (const LTIScene &scene) const |
| get the cost to encode this scene More... | |
| bool | getReaderScene (const LTIScene &decodeScene, LTIScene &readerScene) const |
| get the underlying scene to be used More... | |
| LT_STATUS | overrideBackgroundPixel (const LTIPixel *backgroundPixel) |
| override the background color of the image More... | |
| LT_STATUS | overrideNoDataPixel (const LTIPixel *nodataPixel) |
| override the "no data" (transparency) color of the image More... | |
| LT_STATUS | overrideGeoCoord (const LTIGeoCoord &geoCoord) |
| override the geographic coordinates of the image More... | |
| LT_STATUS | overrideDynamicRange (const LTIPixel &drmin, const LTIPixel &drmax) |
| override the dynamic range of the image More... | |
| LT_STATUS | overridePixelBPS (lt_uint8) |
| override the bits-per-sample of the image's (sample's) datatype More... | |
| LT_STATUS | overridePixelLookupTable (const LTIPixelLookupTable *pixelLookupTable) |
| override the CLUT of the image More... | |
| LT_STATUS | overrideMetadata (const LTIMetadataDatabase &metadata) |
| override the metadata of the image More... | |
| LT_STATUS | overrideColorSpace (LTIColorSpace colorspace) |
| override the colorspace of all the pixel properties (PixelProps, NoData, Background, Min/MaxDynamicRange) More... | |
| LTIMaskSource * | getMask () const |
| bool | getPipelineInfo (LTIPipelineInfo info) const |
| LTIImageStage * | getPreviousStage (void) const |
Public Member Functions inherited from LTIImageStage | |
| virtual void | setProgressDelegate (LTIProgressDelegate *delegate)=0 |
| set progress delegate More... | |
| virtual LTIProgressDelegate * | getProgressDelegate () const =0 |
| get progress delegate More... | |
| virtual void | setInterruptDelegate (LTIInterruptDelegate *delegate)=0 |
| set interrupt delegate More... | |
| virtual LTIInterruptDelegate * | getInterruptDelegate () const =0 |
| get interrupt delegate More... | |
| LT_STATUS | read (const LTIScene &scene, LTISceneBuffer &buffer) |
| read (decode) a scene from the image More... | |
| virtual LT_STATUS | readBegin (const LTIPixel &pixelProps, const LTIScene &fullScene) |
| start strip-based read More... | |
| virtual LT_STATUS | readStrip (LTISceneBuffer &buffer, const LTIScene &stripScene) |
| read a strip from the image More... | |
| virtual LT_STATUS | readEnd () |
| finish strip-based read More... | |
| virtual lt_uint32 | getStripHeight () const =0 |
| get strip height More... | |
| virtual LT_STATUS | setStripHeight (lt_uint32 stripHeight)=0 |
| set the strip height More... | |
| virtual lt_int64 | getEncodingCost (const LTIScene &scene) const =0 |
| get the cost to encode this scene More... | |
| virtual bool | getReaderScene (const LTIScene &decodeScene, LTIScene &readerScene) const =0 |
| get the underlying scene to be used More... | |
| lt_uint32 | getNumStrips () const |
| get number of strips in scene More... | |
| LTIScene | getStripScene (lt_uint32 stripNumber) const |
| get a strip for current scene More... | |
| virtual LT_STATUS | overrideBackgroundPixel (const LTIPixel *backgroundPixel)=0 |
| override the background color of the image More... | |
| virtual LT_STATUS | overrideNoDataPixel (const LTIPixel *nodataPixel)=0 |
| override the "no data" (transparency) color of the image More... | |
| virtual LT_STATUS | overrideGeoCoord (const LTIGeoCoord &geoCoord)=0 |
| override the geographic coordinates of the image More... | |
| virtual LT_STATUS | overrideDynamicRange (const LTIPixel &drmin, const LTIPixel &drmax)=0 |
| override the dynamic range of the image More... | |
| virtual LT_STATUS | overridePixelBPS (lt_uint8)=0 |
| override the bits-per-sample of the image's (sample's) datatype More... | |
| virtual LT_STATUS | overridePixelLookupTable (const LTIPixelLookupTable *pixelLookupTable)=0 |
| override the CLUT of the image More... | |
| virtual LT_STATUS | overrideMetadata (const LTIMetadataDatabase &metadata)=0 |
| override the metadata of the image More... | |
| virtual LT_STATUS | overrideColorSpace (LTIColorSpace colorspace)=0 |
| override the colorspace of all the pixel properties (PixelProps, NoData, Background, Min/MaxDynamicRange) More... | |
| virtual LTIMaskSource * | getMask () const =0 |
| virtual bool | getPipelineInfo (LTIPipelineInfo info) const =0 |
| virtual LTIImageStage * | getPreviousStage () const =0 |
Public Member Functions inherited from LTIImage | |
| virtual lt_uint32 | getWidth () const =0 |
| get image width More... | |
| virtual lt_uint32 | getHeight () const =0 |
| get image height More... | |
| virtual LT_STATUS | getDimsAtMag (double mag, lt_uint32 &width, lt_uint32 &height) const =0 |
| get image width and height at given magnification More... | |
| lt_uint16 | getNumBands () const |
| get number of bands More... | |
| lt_uint16 | getNumBandsWithoutAlpha () const |
| get number of bands without alpha More... | |
| LTIColorSpace | getColorSpace () const |
| get colorspace More... | |
| LTIDataType | getDataType () const |
| get data type More... | |
| virtual const LTIPixel & | getPixelProps () const =0 |
| get the pixel properties of the image More... | |
| virtual const LTIPixel * | getBackgroundPixel () const =0 |
| get the values of the background pixel More... | |
| virtual const LTIPixel * | getNoDataPixel () const =0 |
| get the values of the "no data" (transparency) pixel More... | |
| virtual const LTIPixelLookupTable * | getPixelLookupTable () const =0 |
| get the color lookup table, if any More... | |
| virtual const LTIPixel & | getMinDynamicRange () const =0 |
| get the minimum dynamic range value of image More... | |
| virtual const LTIPixel & | getMaxDynamicRange () const =0 |
| get the maximum dynamic range value of image More... | |
| bool | isNaturalDynamicRange () const |
| check if the range is "complete" or not More... | |
| virtual const LTIGeoCoord & | getGeoCoord () const =0 |
| get the geographic coordinates of the image More... | |
| virtual bool | isGeoCoordImplicit () const =0 |
| is geo information "real" or not More... | |
| virtual const LTIMetadataDatabase & | getMetadata () const =0 |
| get the metadata associated with the image More... | |
| virtual double | getMinMagnification () const =0 |
| get the minimum magnification More... | |
| virtual double | getMaxMagnification () const =0 |
| get the maximum magnification More... | |
| virtual bool | isSelective () const =0 |
| check if image supports "random access" decoding More... | |
| virtual lt_uint32 | getModifications (const LTIScene &scene) const =0 |
| get the modification bitfield for this image More... | |
| virtual LT_STATUS | getMetadataBlob (const char *type, LTIOStreamInf *&stream) const |
| extract the metadata associated with the image of the given type More... | |
| virtual bool | hasMetadataBlob (const char *type) const |
| lt_int64 | getNominalImageSizeWithoutAlpha () const |
| get the nominal size of the image, not considering the alpha band More... | |
| lt_int64 | getNominalImageSizeWithAlpha () const |
| get the nominal size of the image, including the alpha band More... | |
| void | getGeoPoint (LTIPosition position, double &x, double &y) const |
| get position of a named point More... | |
| LTIPixel * | createBackgroundPixel () const |
| return new background pixel More... | |
Public Member Functions inherited from LTIReferenceCountedObject | |
| virtual void | retain (void) const |
| increment reference counter More... | |
| virtual void | release (void) const |
| decrement the reference counter and delete the object when the counter is zero More... | |
Static Public Member Functions | |
| static J2KImageReader * | create (void) |
Protected Member Functions | |
| J2KImageReader (void) | |
| virtual | ~J2KImageReader (void) |
Protected Member Functions inherited from LTIImageFilter | |
| LTIImageFilter (void) | |
| virtual | ~LTIImageFilter (void) |
| LT_STATUS | decodeBegin (const LTIPixel &pixelProps, const LTIScene &fullScene) |
| start strip-based read More... | |
| LT_STATUS | decodeStrip (LTISceneBuffer &stripBuffer, const LTIScene &stripScene) |
| read a strip from the image More... | |
| LT_STATUS | decodeEnd (void) |
| finish strip-based read More... | |
| LT_STATUS | init (LTIImageStage *previousStage) |
| void | releasePreviousStageNow (void) |
| void | changePreviousStage (LTIImageStage *newPref) |
Protected Member Functions inherited from LTIImageStage | |
| LTIImageStage (void) | |
| virtual | ~LTIImageStage (void) |
| LT_STATUS | fillBackground (const LTIScene &scene, LTISceneBuffer &buffer) |
| fill the background of the scene More... | |
| LT_STATUS | fillBackground (const LTIScene &scene, LTISceneBuffer &buffer, const LTIPixel &color) |
| fill the scene to given pixel More... | |
| bool | isBandSelected (const LTIPixel &pixelProps) const |
| virtual LT_STATUS | decodeBegin (const LTIPixel &pixelProps, const LTIScene &fullScene)=0 |
| start strip-based read More... | |
| virtual LT_STATUS | decodeStrip (LTISceneBuffer &stripBuffer, const LTIScene &stripScene)=0 |
| read a strip from the image More... | |
| virtual LT_STATUS | decodeEnd (void)=0 |
| finish strip-based read More... | |
| const LTIScene & | getFullScene () const |
| get full scene More... | |
Protected Member Functions inherited from LTIImage | |
| LTIImage (void) | |
| virtual | ~LTIImage (void) |
Protected Member Functions inherited from LTIReferenceCountedObject | |
| LTIReferenceCountedObject (void) | |
| virtual | ~LTIReferenceCountedObject (void) |
quality layer control | |
| LT_STATUS | setParameter_Layers (lt_uint32 numLayers) |
| control decoder use of quality layers More... | |
| lt_uint32 | getParameter_Layers () const |
| control decoder use of quality layers More... | |
| lt_uint32 | getParameter_MinLayers () const |
| control decoder use of quality layers More... | |
| lt_uint32 | getParameter_MaxLayers () const |
| control decoder use of quality layers More... | |
| lt_uint32 | getParameter_DefaultLayers () const |
| control decoder use of quality layers More... | |
| void | getParameter_TileSize (int &width, int &height) const |
| get image tile size More... | |
| void | getParameter_Precincts (const int *&widths, const int *&heights, int &numPrecincts) const |
| get image precinct sizes More... | |
| J2KProgressionOrder | getParameter_ProgressionOrder () const |
| get image progression order More... | |
| void | getParameter_CodeblockSize (int &width, int &height) const |
| get image codeblock size More... | |
| bool | getParameter_Wavelet97 () const |
| query if 9-7 wavelet used More... | |
| bool | getParameter_UsingYCbCr () const |
| query if YCC transform is used More... | |
| lt_uint8 | getNumLevels () const |
| get number of resolution levels More... | |
| LT_STATUS | readMetadataBox (const lt_uint8 *uuid, LTIOStreamInf &stream) |
| get metadata chunk More... | |
| LT_STATUS | writeProfile (const LTFileSpec &file) const |
| control decoder use of quality layers More... | |
| Jpeg2000ReaderSource & | getReaderSouce () const |
| control decoder use of quality layers More... | |
| virtual lt_int64 | getEncodingCost (const LTIScene &scene) const |
| control decoder use of quality layers More... | |
| virtual lt_uint32 | getModifications (const LTIScene &scene) const |
| control decoder use of quality layers More... | |
This class provides support for reading JPEG 2000 images.
Definition at line 37 of file J2KImageReader.h.
|
protected |
|
protectedvirtual |
|
static |
These functions allow the caller to control the number of quality layers used in satisfying the decode request. Use of quality layers allow for "preset" compression ratios to be encoded into the image.
The default is to use all available layers).
Implements LTIImageStage.
These functions allow the caller to control the number of quality layers used in satisfying the decode request. Use of quality layers allow for "preset" compression ratios to be encoded into the image.
The default is to use all available layers).
Implements LTIImage.
| lt_uint8 J2KImageReader::getNumLevels | ( | ) | const |
Returns the number of wavelet resolution levels encoded in the image. This is equivalent to the minimum magnification value, expressed as a power of two.
| void J2KImageReader::getParameter_CodeblockSize | ( | int & | width, |
| int & | height | ||
| ) | const |
Returns the size of the codeblock used to encode the image, in pixels.
| width | codeblock width, in pixels |
| height | codeblock width, in pixels |
| lt_uint32 J2KImageReader::getParameter_DefaultLayers | ( | ) | const |
These functions allow the caller to control the number of quality layers used in satisfying the decode request. Use of quality layers allow for "preset" compression ratios to be encoded into the image.
The default is to use all available layers).
| lt_uint32 J2KImageReader::getParameter_DefaultPrecision | ( | ) | const |
These functions allow the caller to control the number of bits of precision (or bits per sample) used in satisfying the decode request.
The default is to use all available bits.
Note this allows for precision control on a per-decode basis. The maxBpp constructor parameter performs a similar function, but sets the value for all decode operations on the image.
| lt_uint32 J2KImageReader::getParameter_Layers | ( | ) | const |
These functions allow the caller to control the number of quality layers used in satisfying the decode request. Use of quality layers allow for "preset" compression ratios to be encoded into the image.
The default is to use all available layers).
| lt_uint32 J2KImageReader::getParameter_MaxLayers | ( | ) | const |
These functions allow the caller to control the number of quality layers used in satisfying the decode request. Use of quality layers allow for "preset" compression ratios to be encoded into the image.
The default is to use all available layers).
| lt_uint32 J2KImageReader::getParameter_MaxPrecision | ( | ) | const |
These functions allow the caller to control the number of bits of precision (or bits per sample) used in satisfying the decode request.
The default is to use all available bits.
Note this allows for precision control on a per-decode basis. The maxBpp constructor parameter performs a similar function, but sets the value for all decode operations on the image.
| lt_uint32 J2KImageReader::getParameter_MinLayers | ( | ) | const |
These functions allow the caller to control the number of quality layers used in satisfying the decode request. Use of quality layers allow for "preset" compression ratios to be encoded into the image.
The default is to use all available layers).
| lt_uint32 J2KImageReader::getParameter_MinPrecision | ( | ) | const |
These functions allow the caller to control the number of bits of precision (or bits per sample) used in satisfying the decode request.
The default is to use all available bits.
Note this allows for precision control on a per-decode basis. The maxBpp constructor parameter performs a similar function, but sets the value for all decode operations on the image.
| void J2KImageReader::getParameter_Precincts | ( | const int *& | widths, |
| const int *& | heights, | ||
| int & | numPrecincts | ||
| ) | const |
Returns the size of the precinct(s) used to encode the image, in pixels. The data is returned as pointers to arrays, one width/height value for each of the numPrecincts precincts.
| widths | returned array of precincts widths, in pixels |
| heights | returned array of precincts heights, in pixels |
| numPrecincts | number of precincts in image (and length of widths / heights arrays) |
| lt_uint32 J2KImageReader::getParameter_Precision | ( | ) | const |
These functions allow the caller to control the number of bits of precision (or bits per sample) used in satisfying the decode request.
The default is to use all available bits.
Note this allows for precision control on a per-decode basis. The maxBpp constructor parameter performs a similar function, but sets the value for all decode operations on the image.
| J2KProgressionOrder J2KImageReader::getParameter_ProgressionOrder | ( | ) | const |
Returns the progression order of the image.
| void J2KImageReader::getParameter_TileSize | ( | int & | width, |
| int & | height | ||
| ) | const |
Returns the size of the tile(s) used to encode the image, in pixels. An image that is "not tiled" is considered to be encoded as one large tile, the size of the entire image.
| width | tile width, in pixels |
| height | tile height, in pixels |
| bool J2KImageReader::getParameter_UsingYCbCr | ( | ) | const |
Returns true if the RGB-YCbCr multiple component transform is used for this image.
| bool J2KImageReader::getParameter_Wavelet97 | ( | ) | const |
Returns true if the image was encoded with the 9-7 wavelet. The 9-7 wavelet may give better image quality as compared to the 5-3 wavelet for a given compression ratio, however the 9-7 wavelet does not support lossless encoding.
| Jpeg2000ReaderSource & J2KImageReader::getReaderSouce | ( | ) | const |
These functions allow the caller to control the number of quality layers used in satisfying the decode request. Use of quality layers allow for "preset" compression ratios to be encoded into the image.
The default is to use all available layers).
| LT_STATUS J2KImageReader::initialize | ( | const LTFileSpec & | fileSpec, |
| bool | isPersistent = true, |
||
| float | maxBpp = -1.0f, |
||
| bool | useWorldFile = true |
||
| ) |
Create a JPEG 2000 image reader from a file.
The isPersistent parameter is used as a performance hint to the underlying codec. If you intend to do only one decode request from the image, you may set this value to false; this may result in improved memory usage and performance. If multiple decode requests are to be made, the value must be set to true.
The maxBpp parameter controls the number of bits per sample to decode from. Values smaller than the number of bits per sample will produce lossy images, but generally the decode operations will be faster. A value of -1.0 indicates all available bits are to be used.
The bandList parameter, if set to a value other than nullptr, will attempt to open the image as if it contained only numBands bands (components). Note if the YCbCr transform was used to encode the image, the band data will be returned still in the YCC colorspace; this is typically not what you want if any of the bands in bandList are in the range 0...2. Also note that if two values in the bandList are the same an error will be returned.
| fileSpec | file to read from |
| isPersistent | set to true, unless only doing one decode request |
| maxBpp | set to number of bits per sample desired (or -1.0f for all bits) |
| useWorldFile | use world file information if available |
| bandList | nullptr for all bands or zero based list of band (Kakadu component) indices |
| numBands | Zero for all bands or number of indices in bandList |
| LT_STATUS J2KImageReader::initialize | ( | LTIOStreamInf & | stream, |
| bool | isPersistent = true, |
||
| float | maxBpp = -1.0f, |
||
| bool | useWorldFile = true |
||
| ) |
Create a JPEG 2000 image reader from a stream.
See file initialize for parameter descriptions.
| stream | stream to read from |
| isPersistent | set to true, unless only doing one decode request |
| maxBpp | set to number of bits per sample desired (or -1.0f for all bits) |
| useWorldFile | use world file information if available |
| bandList | nullptr for all bands or zero based list of band (Kakadu component) indices |
| numBands | Zero for all bands or number of indices in bandList |
| LT_STATUS J2KImageReader::readMetadataBox | ( | const lt_uint8 * | uuid, |
| LTIOStreamInf & | stream | ||
| ) |
This function is used to access the contents of a metadata box in the JPEG 2000 image, given a UUID. The box contents are copied into a user-supplied stream.
| uuid | the UUID of the box to read |
| stream | stream to receive the metadata |
These functions allow the caller to control the number of quality layers used in satisfying the decode request. Use of quality layers allow for "preset" compression ratios to be encoded into the image.
The default is to use all available layers).
These functions allow the caller to control the number of bits of precision (or bits per sample) used in satisfying the decode request.
The default is to use all available bits.
Note this allows for precision control on a per-decode basis. The maxBpp constructor parameter performs a similar function, but sets the value for all decode operations on the image.
| LT_STATUS J2KImageReader::writeProfile | ( | const LTFileSpec & | file | ) | const |
These functions allow the caller to control the number of quality layers used in satisfying the decode request. Use of quality layers allow for "preset" compression ratios to be encoded into the image.
The default is to use all available layers).
| Extensis |