MeVisLab Toolbox Reference
ml::TSubImageCursorBase< DATATYPE > Class Template Reference

Base class for all TSubImage Cursors. More...

#include <mlTSubImage.h>

Inheritance diagram for ml::TSubImageCursorBase< DATATYPE >:
ml::ConstTSubImageCursor< DATATYPE > ml::TSubImageCursor< DATATYPE >

Public Member Functions

Positioning and movement of voxel cursor.
void setSubImagePosition (const ImageVector &position)
void setSubImagePosition (MLint x, MLint y, MLint z)
void setImagePosition (const ImageVector &position)
void setImagePosition (MLint x, MLint y, MLint z)
void setPosition (const DATATYPE *pointer)
 Sets the cursor to the given pointer where the pointer is the memory address of the voxel.
void moveByOffset (const ImageVector &offset)
 Moves the cursor to cursor position + offset.
void moveByOffset (MLint x, MLint y, MLint z)
 Moves the cursor to cursor position + (x, y, z).
void moveX ()
 Moves the cursor forward in x direction.
void moveY ()
 Moves the cursor forward in y direction.
void moveZ ()
 Moves the cursor forward in z direction.
void moveC ()
 Moves the cursor forward in c direction.
void moveT ()
 Moves the cursor forward in t direction.
void moveU ()
 Moves the cursor forward in u direction.
void reverseMoveX ()
 Moves the cursor backward in x direction.
void reverseMoveY ()
 Moves the cursor backward in y direction.
void reverseMoveZ ()
 Moves the cursor backward in z direction.
void reverseMoveC ()
 Moves the cursor backward in c direction.
void reverseMoveT ()
 Moves the cursor backward in t direction.
void reverseMoveU ()
 Moves the cursor backward in u direction.
Get voxel values at the cursor position.
DATATYPE getValue () const
 Returns the voxel value at cursor position.
DATATYPE getValueWithOffset (const ImageVector &offset) const
 Returns the voxel value at (cursor position + offset).
DATATYPE getValueWithOffset (MLint dx, MLint dy, MLint dz) const
 Return the voxel value at (cursor position + (dx, dy, dz)).

Protected Member Functions

 TSubImageCursorBase (const TSubImage< DATATYPE > &subImage)

Protected Attributes

DATATYPE * _data
 SubImage data.
ImageVector _subImageOffset
 SubImage offset in original image.
ImageVector _stride
 Stride for the subimage.
DATATYPE * _cursor
 Cursor address for image data access.

Detailed Description

template<typename DATATYPE>
class ml::TSubImageCursorBase< DATATYPE >

Base class for all TSubImage Cursors.

Definition at line 823 of file mlTSubImage.h.

Constructor & Destructor Documentation

◆ TSubImageCursorBase()

Member Function Documentation

◆ getValue()

template<typename DATATYPE>
DATATYPE ml::TSubImageCursorBase< DATATYPE >::getValue ( ) const
inline

Returns the voxel value at cursor position.

Definition at line 894 of file mlTSubImage.h.

References _cursor.

◆ getValueWithOffset() [1/2]

template<typename DATATYPE>
DATATYPE ml::TSubImageCursorBase< DATATYPE >::getValueWithOffset ( const ImageVector & offset) const
inline

Returns the voxel value at (cursor position + offset).

Definition at line 897 of file mlTSubImage.h.

References _cursor, _stride, and ml::TVector< TVector6DBase< MLint > >::dot().

◆ getValueWithOffset() [2/2]

template<typename DATATYPE>
DATATYPE ml::TSubImageCursorBase< DATATYPE >::getValueWithOffset ( MLint dx,
MLint dy,
MLint dz ) const
inline

Return the voxel value at (cursor position + (dx, dy, dz)).

Definition at line 900 of file mlTSubImage.h.

References _cursor, and _stride.

◆ moveByOffset() [1/2]

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::moveByOffset ( const ImageVector & offset)
inline

Moves the cursor to cursor position + offset.

Definition at line 855 of file mlTSubImage.h.

References _cursor, _stride, and ml::TVector< TVector6DBase< MLint > >::dot().

◆ moveByOffset() [2/2]

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::moveByOffset ( MLint x,
MLint y,
MLint z )
inline

Moves the cursor to cursor position + (x, y, z).

Definition at line 857 of file mlTSubImage.h.

References _cursor, and _stride.

◆ moveC()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::moveC ( )
inline

Moves the cursor forward in c direction.

Definition at line 865 of file mlTSubImage.h.

