This utility class provides as number of operations for the manipulation of raster files.
|
static bool | loadRasterLibrary (const char *libraryName) |
|
static bool | pyramidToRaster (const char *input_raster, const char *output_raster, TSLRasterType output_type, const int compressionFactor=2) |
|
static bool | queryExtendedRasterSize (const char *fullPath, int *width, int *height, int *bitsPerPixel, int *dpiWidth, int *dpiHeight) |
|
static bool | queryRasterSize (const char *fullPath, int *width, int *height, int *bitsPerPixel) |
|
static bool | rasterToPyramid (const char *input_raster, const char *input_mask, const char *output_raster, TSLRasterInterpolation interpolation, bool multiPage=false) |
|
static bool | warpRaster (const char *input_raster, double *ctl_points, int ctl_point_count, TSLRasterInterpolation interpolation, const char *output_raster, const char *output_mask, double *output_x1, double *output_y1, double *output_x2, double *output_y2) |
|
static bool | queryRasterSize (const unsigned char *image, const size_t imageSize, int *width, int *height, int *bitsPerPixel) |
|
static bool TSLRasterUtilityFunctions::warpRaster |
( |
const char * | input_raster, |
|
|
double * | ctl_points, |
|
|
int | ctl_point_count, |
|
|
TSLRasterInterpolation | interpolation, |
|
|
const char * | output_raster, |
|
|
const char * | output_mask, |
|
|
double * | output_x1, |
|
|
double * | output_y1, |
|
|
double * | output_x2, |
|
|
double * | output_y2 ) |
|
static |
Warps the given raster to a given set of control points.
This method allows the user to convert a modify a raster such that the pixel locations on the raster can be positioned on the vector locations specified in the control points. ( Note : a minimum of 4 control points must be supplied)
The method will not modify the input raster but will produce a new raster file in the same format as the original, as well as a mask file indicating the actual raster area.
- Parameters
-
input_raster | name of the input raster file |
ctl_points | point to an array of control point quads |
ctl_point_count | number of control point quads |
interpolation | Type of interpolation to use. |
output_raster | name of the output warped raster. |
output_mask | name of the output mask. |
output_x1 | pointer to left location of raster |
output_y1 | pointer to bottom location of raster |
output_x2 | pointer to right location of raster |
output_y2 | pointer to top location of raster |
- Returns
- True if it was successful, False otherwise. Reasons for failure may include too few ctrl_points , a linear set of control points , invalid relationships between raster and vector control points e.g. raster twisting .