In these operations a scalar
is exponentiated by the value of every pixel in a raster band, or the
pixel values are exponentiated by a scalar. The raster band is overwritten
with the result of the addition.
The operation is provided in
a high-level and a low-level
format. In the high-level format a raster object, a band identifier and
a token are specified, together with the scalar. The operation applies
to all pixels and the result is stored in the specified band. In the low-level
format the operation is applied to a block of contiguous memory containing
a specified number of pixels. The low-level format is useful to chain
a number of operations without the overhead of storing intermediate results.
If you want to preserve the
original raster band, you should make a copy of the band first.
The operations can be summarized
as follows:
Operation |
Description |
DSpGMPower |
exponent
pixel
|
DSpGMSqr |
2
pixel |
DSpGMSqrt |
1/2
pixel
|
DSpGMExp |
pixel
e |
DSpGMBasePower |
pixel
base
|
|
High-level declarations:
Pixel
value exponentiated
procedure DSpGMPower(const r: TDSpRaster; const band, token: integer;
exponent: TDSpFloat64);
procedure DSpGMSqr(const r: TDSpRaster; const band, token: integer);
procedure DSpGMSqrt(const r: TDSpRaster; const band, token: integer);
Base exponentiated by
a pixel value
procedure DSpGMExp(const r: TDSpRaster; const band, token: integer);
procedure DSpGMBasePower(const r: TDSpRaster; const band, token: integer;
base: TDSpFloat64);
Low-level declarations:
procedure DSpGMSqrUInt32
procedure DSpGMSqrInt32
procedure DSpGMSqrInt64
procedure DSpGMSqrFloat32
procedure DSpGMSqrFloat64
procedure DSpGMSqrtFloat32
procedure DSpGMSqrtFloat64
procedure DSpGMExpFloat32
procedure DSpGMExpFloat64
(const data: pointer; pixels: integer;
fill: TDSpFloat64);
procedure DSpGMPowerFloat32
procedure DSpGMPowerFloat64
(const data: pointer; pixels: integer;
fill, exponent: TDSpFloat64);
procedure DSpGMBasePowerFloat32
procedure DSpGMBasePowerFloat64
(const data: pointer; pixels: integer;
fill, base: TDSpFloat64);
Parameter |
Description |
r |
A valid raster
object. It must be opened for write access. |
band |
The
identifier of the raster band. The band must exist in the raster,
and it can be of any type. The data type can be any 32-bit or 64-bit
data type for the DSpGMSqr* operations, and must be 32-bit
or 64-bit floating point for the other operations. |
token |
The access
token for the raster. The token has to be generated for write access.
|
exponent |
The scalar
value to which every pixel of the raster band is exponentiated. This
value will be converted to the data type of the raster band before
the operation. |
base |
The scalar value which
is exponentiated by every pixel of the raster band. This value will
be converted to the data type of the raster band before the operation.
|
data |
A
pointer to a block of memory containing pixels pixel
values. |
pixels |
Number
of pixels in the data block of memory. |
fill |
The
missing data value of the raster band. |
|