In file mydocsrc/iml_ndim.h:

template class iml_typed_image : public iml_image

An image base-class image for scalar and vector images

Inheritance:

iml_typed_image < iml_image


Public Methods

T IML_REF fa (IML_LINT Axis0Index, IML_LINT Axis1Index, IML_LINT Axis2Index, IML_LINT Axis3Index)
Fastest access to raw elements/pixels for 4D images.
T IML_REF fa (IML_LINT Axis0Index, IML_LINT Axis1Index, IML_LINT Axis2Index)
Fastest access to raw elements/pixels for 3D images.
T IML_REF fa (IML_LINT Axis0Index, IML_LINT Axis1Index)
Fastest access to raw elements/pixels for 2D images.
T IML_REF hp_fa (IML_LINT Axis0Index, ...)
Use for hyperplane array access, in the same spirit as fa().
iml_image_type image_type (void)
Returns the type of the image
T IML_REF operator() (IML_ULINT Index)
Use for accessing raw elements/pixels within a hyperplane in the same spirit as [].
T IML_REF operator() (IML_LINT Axis0Index, IML_LINT Axis1Index, ...)
Provides image/hyperplane element access.
T IML_REF operator() (iml_index IML_REF ImIndex)
Use an iml_index object for the hyperplane access
T IML_REF operator[] (IML_LINT Index)
Use square bracket's for the fastest access.
IML_BYTE valid_memory (void)
Returns zero if the memory allocation in the constructor failed, non-zero otherwise

Inherited from iml_image:

Public Methods

IML_ULINT byte_order_signature(void)
IML_ULINT dimension_size(IML_USINT Dim)
IML_ULINT dimension_start(IML_USINT Dim)
IML_ULINT dimensionality(void)
IML_ULINT element_count(void)
IML_ULINT get_hyperplane_size(void)
IML_ULINT hyperplane_dimension_size(IML_USINT Dim)
IML_ULINT hyperplane_dimension_start(IML_USINT Dim)
IML_ULINT hyperplane_dimensionality(void)
IML_ULINT hyperplane_element_count(void)
void select_hyperplane(IML_LINT FirstSuperAxisIndex, ...)
void set_hyperplane_size(IML_USINT OSSpace)
void shift_hyperplane_corner_by(IML_USINT Dim, IML_AXIS_TYPE V)
void shift_hyperplane_corner_to(IML_USINT Dim, IML_AXIS_TYPE V)

Documentation

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:

where OBJECT can be

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.

See the complex image class documentation for details.

iml_image_type image_type(void)
Returns the type of the image. Use this when you have only a handle on a base-class of the image (e.g. iml_image).
Returns:
Return value is one of
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

T IML_REF operator[](IML_LINT Index)

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.

Returns:
Returns a reference to the requested element/pixel.

T IML_REF fa(IML_LINT Axis0Index, IML_LINT Axis1Index)

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.

Returns:
Returns a reference to the requested element/pixel.

T IML_REF fa(IML_LINT Axis0Index, IML_LINT Axis1Index, IML_LINT Axis2Index)

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.

Returns:
Returns a reference to the requested element/pixel.

T IML_REF fa(IML_LINT Axis0Index, IML_LINT Axis1Index, IML_LINT Axis2Index, IML_LINT Axis3Index)

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.

Returns:
Returns a reference to the requested element/pixel.

T IML_REF operator()(IML_ULINT Index)

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!

Returns:
Returns a reference to the requested element/pixel.

T IML_REF hp_fa(IML_LINT Axis0Index, ...)

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.

Returns:
Returns a reference to the requested element/pixel.

T IML_REF operator()(IML_LINT Axis0Index, IML_LINT Axis1Index, ...)

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.

Returns:
Returns a reference to the requested element/pixel.

T IML_REF operator()(iml_index IML_REF ImIndex)
Use an iml_index object for the hyperplane access. Has no index-bounds checking. See the iml_index documentation for it's use.
Returns:
Returns a reference to the requested element/pixel.


Direct child classes:
iml_vector_image
iml_scalar_image

alphabetic index hierarchy of classes


generated by doc++