References _cursor, and _stride.

◆ moveT()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::moveT ( )
inline

Moves the cursor forward in t direction.

Definition at line 867 of file mlTSubImage.h.

References _cursor, and _stride.

◆ moveU()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::moveU ( )
inline

Moves the cursor forward in u direction.

Definition at line 869 of file mlTSubImage.h.

References _cursor, and _stride.

◆ moveX()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::moveX ( )
inline

Moves the cursor forward in x direction.

Definition at line 859 of file mlTSubImage.h.

References _cursor, and _stride.

◆ moveY()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::moveY ( )
inline

Moves the cursor forward in y direction.

Definition at line 861 of file mlTSubImage.h.

References _cursor, and _stride.

◆ moveZ()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::moveZ ( )
inline

Moves the cursor forward in z direction.

Definition at line 863 of file mlTSubImage.h.

References _cursor, and _stride.

◆ reverseMoveC()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::reverseMoveC ( )
inline

Moves the cursor backward in c direction.

Definition at line 877 of file mlTSubImage.h.

References _cursor, and _stride.

◆ reverseMoveT()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::reverseMoveT ( )
inline

Moves the cursor backward in t direction.

Definition at line 879 of file mlTSubImage.h.

References _cursor, and _stride.

◆ reverseMoveU()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::reverseMoveU ( )
inline

Moves the cursor backward in u direction.

Definition at line 881 of file mlTSubImage.h.

References _cursor, and _stride.

◆ reverseMoveX()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::reverseMoveX ( )
inline

Moves the cursor backward in x direction.

Definition at line 871 of file mlTSubImage.h.

References _cursor, and _stride.

◆ reverseMoveY()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::reverseMoveY ( )
inline

Moves the cursor backward in y direction.

Definition at line 873 of file mlTSubImage.h.

References _cursor, and _stride.

◆ reverseMoveZ()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::reverseMoveZ ( )
inline

Moves the cursor backward in z direction.

Definition at line 875 of file mlTSubImage.h.

References _cursor, and _stride.

◆ setImagePosition() [1/2]

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::setImagePosition ( const ImageVector & position)
inline

Sets the cursor to the given 6D position relative to the origin of the complete image region. This is, the position p=getBox.v1() is considered the origin of the subimage region.

Definition at line 848 of file mlTSubImage.h.

References _cursor, _data, _ML_TSUBIMG_SUBDOT6, _stride, and _subImageOffset.

◆ setImagePosition() [2/2]

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::setImagePosition ( MLint x,
MLint y,
MLint z )
inline

Sets the cursor to the given 3D position (x, y, z) relative to the origin of the complete image region. This is, the position p=getBox.v1() is considered the origin of the subimage region.

Definition at line 851 of file mlTSubImage.h.

References _cursor, _data, _ML_TSUBIMG_SUBDOT3, _stride, and _subImageOffset.

◆ setPosition()

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::setPosition ( const DATATYPE * pointer)
inline

Sets the cursor to the given pointer where the pointer is the memory address of the voxel.

Definition at line 853 of file mlTSubImage.h.

References _cursor.

◆ setSubImagePosition() [1/2]

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::setSubImagePosition ( const ImageVector & position)
inline

Sets the cursor to the given position relative to the origin of the subimage region. This is, the position (0,0,0,0,0,0) is considered the origin of the subimage.

Definition at line 842 of file mlTSubImage.h.

References _cursor, _data, _stride, and ml::TVector< TVector6DBase< MLint > >::dot().

◆ setSubImagePosition() [2/2]

template<typename DATATYPE>
void ml::TSubImageCursorBase< DATATYPE >::setSubImagePosition ( MLint x,
MLint y,
MLint z )
inline

Sets the cursor to the given 3D position (x, y, z) relative to the origin of the subimage region. This is, the position (0,0,0,0,0,0) is considered the origin of the subimage.

Definition at line 845 of file mlTSubImage.h.

References _cursor, _data, and _stride.

Member Data Documentation

◆ _cursor

◆ _data

template<typename DATATYPE>
DATATYPE* ml::TSubImageCursorBase< DATATYPE >::_data
protected

◆ _stride

◆ _subImageOffset

template<typename DATATYPE>
ImageVector ml::TSubImageCursorBase< DATATYPE >::_subImageOffset
protected

SubImage offset in original image.

Definition at line 908 of file mlTSubImage.h.

Referenced by setImagePosition(), setImagePosition(), and TSubImageCursorBase().


The documentation for this class was generated from the following file: