ML Reference
|
This template class manages/represents a rectangular 6d image region in memory which is organized linearly. More...
#include <mlTSubImage.h>
Public Types | |
typedef TSubImageCursor< DATATYPE > | Cursor |
A read/write cursor. | |
typedef ConstTSubImageCursor < DATATYPE > | ConstCursor |
A read-only cursor. | |
Public Member Functions | |
Constructors | |
TSubImage (const SubImageBox &box, MLDataType dataType, void *data) | |
Constructor for an image region with location/extent box , with data type dataType (must fit to DATATYPE!) and the memory address data which hold the image region. | |
TSubImage () | |
Default constructor to build a typed subimage (with an empty box) from scratch. | |
TSubImage (const SubImage &subImage) | |
Constructor to build a typed subimage from an untyped subImage . | |
TSubImage (const TSubImage< DATATYPE > &typedSubImage) | |
Copy constructor to get an identical copy. | |
virtual | ~TSubImage () |
Virtual destructor to shut up compiler warnings. | |
TSubImage & | operator= (const TSubImage< DATATYPE > &typedSubImage) |
Assignment operator to get an identical copy. | |
Properties of TSubImage | |
const DATATYPE * | getData () const |
Returns memory address of image region (Overloads method from SubImage) | |
DATATYPE * | getData () |
Calculation of memory addresses of image voxels | |
const DATATYPE * | getSubImagePointer (const ImageVector &position) const |
Returns a pointer to voxel data of image voxel at the 6d position relative to the begin of the subimage region. | |
DATATYPE * | getSubImagePointer (const ImageVector &position) |
const DATATYPE * | getSubImagePointer (MLint x, MLint y, MLint z) const |
Returns a pointer to voxel data of image voxel at 3d position p=(x , y , z ) relative to the begin of the subimage region. | |
DATATYPE * | getSubImagePointer (MLint x, MLint y, MLint z) |
const DATATYPE * | getImagePointer (const ImageVector &position) const |
Returns a pointer to voxel data of image voxel at 6d position position relative to the begin of the complete image region. | |
DATATYPE * | getImagePointer (const ImageVector &position) |
const DATATYPE * | getImagePointer (MLint x, MLint y, MLint z) const |
Returns a pointer to voxel data of image voxel at 3d position p=(x , y , z ) relative to the begin of the complete image region. | |
DATATYPE * | getImagePointer (MLint x, MLint y, MLint z) |
Calculate coordinates from pointers into image data(from memory positions) | |
ImageVector | convertPointerToSubImagePosition (DATATYPE *pointer) const |
Returns 6d voxel coordinates corresponding to the memory address pointer . | |
void | convertPointerToSubImagePosition (DATATYPE *pointer, MLint *x, MLint *y, MLint *z) const |
Returns 3d voxel coordinates corresponding to the memory address pointer . | |
ImageVector | convertPointerToImagePosition (DATATYPE *pointer) const |
Returns 6d voxel coordinates corresponding to the memory address pointer . | |
void | convertPointerToImagePosition (DATATYPE *pointer, MLint *x, MLint *y, MLint *z) const |
Returns 3d voxel coordinates corresponding to the memory address pointer . | |
Set/Get voxel data | |
const DATATYPE & | operator[] (const ImageVector &position) const |
Constant reference access to voxel value at the given position . | |
DATATYPE & | operator[] (const ImageVector &position) |
Reference access to voxel value at the given position . | |
void | setSubImageValue (const ImageVector &position, DATATYPE value) |
Sets the voxel value at the given position to the given value where position is relative to the origin of the subimage region. | |
DATATYPE | getSubImageValue (const ImageVector &position) const |
Returns voxel value at the given position where position is relative to the origin of the subimage region. | |
void | setSubImageValue (MLint x, MLint y, DATATYPE value) |
Sets the voxel value at the given position(x , y ) to the given value where the position is relative to the origin of the subimage region. | |
DATATYPE | getSubImageValue (MLint x, MLint y) const |
Returns the voxel value at position (x , y ) where the position is relative to the origin of the subimage region. | |
void | setSubImageValue (MLint x, MLint y, MLint z, DATATYPE value) |
Sets the voxel value at the given position (x , y , z ) to the given value where the positionis relative to the origin of the subimage region. | |
DATATYPE | getSubImageValue (MLint x, MLint y, MLint z) const |
Returns the voxel value at the given position (x , y , z ) where the position is relative to the origin of the subimage region. | |
void | setImageValue (const ImageVector &position, DATATYPE value) |
Sets the 6d voxel at the given position to the given value . | |
DATATYPE | getImageValue (const ImageVector &position) const |
Returns the 6d voxel value from the given position . | |
void | setImageValue (MLint x, MLint y, DATATYPE value) |
Sets the 2d voxel at the given position (x , y ) to the the given value . | |
DATATYPE | getImageValue (MLint x, MLint y) const |
Returns the 2d voxel value from the given position (x , y ). | |
void | setImageValue (MLint x, MLint y, MLint z, DATATYPE value) |
Sets the 3d voxel at the given position (x , y , z ) to the given value . | |
DATATYPE | getImageValue (MLint x, MLint y, MLint z) const |
Returns the 3d voxel value from given position (x , y , z ). | |
Return min/max values of subimage | |
MLint | calculateMinMax (DATATYPE &minValue, DATATYPE &maxValue, const SubImageBox *const validBox=NULL) const |
Scans subimage and determines minimum and maximum values of the region which is part of subimage box and of validBox . | |
Copying voxel from one subimage to another | |
template<typename FROM_DATATYPE > | |
void | copySubImageReorderColorPlanesToInterleaved (const TSubImage< FROM_DATATYPE > &typedFromImage, const ScaleShiftData &scaleShiftData) |
Implements special case for void copySubImageTyped(const TSubImage<FROM_DATATYPE> &typedFromImg, const ScaleShiftData& scaleShiftData) where color planes shall be interleaved instead of in planes. | |
template<typename FROM_DATATYPE > | |
void | copySubImageTyped (const TSubImage< FROM_DATATYPE > &typedFromImg, const ScaleShiftData &scaleShiftData) |
Copies image data from the subimage fromImg into the overlapping region of this subimage. | |
SUBIMAGE FILLING | |
void | fill (DATATYPE value) |
Sets all voxel values in subimage to value . | |
void | fillBordersWithValue (const SubImageBox &box, DATATYPE fillValue) |
Fills all regions with fillValue which are not covered by box . | |
void | fillInvalidRegionWithValue (DATATYPE value) |
Fills the invalid region (everything outside of getValidRegion()) with the given value . | |
void | fillInvalidRegionWithBorderValues () |
Fills the invalid region (everything outside of getValidRegion()) with the values on the borders of the valid region. | |
Deprecated | |
const DATATYPE * | getSubImgPos (const ImageVector &p) const |
DATATYPE * | getSubImgPos (const ImageVector &p) |
const DATATYPE * | getSubImgPos (MLint x, MLint y, MLint z) const |
DATATYPE * | getSubImgPos (MLint x, MLint y, MLint z) |
const DATATYPE * | getImgPos (const ImageVector &p) const |
DATATYPE * | getImgPos (const ImageVector &p) |
const DATATYPE * | getImgPos (MLint x, MLint y, MLint z) const |
DATATYPE * | getImgPos (MLint x, MLint y, MLint z) |
ImageVector | getSubImgCoords (DATATYPE *pos) const |
void | getSubImgCoords (DATATYPE *pos, MLint *x, MLint *y, MLint *z) const |
ImageVector | getImgCoords (DATATYPE *pos) const |
void | getImgCoords (DATATYPE *pos, MLint *x, MLint *y, MLint *z) const |
void | setSubImgVal (const ImageVector &p, DATATYPE val) |
DATATYPE | getSubImgVal (const ImageVector &p) const |
void | setSubImgVal (MLint x, MLint y, DATATYPE val) |
DATATYPE | getSubImgVal (MLint x, MLint y) const |
void | setSubImgVal (MLint x, MLint y, MLint z, DATATYPE val) |
DATATYPE | getSubImgVal (MLint x, MLint y, MLint z) const |
void | setImgVal (const ImageVector &p, DATATYPE val) |
DATATYPE | getImgVal (const ImageVector &p) const |
void | setImgVal (MLint x, MLint y, DATATYPE val) |
DATATYPE | getImgVal (MLint x, MLint y) const |
void | setImgVal (MLint x, MLint y, MLint z, DATATYPE val) |
DATATYPE | getImgVal (MLint x, MLint y, MLint z) const |
MLint | calcMinMax (DATATYPE &minVal, DATATYPE &maxVal, const SubImageBox *const validBox=NULL) const |
template<typename FROM_DATATYPE > | |
void | copySubImg (const TSubImage< FROM_DATATYPE > &typedFromImg) |
template<typename FROM_DATATYPE > | |
void | copySubImg (const TSubImage< FROM_DATATYPE > &typedFromImg, const ScaleShiftData &scaleShiftData) |
void | fillSubImg (DATATYPE value) |
void | fillBordersWithClampedInputValues (const SubImageBox &box) |
void | fillBordersWithFillValue (const SubImageBox &box, DATATYPE value) |
This template class manages/represents a rectangular 6d image region in memory which is organized linearly.
It inherits the functionality of SubImage and adds data type specific access functions to that class. Apart from the direct data access methods, there are the TSubImage::Cursor and TSubImage::ConstCursor classes, which allow to work on the typed data with cursor positioning/movements.
A const TSubImage can be used to only allow const access to the underlying image data.
Thread-safety: This class is reentrant.
This template class owns
DATATYPE value; ImageVector p(......); // Define coordinate value = getImgVal(p); // Get voxel value from image setImgVal(p,value); // Set value of voxel p in image
Notes: In the overloaded Module::calculateOutputSubImage, the Host passes untyped subimages (see SubImage). The image processing module usually needs to build typed wrappers around these untyped SubImages to have easy access to them. Then this class represents typed input tiles and output pages for image processing algorithms. Algorithms which have different typed input images can build easily template code to access the image data correctly. The methods to access image voxels are designed for image manipulation to be used by algorithm developers.
Definition at line 140 of file mlTSubImage.h.
typedef ConstTSubImageCursor<DATATYPE> ml::TSubImage< DATATYPE >::ConstCursor |
A read-only cursor.
Definition at line 148 of file mlTSubImage.h.
typedef TSubImageCursor<DATATYPE> ml::TSubImage< DATATYPE >::Cursor |
A read/write cursor.
Definition at line 146 of file mlTSubImage.h.
ml::TSubImage< DATATYPE >::TSubImage | ( | const SubImageBox & | box, |
MLDataType | dataType, | ||
void * | data | ||
) | [inline] |
Constructor for an image region with location/extent box
, with data type dataType
(must fit to DATATYPE!) and the memory address data
which hold the image region.
Note: The specification of dataType
would usually not be necessary because it could be derived from DATATYPE. Anyway, one or two modules use differing DATATYPE and dataType
for special purposes. Moreover, the derivation of dataType
from template parameter DATATYPE is a little bit nasty, so we leave this constructor as it is. Note that this may be changed in future. Differing template data types and passed dataType
enums will be handled as fatal error if real data is set.
Definition at line 165 of file mlTSubImage.h.
References ML_BAD_DATA_TYPE, ML_CATCH_RETHROW, ML_PRINT_FATAL_ERROR, ML_TRACE_IN, and ML_TRY.
ml::TSubImage< DATATYPE >::TSubImage | ( | ) | [inline] |
Default constructor to build a typed subimage (with an empty box) from scratch.
Initial values will be an empty SubImageBox as box, the ML data type is derived from the template type, and data is initialized to NULL. See also the documentation of TSubImage(const SubImageBox& box, MLDataType dataType, void* data).
Definition at line 185 of file mlTSubImage.h.
References ML_BAD_DATA_TYPE, ML_CATCH_RETHROW, ML_INVALID_DATA_TYPE, ML_PRINT_FATAL_ERROR, ML_TRACE_IN, and ML_TRY.
ml::TSubImage< DATATYPE >::TSubImage | ( | const SubImage & | subImage | ) | [inline] |
Constructor to build a typed subimage from an untyped subImage
.
See also the documentation of TSubImage(const SubImageBox& box, MLDataType dataType, void* data). NOTE: This does not take over the MemoryBlockHandle of the given subImage
for performance reasons. You need to explicitly set the handle on the TSubImage if you want the TSubImage to reference count the data.
Definition at line 207 of file mlTSubImage.h.
References ml::SubImage::getBox(), ml::SubImage::getData(), ml::SubImage::getDataType(), ml::SubImage::getSourceImageExtent(), ML_BAD_DATA_TYPE, ML_CATCH_RETHROW, ML_PRINT_FATAL_ERROR, ML_TRACE_IN, and ML_TRY.
ml::TSubImage< DATATYPE >::TSubImage | ( | const TSubImage< DATATYPE > & | typedSubImage | ) | [inline] |
Copy constructor to get an identical copy.
Note that only the pointer to the data is copied, and NOT the data itself.
Definition at line 237 of file mlTSubImage.h.
References ML_TRACE_IN_TIME_CRITICAL.
virtual ml::TSubImage< DATATYPE >::~TSubImage | ( | ) | [inline, virtual] |
Virtual destructor to shut up compiler warnings.
Definition at line 244 of file mlTSubImage.h.
References ML_TRACE_IN_TIME_CRITICAL.
MLint ml::TSubImage< DATATYPE >::calcMinMax | ( | DATATYPE & | minVal, |
DATATYPE & | maxVal, | ||
const SubImageBox *const | validBox = NULL |
||
) | const [inline] |
Definition at line 974 of file mlTSubImage.h.
MLint ml::TSubImage< DATATYPE >::calculateMinMax | ( | DATATYPE & | minValue, |
DATATYPE & | maxValue, | ||
const SubImageBox *const | validBox = NULL |
||
) | const [inline] |
Scans subimage and determines minimum and maximum values of the region which is part of subimage box and of validBox
.
If no validBox
is passed (default), all voxels are checked. The return value is the number of scanned voxels. If subimage is empty, minValue
and maxValue
are set to 0 and return value is 0. Warning: If used in calculateOutputSubImage take in consideration that the page may also contain invalid data which is not part of the image. Pass image box as validBox
to be sure to access only valid regions.
Definition at line 474 of file mlTSubImage.h.
References ml::TSubImageBox< intT >::getNumVoxels(), ml::ImageVector, ML_CATCH_RETHROW, ML_CHECK_THROW, ML_TRACE_IN, ML_TRY, ml::TImageVector< CompIntType >::set(), ml::TSubImageBox< intT >::v1, and ml::TSubImageBox< intT >::v2.
ImageVector ml::TSubImage< DATATYPE >::convertPointerToImagePosition | ( | DATATYPE * | pointer | ) | const [inline] |
Returns 6d voxel coordinates corresponding to the memory address pointer
.
The returned coordinates are relative to the origin of the complete image region. I.e., the position p=getBox.v1() is considered the origin of the image region/subimage.
Definition at line 365 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::convertPointerToImagePosition | ( | DATATYPE * | pointer, |
MLint * | x, | ||
MLint * | y, | ||
MLint * | z | ||
) | const [inline] |
Returns 3d voxel coordinates corresponding to the memory address pointer
.
The returned coordinates are relative to the origin of the complete image region. I.e., the position p=getBox.v1() is considered the origin of the image region/subimage. It is legal to pass x
, y
and/or z
as NULL pointers; their values are only set if pointer is non NULL.
Definition at line 374 of file mlTSubImage.h.
ImageVector ml::TSubImage< DATATYPE >::convertPointerToSubImagePosition | ( | DATATYPE * | pointer | ) | const [inline] |
Returns 6d voxel coordinates corresponding to the memory address pointer
.
The returned coordinates are relative to the origin of the subimage region. I.e., the position (0,0,0,0,0,0) is considered the origin of the subimage.
Definition at line 323 of file mlTSubImage.h.
References ml::TVector< TVectorBase >::getVectorPosition().
void ml::TSubImage< DATATYPE >::convertPointerToSubImagePosition | ( | DATATYPE * | pointer, |
MLint * | x, | ||
MLint * | y, | ||
MLint * | z | ||
) | const [inline] |
Returns 3d voxel coordinates corresponding to the memory address pointer
.
The returned coordinates are relative to the origin of the subimage region. I.e., the position (0,0,0,0,0,0) is considered the origin of the subimage. It is legal to pass x
, y
and/or z
as NULL pointers; their values are only set if pointer is non NULL.
Definition at line 331 of file mlTSubImage.h.
References ml::ImageVector, ML_CATCH_RETHROW, ML_CHECK_THROW, ML_TRACE_IN, and ML_TRY.
void ml::TSubImage< DATATYPE >::copySubImageReorderColorPlanesToInterleaved | ( | const TSubImage< FROM_DATATYPE > & | typedFromImage, |
const ScaleShiftData & | scaleShiftData | ||
) | [inline] |
Implements special case for void copySubImageTyped(const TSubImage<FROM_DATATYPE> &typedFromImg, const ScaleShiftData& scaleShiftData) where color planes shall be interleaved instead of in planes.
Definition at line 557 of file mlTSubImage.h.
References _ML_CHECK_SUBIMAGE_DATA_POINTERS, _ML_TSUBIMG_SUBDOT6, ml::SubImage::getBox(), ml::TSubImage< DATATYPE >::getData(), ml::TSubImage< DATATYPE >::getImagePointer(), ml::TScaleShiftData< DT >::getScale(), ml::TScaleShiftData< DT >::getShift(), ml::TVector< TVectorBase >::getStrides(), ml::ImageVector, ml::TSubImageBox< intT >::isEmpty(), ML_CATCH_RETHROW, ML_TRACE_IN, ML_TRY, MLValuesAreEqual(), ml::TSubImageBox< intT >::v1, and ml::TSubImageBox< intT >::v2.
void ml::TSubImage< DATATYPE >::copySubImageTyped | ( | const TSubImage< FROM_DATATYPE > & | typedFromImg, |
const ScaleShiftData & | scaleShiftData | ||
) | [inline] |
Copies image data from the subimage fromImg into the overlapping region of this subimage.
Grey values are transformed linearly according to the settings in scaleShiftData (see ScaleShiftData). Notes:
Definition at line 655 of file mlTSubImage.h.
References _ML_CHECK_SUBIMAGE_DATA_POINTERS, ml::SubImage::getBox(), ml::TSubImage< DATATYPE >::getData(), ml::SubImage::getDataType(), ml::TSubImage< DATATYPE >::getImagePointer(), ml::TScaleShiftData< DT >::getReorderMode(), ml::TScaleShiftData< DT >::getScale(), ml::TScaleShiftData< DT >::getShift(), ml::SubImage::getStride(), ml::ImageVector, ml::TSubImageBox< intT >::isEmpty(), ML_CATCH_RETHROW, ML_CHECK_THROW, ML_TRACE_IN, ML_TRY, MLIsScalarTypePtr(), MLSizeOf(), MLValuesAreEqual(), ml::TSubImageBox< intT >::v1, and ml::TSubImageBox< intT >::v2.
void ml::TSubImage< DATATYPE >::copySubImg | ( | const TSubImage< FROM_DATATYPE > & | typedFromImg, |
const ScaleShiftData & | scaleShiftData | ||
) | [inline] |
Definition at line 982 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::copySubImg | ( | const TSubImage< FROM_DATATYPE > & | typedFromImg | ) | [inline] |
Definition at line 978 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::fill | ( | DATATYPE | value | ) | [inline] |
Sets all voxel values in subimage to value
.
Definition at line 847 of file mlTSubImage.h.
References ML_CATCH_RETHROW, ML_CHECK_THROW, ML_TRACE_IN, and ML_TRY.
void ml::TSubImage< DATATYPE >::fillBordersWithClampedInputValues | ( | const SubImageBox & | box | ) | [inline] |
Reimplemented from ml::SubImage.
Definition at line 989 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::fillBordersWithFillValue | ( | const SubImageBox & | box, |
DATATYPE | value | ||
) | [inline] |
Definition at line 993 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::fillBordersWithValue | ( | const SubImageBox & | box, |
DATATYPE | fillValue | ||
) | [inline] |
Fills all regions with fillValue
which are not covered by box
.
Note that box
must be specified in global image coordinates. So two subimages with different origins and same sizes are filled differently, dependent on their overlap with the box
in global image coordinates. The cursor position is left undefined.
Definition at line 869 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::fillInvalidRegionWithBorderValues | ( | ) | [inline] |
Fills the invalid region (everything outside of getValidRegion()) with the values on the borders of the valid region.
This is useful to initialize invalid regions of an output/input sub image.
Reimplemented from ml::SubImage.
Definition at line 887 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::fillInvalidRegionWithValue | ( | DATATYPE | value | ) | [inline] |
Fills the invalid region (everything outside of getValidRegion()) with the given value
.
This is useful to initialize invalid regions of an output/input sub image.
Definition at line 878 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::fillSubImg | ( | DATATYPE | value | ) | [inline] |
Definition at line 985 of file mlTSubImage.h.
const DATATYPE* ml::TSubImage< DATATYPE >::getData | ( | ) | const [inline] |
Returns memory address of image region (Overloads method from SubImage)
Reimplemented from ml::SubImage.
Definition at line 266 of file mlTSubImage.h.
Referenced by ml::TSubImage< DATATYPE >::copySubImageReorderColorPlanesToInterleaved(), ml::TSubImage< DATATYPE >::copySubImageTyped(), and ml::TSubImageCursorBase< DATATYPE >::TSubImageCursorBase().
DATATYPE* ml::TSubImage< DATATYPE >::getData | ( | ) | [inline] |
Definition at line 267 of file mlTSubImage.h.
const DATATYPE* ml::TSubImage< DATATYPE >::getImagePointer | ( | const ImageVector & | position | ) | const [inline] |
Returns a pointer to voxel data of image voxel at 6d position position
relative to the begin of the complete image region.
The subimage is a part of the complete image. I.e., the position p=getBox.v1() is considered the origin of the image region/subimage.
Reimplemented from ml::SubImage.
Definition at line 302 of file mlTSubImage.h.
References _ML_TSUBIMG_SUBDOT6.
Referenced by ml::TSubImage< DATATYPE >::copySubImageReorderColorPlanesToInterleaved(), and ml::TSubImage< DATATYPE >::copySubImageTyped().
const DATATYPE* ml::TSubImage< DATATYPE >::getImagePointer | ( | MLint | x, |
MLint | y, | ||
MLint | z | ||
) | const [inline] |
Returns a pointer to voxel data of image voxel at 3d position p=(x
, y
, z
) relative to the begin of the complete image region.
The subimage is a part of the complete image. I.e., the position p=getBox.v1() is considered the origin of the image region/subimage.
Reimplemented from ml::SubImage.
Definition at line 310 of file mlTSubImage.h.
References _ML_TSUBIMG_SUBDOT3.
DATATYPE* ml::TSubImage< DATATYPE >::getImagePointer | ( | MLint | x, |
MLint | y, | ||
MLint | z | ||
) | [inline] |
Definition at line 311 of file mlTSubImage.h.
References _ML_TSUBIMG_SUBDOT3.
DATATYPE* ml::TSubImage< DATATYPE >::getImagePointer | ( | const ImageVector & | position | ) | [inline] |
Definition at line 303 of file mlTSubImage.h.
References _ML_TSUBIMG_SUBDOT6.
DATATYPE ml::TSubImage< DATATYPE >::getImageValue | ( | const ImageVector & | position | ) | const [inline] |
Returns the 6d voxel value from the given position
.
The position
is relative to the origin of the complete image region. I.e., the position p=getBox.v1() is considered the origin of the image region/subimage.
Definition at line 437 of file mlTSubImage.h.
DATATYPE ml::TSubImage< DATATYPE >::getImageValue | ( | MLint | x, |
MLint | y | ||
) | const [inline] |
Returns the 2d voxel value from the given position (x
, y
).
The given position is relative to the origin of the complete image region. I.e., the position p=getBox.v1() is considered the origin of the image region/subimage.
Definition at line 446 of file mlTSubImage.h.
References _ML_TSUBIMG_SUBDOT2.
DATATYPE ml::TSubImage< DATATYPE >::getImageValue | ( | MLint | x, |
MLint | y, | ||
MLint | z | ||
) | const [inline] |
Returns the 3d voxel value from given position (x
, y
, z
).
The given position is relative to the origin of the complete image region. I.e., the position p=getBox.v1() is considered the origin of the image region/subimage.
Definition at line 455 of file mlTSubImage.h.
ImageVector ml::TSubImage< DATATYPE >::getImgCoords | ( | DATATYPE * | pos | ) | const [inline] |
Definition at line 932 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::getImgCoords | ( | DATATYPE * | pos, |
MLint * | x, | ||
MLint * | y, | ||
MLint * | z | ||
) | const [inline] |
Definition at line 935 of file mlTSubImage.h.
const DATATYPE* ml::TSubImage< DATATYPE >::getImgPos | ( | const ImageVector & | p | ) | const [inline] |
Definition at line 914 of file mlTSubImage.h.
DATATYPE* ml::TSubImage< DATATYPE >::getImgPos | ( | const ImageVector & | p | ) | [inline] |
Definition at line 917 of file mlTSubImage.h.
const DATATYPE* ml::TSubImage< DATATYPE >::getImgPos | ( | MLint | x, |
MLint | y, | ||
MLint | z | ||
) | const [inline] |
Definition at line 920 of file mlTSubImage.h.
DATATYPE* ml::TSubImage< DATATYPE >::getImgPos | ( | MLint | x, |
MLint | y, | ||
MLint | z | ||
) | [inline] |
Definition at line 923 of file mlTSubImage.h.
DATATYPE ml::TSubImage< DATATYPE >::getImgVal | ( | const ImageVector & | p | ) | const [inline] |
Definition at line 959 of file mlTSubImage.h.
DATATYPE ml::TSubImage< DATATYPE >::getImgVal | ( | MLint | x, |
MLint | y | ||
) | const [inline] |
Definition at line 965 of file mlTSubImage.h.
DATATYPE ml::TSubImage< DATATYPE >::getImgVal | ( | MLint | x, |
MLint | y, | ||
MLint | z | ||
) | const [inline] |
Definition at line 971 of file mlTSubImage.h.
const DATATYPE* ml::TSubImage< DATATYPE >::getSubImagePointer | ( | const ImageVector & | position | ) | const [inline] |
Returns a pointer to voxel data of image voxel at the 6d position
relative to the begin of the subimage region.
I.e., the position (0,0,0,0,0,0) is considered the origin of the subimage.
Reimplemented from ml::SubImage.
Definition at line 282 of file mlTSubImage.h.
DATATYPE* ml::TSubImage< DATATYPE >::getSubImagePointer | ( | const ImageVector & | position | ) | [inline] |
Definition at line 283 of file mlTSubImage.h.
const DATATYPE* ml::TSubImage< DATATYPE >::getSubImagePointer | ( | MLint | x, |
MLint | y, | ||
MLint | z | ||
) | const [inline] |
Returns a pointer to voxel data of image voxel at 3d position p=(x
, y
, z
) relative to the begin of the subimage region.
I.e., the position (0,0,0,0,0,0) is considered the origin of the subimage and higher coordinates c, t and u are taken as 0 values.
Reimplemented from ml::SubImage.
Definition at line 294 of file mlTSubImage.h.
DATATYPE* ml::TSubImage< DATATYPE >::getSubImagePointer | ( | MLint | x, |
MLint | y, | ||
MLint | z | ||
) | [inline] |
Definition at line 295 of file mlTSubImage.h.
DATATYPE ml::TSubImage< DATATYPE >::getSubImageValue | ( | const ImageVector & | position | ) | const [inline] |
Returns voxel value at the given position
where position
is relative to the origin of the subimage region.
I.e., the position (0,0,0,0,0,0) is considered the origin of the subimage.
Definition at line 410 of file mlTSubImage.h.
DATATYPE ml::TSubImage< DATATYPE >::getSubImageValue | ( | MLint | x, |
MLint | y, | ||
MLint | z | ||
) | const [inline] |
Returns the voxel value at the given position (x
, y
, z
) where the position is relative to the origin of the subimage region.
I.e., the position (0,0,0) is considered the origin of the subimage.
Definition at line 428 of file mlTSubImage.h.
DATATYPE ml::TSubImage< DATATYPE >::getSubImageValue | ( | MLint | x, |
MLint | y | ||
) | const [inline] |
Returns the voxel value at position (x
, y
) where the position is relative to the origin of the subimage region.
I.e., the position (0,0) is considered the origin of the subimage.
Definition at line 419 of file mlTSubImage.h.
ImageVector ml::TSubImage< DATATYPE >::getSubImgCoords | ( | DATATYPE * | pos | ) | const [inline] |
Definition at line 926 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::getSubImgCoords | ( | DATATYPE * | pos, |
MLint * | x, | ||
MLint * | y, | ||
MLint * | z | ||
) | const [inline] |
Definition at line 929 of file mlTSubImage.h.
const DATATYPE* ml::TSubImage< DATATYPE >::getSubImgPos | ( | const ImageVector & | p | ) | const [inline] |
Definition at line 902 of file mlTSubImage.h.
DATATYPE* ml::TSubImage< DATATYPE >::getSubImgPos | ( | const ImageVector & | p | ) | [inline] |
Definition at line 905 of file mlTSubImage.h.
const DATATYPE* ml::TSubImage< DATATYPE >::getSubImgPos | ( | MLint | x, |
MLint | y, | ||
MLint | z | ||
) | const [inline] |
Definition at line 908 of file mlTSubImage.h.
DATATYPE* ml::TSubImage< DATATYPE >::getSubImgPos | ( | MLint | x, |
MLint | y, | ||
MLint | z | ||
) | [inline] |
Definition at line 911 of file mlTSubImage.h.
DATATYPE ml::TSubImage< DATATYPE >::getSubImgVal | ( | MLint | x, |
MLint | y, | ||
MLint | z | ||
) | const [inline] |
Definition at line 953 of file mlTSubImage.h.
DATATYPE ml::TSubImage< DATATYPE >::getSubImgVal | ( | const ImageVector & | p | ) | const [inline] |
Definition at line 941 of file mlTSubImage.h.
DATATYPE ml::TSubImage< DATATYPE >::getSubImgVal | ( | MLint | x, |
MLint | y | ||
) | const [inline] |
Definition at line 947 of file mlTSubImage.h.
TSubImage& ml::TSubImage< DATATYPE >::operator= | ( | const TSubImage< DATATYPE > & | typedSubImage | ) | [inline] |
Assignment operator to get an identical copy.
Note that only the pointer to the data is copied, and NOT the data itself.
Definition at line 248 of file mlTSubImage.h.
References ML_CATCH_RETHROW, ML_TRACE_IN_TIME_CRITICAL, and ML_TRY.
DATATYPE& ml::TSubImage< DATATYPE >::operator[] | ( | const ImageVector & | position | ) | [inline] |
Reference access to voxel value at the given position
.
The caller must guarantee that position
is inside valid subimage region. The position (0,0,0,0,0,0) is considered the origin of the image, getBox.v1() is considered the origin of the valid subimage area. Note that this operator access always calculates all six coordinate components.
Definition at line 400 of file mlTSubImage.h.
const DATATYPE& ml::TSubImage< DATATYPE >::operator[] | ( | const ImageVector & | position | ) | const [inline] |
Constant reference access to voxel value at the given position
.
The caller must guarantee that position
is inside valid subimage region. The position (0,0,0,0,0,0) is considered the origin of the image, getBox.v1() is considered the origin of the valid subimage area. Note that this operator access always calculates all six coordinate components.
Definition at line 394 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::setImageValue | ( | MLint | x, |
MLint | y, | ||
MLint | z, | ||
DATATYPE | value | ||
) | [inline] |
Sets the 3d voxel at the given position (x
, y
, z
) to the given value
.
The given position is relative to the origin of the complete image region. I.e., the position p=getBox.v1() is considered the origin of the image region/subimage.
Definition at line 451 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::setImageValue | ( | const ImageVector & | position, |
DATATYPE | value | ||
) | [inline] |
Sets the 6d voxel at the given position
to the given value
.
The position
is relative to the origin of the complete image region. I.e., the position p=getBox.v1() is considered the origin of the image region/subimage.
Definition at line 433 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::setImageValue | ( | MLint | x, |
MLint | y, | ||
DATATYPE | value | ||
) | [inline] |
Sets the 2d voxel at the given position (x
, y
) to the the given value
.
The given position is relative to the origin of the complete image region. I.e., the position p=getBox.v1() is considered the origin of the image region/subimage.
Definition at line 442 of file mlTSubImage.h.
References _ML_TSUBIMG_SUBDOT2.
void ml::TSubImage< DATATYPE >::setImgVal | ( | const ImageVector & | p, |
DATATYPE | val | ||
) | [inline] |
Definition at line 956 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::setImgVal | ( | MLint | x, |
MLint | y, | ||
DATATYPE | val | ||
) | [inline] |
Definition at line 962 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::setImgVal | ( | MLint | x, |
MLint | y, | ||
MLint | z, | ||
DATATYPE | val | ||
) | [inline] |
Definition at line 968 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::setSubImageValue | ( | MLint | x, |
MLint | y, | ||
DATATYPE | value | ||
) | [inline] |
Sets the voxel value at the given position(x
, y
) to the given value
where the position is relative to the origin of the subimage region.
I.e., the position (0,0) is considered the origin of the subimage.
Definition at line 415 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::setSubImageValue | ( | MLint | x, |
MLint | y, | ||
MLint | z, | ||
DATATYPE | value | ||
) | [inline] |
Sets the voxel value at the given position (x
, y
, z
) to the given value
where the positionis relative to the origin of the subimage region.
I.e., the position (0,0,0) is considered the origin of the subimage.
Definition at line 424 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::setSubImageValue | ( | const ImageVector & | position, |
DATATYPE | value | ||
) | [inline] |
Sets the voxel value at the given position
to the given value
where position
is relative to the origin of the subimage region.
I.e., the position (0,0,0,0,0,0) is considered the origin of the subimage.
Definition at line 405 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::setSubImgVal | ( | MLint | x, |
MLint | y, | ||
DATATYPE | val | ||
) | [inline] |
Definition at line 944 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::setSubImgVal | ( | MLint | x, |
MLint | y, | ||
MLint | z, | ||
DATATYPE | val | ||
) | [inline] |
Definition at line 950 of file mlTSubImage.h.
void ml::TSubImage< DATATYPE >::setSubImgVal | ( | const ImageVector & | p, |
DATATYPE | val | ||
) | [inline] |
Definition at line 938 of file mlTSubImage.h.