An image base-class image for scalar and vector images
![]() | fa (IML_LINT Axis0Index, IML_LINT Axis1Index, IML_LINT Axis2Index, IML_LINT Axis3Index)![]() |
![]() | fa (IML_LINT Axis0Index, IML_LINT Axis1Index, IML_LINT Axis2Index)![]() |
![]() | fa (IML_LINT Axis0Index, IML_LINT Axis1Index)![]() |
![]() | hp_fa (IML_LINT Axis0Index, ...)![]() |
![]() | image_type (void) Returns the type of the image |
![]() | operator() (IML_ULINT Index)![]() |
![]() | operator() (IML_LINT Axis0Index, IML_LINT Axis1Index, ...)![]() |
![]() | operator() (iml_index IML_REF ImIndex) Use an iml_index object for the hyperplane access |
![]() | operator[] (IML_LINT Index)![]() |
![]() | valid_memory (void) Returns zero if the memory allocation in the constructor failed, non-zero otherwise |
An image base-class image for scalar and vector images. Provides functions for the derived classes, particularly various methods for accessing image pixels. Scalar and vector images each implement the following mathematical operations:
- = OBJECT;
- += OBJECT;
- -= OBJECT;
- *= OBJECT;
- /= OBJECT;
where OBJECT can be
- a scalar: signed or usigned integral, or floating point
- any object derived from the class iml_rofn
- an image of a different (pixel) type
- an image of identical (pixel) type
There are speed concerns involved with each of these.
Scalars
The {=,+=,-=,*=,/=} operations on scalars are fast because they are implemented directly. All scalars are promoted to double before the operation is executed. Generically, the operational result is
Image[index] = (pixel type)((double)OBJECT) or Image[index] = (pixel type)( ((double)Image[index]) OPERATOR ((double)OBJECT) )where OPERATOR is one of {+,-,*,/}.Images of Identical Type
The {=,+=,-=,*=,/=} operations are fastest when the images are of identical type because the operations are implemented directly.
Images of Different Type
The {=,+=,-=,*=,/=} operations between images of unlike type are much slower; they are implemented using virtual function calls to avoid combinatorial explosion of template declarations (i.e. typecount * typecount different combinations!).
All scalars are promoted to double before the operation is executed. Generically, the operational result is
Image[index] = (pixel type)((double)OtherImage[index]) or Image[index] = (pixel type)( ((double)Image[index]) OPERATOR ((double)OtherImage[index]) )where OPERATOR is one of {+,-,*,/}.Objects of class iml_rofn
The {=,+=,-=,*=,/=} operations with iml_rofn objects can be very slow, depending on the function implemented. Generically, the operational result is
Image[index] = (pixel type)(OBJECT(index))When operations are performed bewtween vector and scalar images, the default, or most recently requested vector component is employed in the operation. For complex images vector component is either a default, or is specified by a previous call to one of
These function calls indicate which vector component is to be used in the next operation. After the mathematical operation is completed the default component indicator is restored. That is, the call above only applies for a single operation.
- magnitude()
- phase()
- real()
- imaginary()
See the complex image class documentation for details.
IML_UBYTE_IMAGE IML_BYTE_IMAGE IML_USINT_IMAGE IML_SINT_IMAGE IML_ULINT_IMAGE IML_LINT_IMAGE IML_FLOAT_IMAGE IML_DOUBLE_IMAGE IML_LDOUBLE_IMAGE, IML_FCOMPLEX_IMAGE IML_DCOMPLEX_IMAGE IML_LDCOMPLEX_IMAGE
Use square bracket's for the fastest access, without built-in index-bounds
checking. This accessor also ignores hyperplane limits. It accesses the
raw pixels, with indices from zero to {N1*N2*...*Nm - 1} for an m
dimensional image.
Fastest access to raw elements/pixels without built-in index-bounds
checking. By raw I mean index ranges start at zero. This function
assumes the image is at least two dimensional. If your image is less
than two dimensions, then you might be stomping
on memory and your program will can do unexpected things.
Fastest access to raw elements/pixels without built-in index-bounds
checking. By raw I mean index ranges start at zero. This function
assumes the image is at least three dimensional. If your image is less
than three dimensions, then you might be stomping
on memory and your program will can do unexpected things.
Fastest access to raw elements/pixels without built-in index-bounds
checking. By raw I mean index ranges start at zero. This function
assumes the image is at least four dimensional. If your image is less
than four dimensions, then you might be stomping
on memory and your program will can do unexpected things.
Use for accessing raw elements/pixels within a hyperplane in the same spirit as [],
without built-in index-bounds checking. Hyperplane element(pixel) indices go from zero to
{N1*N2*...*Nn - 1} for an n dimensional hyperplane, where
the Ni are the sizes of the dimensions.Use carefully!
Use for hyperplane array access, in the same spirit as fa(), without built-in index-bounds
checking. Hyperplane element(pixel) indices follow index regions,
so negative indices are acceptable. Use carefully!
This function has a variable length argument list, so if you use the wrong number
of indices your program will do unexpected things.
This method provides image/hyperplane element access.
Assumes access of at least a 2-dimensional hyperplane. Does
index-bounds checking, and obeys the index domain. This means that negative
indices can be used if the "corner" of the hyperplane is not at the "origin."
Use this one if you want to be safe! Use carefully!
This function has a variable length argument list, so if you use the wrong number
of indices your program will do unexpected things.
T IML_REF operator[](IML_LINT Index)
T IML_REF fa(IML_LINT Axis0Index, IML_LINT Axis1Index)
T IML_REF fa(IML_LINT Axis0Index, IML_LINT Axis1Index, IML_LINT Axis2Index)
T IML_REF fa(IML_LINT Axis0Index, IML_LINT Axis1Index, IML_LINT Axis2Index, IML_LINT Axis3Index)
T IML_REF operator()(IML_ULINT Index)
T IML_REF hp_fa(IML_LINT Axis0Index, ...)
T IML_REF operator()(IML_LINT Axis0Index, IML_LINT Axis1Index, ...)
T IML_REF operator()(iml_index IML_REF ImIndex)
generated by doc++