MrSID Decode SDK for Raster Reference Manual
9.5.1.4427
|
This file contains a simple C API to the Decode SDK. More...
Go to the source code of this file.
Macros | |
#define | LT_STS_CAPI_BASE ((LT_STATUS)52000) |
C API status codes. More... | |
#define | LT_STS_CAPI_BadParam ((LT_STATUS)52001) |
C API status codes. More... | |
#define | LT_STS_CAPI_MAX ((LT_STATUS)52099) |
C API status codes. More... | |
Typedefs | |
typedef void * | LTICImageH |
opaque pointer (handle) to an LTIImage More... | |
Functions | |
LT_STATUS | ltic_getVersion (lt_uint32 *major, lt_uint32 *minor, lt_uint32 *revision, lt_uint32 *build, const char **branch) |
get SDK version (C API) More... | |
LT_STATUS | ltic_getMrSIDGeneration (const char *fileName, int *generation, int *raster) |
get MrSID generation (C API) More... | |
LT_STATUS | ltic_openMrSIDImageFile (LTICImageH *image, const char *fileName) |
open MrSID image via filename (C API) More... | |
LT_STATUS | ltic_openMrSIDImageStream (LTICImageH *image, LTIOStreamH stream) |
open MrSID image via stream (C API) More... | |
LT_STATUS | ltic_openJP2ImageFile (LTICImageH *image, const char *fileName) |
open JPEG 2000 image via filename (C API) More... | |
LT_STATUS | ltic_openJP2ImageStream (LTICImageH *image, LTIOStreamH stream) |
open JPEG 2000 image via stream (C API) More... | |
LT_STATUS | ltic_openNITFImageFile (LTICImageH *image, const char *fileName) |
open NITF image via filename (C API) More... | |
LT_STATUS | ltic_closeImage (LTICImageH image) |
close an image (C API) More... | |
lt_uint32 | ltic_getWidth (const LTICImageH image) |
get image width (C API) More... | |
lt_uint32 | ltic_getHeight (const LTICImageH image) |
get image height (C API) More... | |
LT_STATUS | ltic_getDimsAtMag (LTICImageH image, double magnification, lt_uint32 *width, lt_uint32 *height) |
get dimensions of an image at a given magnification (C API) More... | |
LTIColorSpace | ltic_getColorSpace (const LTICImageH image) |
get image colorspace (C API) More... | |
lt_uint16 | ltic_getNumBands (const LTICImageH image) |
get number of bands in trhe image (C API) More... | |
LTIDataType | ltic_getDataType (const LTICImageH image) |
get image datatype (C API) More... | |
double | ltic_getMinMagnification (const LTICImageH image) |
get image minimum magnifaction (C API) More... | |
double | ltic_getMaxMagnification (const LTICImageH image) |
get image maximum magnifacation (C API) More... | |
lt_uint8 | ltic_isMrSIDLocked (const LTICImageH image) |
query if MrSID image is locked (C API) More... | |
LT_STATUS | ltic_setMrSIDPassword (LTICImageH image, const lt_utf8 *passwd) |
set password for decoding MrSID image (C API) More... | |
double | ltic_getGeoXOrigin (const LTICImageH image) |
get geo X position of image (C API) More... | |
double | ltic_getGeoYOrigin (const LTICImageH image) |
get geo Y position of image (C API) More... | |
double | ltic_getGeoXResolution (const LTICImageH image) |
get geo X resolution of image (C API) More... | |
double | ltic_getGeoYResolution (const LTICImageH image) |
get geo Y resolution of image (C API) More... | |
double | ltic_getGeoXRotation (const LTICImageH image) |
get geo X rotation term of image (C API) More... | |
double | ltic_getGeoYRotation (const LTICImageH image) |
get geo Y rotation term of image (C API) More... | |
LT_STATUS | ltic_decode (LTICImageH image, double xUpperLeft, double yUpperLeft, double width, double height, double magnification, void **buffers) |
decode a scene from the image (C API) More... | |
lt_uint32 | ltic_getNumMetadataRecords (LTICImageH image) |
get number of metadata records (C API) More... | |
LT_STATUS | ltic_getMetadataRecord (LTICImageH image, lt_uint32 recordNum, const char **tag, LTIMetadataDataType *datatype, lt_uint32 *numDims, const lt_uint32 **dims, const void **data) |
get a metadata record from an image (C API) More... | |
It is essentially just a wrapper around the LTIImage class and its member functions.
Definition in file ltic_api.h.
#define LT_STS_CAPI_BadParam ((LT_STATUS)52001) |
Definition at line 42 of file ltic_api.h.
#define LT_STS_CAPI_BASE ((LT_STATUS)52000) |
Definition at line 41 of file ltic_api.h.
#define LT_STS_CAPI_MAX ((LT_STATUS)52099) |
Definition at line 43 of file ltic_api.h.
typedef void* LTICImageH |
Definition at line 50 of file ltic_api.h.
LT_STATUS ltic_closeImage | ( | LTICImageH | image) |
This function will close the given image.
This method is part of the C API. It is equivalent to calling the LTIImage destructor.
image | image to be closed |
LT_STATUS ltic_decode | ( | LTICImageH | image, |
double | xUpperLeft, | ||
double | yUpperLeft, | ||
double | width, | ||
double | height, | ||
double | magnification, | ||
void ** | buffers | ||
) |
This function decodes a scene from the image. The output is written to the given band buffers in packed form.
This method is part of the C API. It is equivalent to calling LTIImageStage::read(). The xUpperLeft, yUpperLeft, width, height, and magnification parameters correspond to the LTIScene used in the read() call.
image | image to decode |
xUpperLeft | upperleft x position of scene |
yUpperLeft | upperleft y position of scene |
width | width of scene |
height | height of scene |
magnification | manification of scene |
buffers | array of buffers to write to, one per band |
LTIColorSpace ltic_getColorSpace | ( | const LTICImageH | image) |
This function will return the colorspace of the given image.
This method is part of the C API. It is equivalent to calling LTIImage::getColorSpace().
image | image to query |
LTIDataType ltic_getDataType | ( | const LTICImageH | image) |
This function will return the datatype of the pixels of the image.
This method is part of the C API. It is equivalent to calling LTIImage::getDataType().
image | image to query |
LT_STATUS ltic_getDimsAtMag | ( | LTICImageH | image, |
double | magnification, | ||
lt_uint32 * | width, | ||
lt_uint32 * | height | ||
) |
This function returns the projected dimensions of an image at a given magnification level.
This method is part of the C API. It is equivalent to calling LTIImage::getDimsAtMag()
double ltic_getGeoXOrigin | ( | const LTICImageH | image) |
This function will return the upper-left X position of the image.
This method is part of the C API. It is equivalent to calling LTIImage::getGeoCoord().getX().
image | image to query |
double ltic_getGeoXResolution | ( | const LTICImageH | image) |
This function will return the X resolution of the image.
This method is part of the C API. It is equivalent to calling LTIImage::getGeoCoord().getXRes().
image | image to query |
double ltic_getGeoXRotation | ( | const LTICImageH | image) |
This function will return the X rotation term of the image.
This method is part of the C API. It is equivalent to calling LTIImage::getGeoCoord().getXRot().
image | image to query |
double ltic_getGeoYOrigin | ( | const LTICImageH | image) |
This function will return the upper-left Y position of the image.
This method is part of the C API. It is equivalent to calling LTIImage::getGeoCoord().getY().
image | image to query |
double ltic_getGeoYResolution | ( | const LTICImageH | image) |
This function will return the Y resolution of the image.
This method is part of the C API. It is equivalent to calling LTIImage::getGeoCoord().getYRes().
image | image to query |
double ltic_getGeoYRotation | ( | const LTICImageH | image) |
This function will return the Y rotation term of the image.
This method is part of the C API. It is equivalent to calling LTIImage::getGeoCoord().getYRot().
image | image to query |
lt_uint32 ltic_getHeight | ( | const LTICImageH | image) |
This function will return the height of the given image.
This method is part of the C API. It is equivalent to calling LTIImage::getHeight().
image | image to query |
double ltic_getMaxMagnification | ( | const LTICImageH | image) |
This function will return the maximum magnification of the image.
This method is part of the C API. It is equivalent to calling LTIImage::getMaxMagnification().
image | image to query |
LT_STATUS ltic_getMetadataRecord | ( | LTICImageH | image, |
lt_uint32 | recordNum, | ||
const char ** | tag, | ||
LTIMetadataDataType * | datatype, | ||
lt_uint32 * | numDims, | ||
const lt_uint32 ** | dims, | ||
const void ** | data | ||
) |
This function returns the data contained in a given metadata record.
This method is part of the C API. It is equivalent to calling LTIImage::getMetadata().getDataByIndex().
image | image to query |
recordNum | index of record to retrieve |
tag | address to hold name of metadata tag |
datatype | address to hold datatype of record |
numDims | address to hold number of dimension in record data |
dims | address to record's dimesnion arrays |
data | address to record's data |
double ltic_getMinMagnification | ( | const LTICImageH | image) |
This function will return the minimum magnification of the image.
This method is part of the C API. It is equivalent to calling LTIImage::getMinMagnification().
image | image to query |
LT_STATUS ltic_getMrSIDGeneration | ( | const char * | fileName, |
int * | generation, | ||
int * | raster | ||
) |
Returns the MrSID generation number for a specific MrSID image.
The generation value returned will be 2 (for MrSID/MG2), 3 (for MrSID/MG3), 4 (for MrSID/MG4) or 0 (if error).
fileName | the file to get the version of |
generation | the MrSID generation |
raster | is the file raster or point cloud? |
lt_uint16 ltic_getNumBands | ( | const LTICImageH | image) |
This function will return the numbe rof bands in the given image.
This method is part of the C API. It is equivalent to calling LTIImage::getNumBands().
image | image to query |
lt_uint32 ltic_getNumMetadataRecords | ( | LTICImageH | image) |
This function returns the number of metadata records in the image. This number defines the range of values used with ltic_metadataRecord().
This method is part of the C API. It is equivalent to calling LTIImage::getMetadata().getIndexCount().
image | image to query |
LT_STATUS ltic_getVersion | ( | lt_uint32 * | major, |
lt_uint32 * | minor, | ||
lt_uint32 * | revision, | ||
lt_uint32 * | build, | ||
const char ** | branch | ||
) |
Returns the full version number of the SDK, e.g. "4.0.8.673".
This method is part of the C API. It is equivalent to the LTIUtils::getVersionInfo() function.
major | address to hold major version number |
minor | address to hold minor version number |
revision | address to hold revision number |
build | address to hold build number |
branch | address to hold string giving the branch name |
lt_uint32 ltic_getWidth | ( | const LTICImageH | image) |
This function will return the width of the given image.
This method is part of the C API. It is equivalent to calling LTIImage::getWidth().
image | image to query |
lt_uint8 ltic_isMrSIDLocked | ( | const LTICImageH | image) |
This function will return whether or not the given image is locked, i.e. password protected. The image handle must be a MrSID image.
This method is part of the C API. It is equivalent to calling MrSIDImageReader::isLocked().
image | MrSID image to query |
LT_STATUS ltic_openJP2ImageFile | ( | LTICImageH * | image, |
const char * | fileName | ||
) |
Given the filename of a JPEG 2000 image, this function will open the image and return a handle which can be used to access image information and perform decodes.
This method is part of the C API. It is equivalent to constructing a J2KImageReader object.
image | address to hold image handle |
fileName | name of file to open |
LT_STATUS ltic_openJP2ImageStream | ( | LTICImageH * | image, |
LTIOStreamH | stream | ||
) |
Given a C stream containing a JPEG 2000 image, this function will open the image and return a handle which can be used to access image information and perform decodes.
This method is part of the C API. It is equivalent to constructing a J2KImageReader object.
image | address to hold image handle |
stream | C stream handle |
LT_STATUS ltic_openMrSIDImageFile | ( | LTICImageH * | image, |
const char * | fileName | ||
) |
Given the filename of a MrSID image, this function will open the image and return a handle which can be used to access image information and perform decodes.
This method is part of the C API. It is equivalent to constructing a MrSIDImageReader object.
image | address to hold image handle |
fileName | name of file to open |
LT_STATUS ltic_openMrSIDImageStream | ( | LTICImageH * | image, |
LTIOStreamH | stream | ||
) |
Given a C stream containing a MrSID image, this function will open the image and return a handle which can be used to access image information and perform decodes.
This method is part of the C API. It is equivalent to constructing a MrSIDImageReader object.
image | address to hold image handle |
stream | C stream handle |
LT_STATUS ltic_openNITFImageFile | ( | LTICImageH * | image, |
const char * | fileName | ||
) |
Given the filename of a NITF image, this function will open the image and return a handle which can be used to access image information and perform decodes.
This method is part of the C API. It is equivalent to constructing a NITFImageReader (and NITFImageManager) object.
image | address to hold image handle |
fileName | name of file to open |
LT_STATUS ltic_setMrSIDPassword | ( | LTICImageH | image, |
const lt_utf8 * | passwd | ||
) |
This function will set the passward used to decode a locked MrSID image.
This method is part of the C API. It is equivalent to calling MrSIDImageReader::setPassword().
image | MrSID image to unlock |
passwd | password string for image |
LizardTech |