|
MeVisLab Toolbox Reference
|
#include <mlTSubImage.h>
Public Member Functions | |
| TSubImageWithCursor () | |
| Default constructor. | |
| TSubImageWithCursor (const TSubImage< DATATYPE > &subImage) | |
| Constructor with TSubImage. | |
| TSubImageWithCursor (const SubImage &subImage) | |
| Constructor with SubImage. | |
| TSubImageWithCursor (const TSubImageWithCursor &subImage) | |
| Constructor with TSubImageWithCursor. | |
| TSubImageWithCursor & | operator= (const TSubImageWithCursor< DATATYPE > &tSubImg) |
Positioning and movement of voxel cursor. | |
| void | setCursorSubImagePosition (const ImageVector &position) |
| void | setCursorSubImagePosition (MLint x, MLint y, MLint z) |
| void | setCursorImagePosition (const ImageVector &position) |
| void | setCursorImagePosition (MLint x, MLint y, MLint z) |
| void | setCursorPosition (const DATATYPE *pointer) |
Sets the cursor to the given pointer where pointer is the memory address of the voxel. | |
| void | moveCursorByOffset (const ImageVector &offset) |
Moves the cursor to cursor position + offset. | |
| void | moveCursorByOffset (MLint x, MLint y, MLint z) |
Moves the cursor to cursor position + (x, y, z). | |
| void | moveCursorX () |
| Moves the cursor forward in x direction. | |
| void | moveCursorY () |
| Moves the cursor forward in y direction. | |
| void | moveCursorZ () |
| Moves the cursor forward in z direction. | |
| void | moveCursorC () |
| Moves the cursor forward in c direction. | |
| void | moveCursorT () |
| Moves the cursor forward in t direction. | |
| void | moveCursorU () |
| Moves the cursor forward in u direction. | |
| void | reverseMoveCursorX () |
| Moves the cursor backward in x direction. | |
| void | reverseMoveCursorY () |
| Moves the cursor backward in y direction. | |
| void | reverseMoveCursorZ () |
| Moves the cursor backward in z direction. | |
| void | reverseMoveCursorC () |
| Moves the cursor backward in c direction. | |
| void | reverseMoveCursorT () |
| Moves the cursor backward in t direction. | |
| void | reverseMoveCursorU () |
| Moves the cursor backward in u direction. | |
Get voxel values at the cursor position. | |
| DATATYPE | getCursorValue () const |
| Returns the voxel value at the cursor position. | |
| DATATYPE | getCursorValueWithOffset (const ImageVector &offset) const |
Returns the voxel value at (cursor position + offset). | |
| DATATYPE | getCursorValueWithOffset (MLint dx, MLint dy, MLint dz) const |
Returns the voxel value at (cursor position + (dx, dy, dz)). | |
Getting the cursor position as pointer to data. | |
| DATATYPE * | getCursorPointer () const |
| DATATYPE * | getCursorPointerWithOffset (const ImageVector &offset) const |
Returns the cursor pointer of the voxel computed from the current cursor shifted by offset. | |
| DATATYPE * | getCursorPointerWithOffset (MLint dx, MLint dy, MLint dz) const |
Returns the cursor pointer of the voxel computed from the current cursor shifted by (dx, dy, dz). | |
Set voxel values at the cursor position. | |
| void | setCursorValue (DATATYPE value) |
Sets the voxel value at the cursor position to value. | |
| void | setCursorValueWithOffset (const ImageVector &offset, DATATYPE value) |
Sets the voxel value at (cursor position + offset) to value. | |
| void | setCursorValueWithOffset (MLint dx, MLint dy, MLint dz, DATATYPE value) |
Sets voxel value at (cursor position + (dx, dy,dz)) to value. | |
| Public Member Functions inherited from ml::TSubImage< DATATYPE > | |
| TSubImage (const SubImageBox &box, MLDataType dataType, void *data) | |
| TSubImage () | |
| TSubImage (const SubImage &subImage) | |
| TSubImage (const TSubImage< DATATYPE > &typedSubImage) | |
| ~TSubImage () override=default | |
| Virtual destructor to suppress compiler warnings. | |
| TSubImage & | operator= (const TSubImage< DATATYPE > &typedSubImage) |
| const DATATYPE * | getData () const |
| Returns the memory address of the image region. Overloads methods from SubImage. | |
| DATATYPE * | getData () |
| const DATATYPE * | getSubImagePointer (const ImageVector &position) const |
| DATATYPE * | getSubImagePointer (const ImageVector &position) |
| const DATATYPE * | getSubImagePointer (MLint x, MLint y, MLint z) const |
| DATATYPE * | getSubImagePointer (MLint x, MLint y, MLint z) |
| const DATATYPE * | getImagePointer (const ImageVector &position) const |
| DATATYPE * | getImagePointer (const ImageVector &position) |
| const DATATYPE * | getImagePointer (MLint x, MLint y, MLint z) const |
| DATATYPE * | getImagePointer (MLint x, MLint y, MLint z) |
| ImageVector | convertPointerToSubImagePosition (DATATYPE *pointer) const |
| void | convertPointerToSubImagePosition (DATATYPE *pointer, MLint *x, MLint *y, MLint *z) const |
| ImageVector | convertPointerToImagePosition (DATATYPE *pointer) const |
| void | convertPointerToImagePosition (DATATYPE *pointer, MLint *x, MLint *y, MLint *z) const |
| const DATATYPE & | operator[] (const ImageVector &position) const |
| DATATYPE & | operator[] (const ImageVector &position) |
| void | setSubImageValue (const ImageVector &position, DATATYPE value) |
| DATATYPE | getSubImageValue (const ImageVector &position) const |
| void | setSubImageValue (MLint x, MLint y, DATATYPE value) |
| DATATYPE | getSubImageValue (MLint x, MLint y) const |
| void | setSubImageValue (MLint x, MLint y, MLint z, DATATYPE value) |
| DATATYPE | getSubImageValue (MLint x, MLint y, MLint z) const |
| void | setImageValue (const ImageVector &position, DATATYPE value) |
| DATATYPE | getImageValue (const ImageVector &position) const |
| void | setImageValue (MLint x, MLint y, DATATYPE value) |
| DATATYPE | getImageValue (MLint x, MLint y) const |
| void | setImageValue (MLint x, MLint y, MLint z, DATATYPE value) |
| DATATYPE | getImageValue (MLint x, MLint y, MLint z) const |
| MLint | calculateMinMax (DATATYPE &minValue, DATATYPE &maxValue, const SubImageBox *const validBox=nullptr) const |
| template<typename FROM_DATATYPE> | |
| void | copySubImageReorderColorPlanesToInterleaved (const TSubImage< FROM_DATATYPE > &typedFromImage, const ScaleShiftData &scaleShiftData) |
| template<typename FROM_DATATYPE> | |
| void | copySubImageTyped (const TSubImage< FROM_DATATYPE > &typedFromImg, const ScaleShiftData &scaleShiftData) |
| void | fill (DATATYPE value) |
Sets all voxel values in subimage to value. | |
| void | fillBordersWithValue (const SubImageBox &box, DATATYPE fillValue) |
| void | fillInvalidRegionWithValue (DATATYPE value) |
| void | fillInvalidRegionWithBorderValues () |
| Public Member Functions inherited from ml::SubImage | |
| const SubImageBox & | getBox () const |
| Returns the box describing the origin/extent of the subimage. | |
| void | setSourceImageExtent (const ImageVector &extent) |
| ImageVector | getSourceImageExtent () const |
| SubImageBox | getValidRegion () const |
| MLint | getNumVoxels () const |
| MLint | getSizeInBytes () const |
| ImageVector | getStride () const |
| MLint | getOffset (const ImageVector &voxelPosition) const |
Returns the array index offset from the origin (0,0,0,0,0,0) to the voxelPosition. | |
| void | setDataType (MLDataType dataType) |
| MLDataType | getDataType () const |
| Returns the type of image data. | |
| const MLTypeInfos * | getDataTypeInfos () const |
| Returns MLTypeInfos for image data type. | |
| MLEXPORT ImageProperties | toImageProperties () const |
| MLEXPORT void | setFromImageProperties (const ImageProperties &imageProperties) |
| void | toStream (std::ostream &ostr) const |
| SubImage () | |
| Constructor: Creates a subimage with no data. | |
| SubImage (const SubImage &si) | |
| SubImage (const SubImageBox &box, MLDataType datatype, void *data=nullptr) | |
| SubImage (const SubImage &si, const ImageVector &offset) | |
| virtual | ~SubImage ()=default |
| Virtual destructor to suppress compiler warnings. | |
| SubImage & | operator= (const SubImage &si) |
| void | setBox (const SubImageBox &subImageBox) |
| void | setBox (const ImageVector &imageExtent) |
| void | translate (const ImageVector &offset) |
Translates the box of the subimage by adding the vector offset. | |
| const ImageVector & | getOrigin () const |
| Returns the origin of the subimage, which is identical to getBox().v1. | |
| void | setOrigin (const ImageVector &newOrigin) |
| ImageVector | getExtent () const |
| Returns the extent of the subimage, which is identical to getBox().getExtent(). | |
| void | setExtent (MLint x, MLint y, MLint z=1, MLint c=1, MLint t=1, MLint u=1) |
| void | setExtent (const ImageVector &newExtent) |
Sets the extent of the subimage to newExtent. This also changes the strides. | |
| SubImageBox | getBoxFromExtent () const |
| Returns the size of image as box with origin 0. | |
| SubImageBox | getBoxFromImageExtent () const |
| ImageVector | getImageExtent () const |
| void | setImageExtent (const ImageVector &newExtent) |
| void * | getSubImagePointer (const ImageVector &voxelPosition) const |
| void * | getSubImagePointer (MLint x, MLint y, MLint z) const |
| void * | getImagePointer (const ImageVector &voxelPosition) const |
| void * | getImagePointer (MLint x, MLint y, MLint z) const |
| MLEXPORT void | copySubImage (const SubImage &fromImage, const ScaleShiftData &scaleShiftData) |
| MLEXPORT void | copySubImage (const SubImage &fromImage) |
| bool | isValidSubImagePosition (const ImageVector &voxelPosition) const |
| bool | isValidSubImagePosition (MLint x, MLint y, MLint z) const |
| bool | isValidImagePosition (const ImageVector &voxelPosition) const |
| bool | isValidImagePosition (MLint x, MLint y, MLint z) const |
| MLEXPORT void | allocate (MLMemoryErrorHandling handleFailure) |
| MLEXPORT void | allocateAsMemoryBlockHandle (MLMemoryErrorHandling handleFailure=ML_RETURN_NULL) |
| Allocates data using the ML memory manager. For failure handing, see SubImage::allocate(). | |
| MLEXPORT void | free () |
| MLEXPORT bool | isOneValued () const |
| MLEXPORT MLint | calculateMinMax (MLdouble &minValue, MLdouble &maxValue, const SubImageBox *const validBox=nullptr) const |
| MLEXPORT void | compare (const SubImage &subImage2, bool *regionsMatch, bool *dataTypesMatch, bool *thisBoxIsPartOfRegion2, bool *region2IsPartOfThisBox, bool *overlapHasSameValues, ImageVector *firstMismatchPos) const |
| MLEXPORT void | fill (MLdouble value) |
Fills the subimage with a value that is cast to the data type of the subimage. | |
| MLEXPORT void | fillWithTypeData (const MLTypeData *value) |
| MLEXPORT void | fillBordersWithScalarValue (const SubImageBox &box, MLdouble fillValue) |
| MLEXPORT void | fillBordersWithTypeData (const SubImageBox &box, const MLTypeData *fillValue) |
| MLEXPORT void | fillBordersWithInputValues (const SubImageBox &box, const SubImage &inputSubImage) |
| MLEXPORT void | fillBordersWithBorderValues (const SubImageBox &box) |
| void | fillInvalidRegionWithScalarValue (MLdouble value) |
| void | fillInvalidRegionWithTypeData (const MLTypeData *value) |
| void | fillInvalidRegionWithBorderValues () |
| MLEXPORT bool | isValid () const |
| void * | getData () const |
| Returns the memory address of the memory managed by the subimage. | |
| MLEXPORT void | setData (void *data) |
| MLEXPORT void | setDataFromMemoryBlockHandle (const MLMemoryBlockHandle &data) |
| const MLMemoryBlockHandle & | getMemoryBlockHandle () const |
Additional Inherited Members | |
| Public Types inherited from ml::TSubImage< DATATYPE > | |
| typedef DATATYPE | ComponentType |
| A typedef to 'export' the type of voxels components. | |
| typedef TSubImageCursor< DATATYPE > | Cursor |
| A read/write cursor. | |
| typedef ConstTSubImageCursor< DATATYPE > | ConstCursor |
| A read-only cursor. | |
| static MLEXPORT MLint | coordToIndex (MLint x, MLint y, MLint z, MLint c, MLint t, MLint u, const ImageVector &size) |
| static MLEXPORT MLint | coordToIndex (const ImageVector &voxelPosition, const ImageVector &size) |
| static MLEXPORT ImageVector | indexToCoord (MLint index, const ImageVector &extent) |
| Protected Member Functions inherited from ml::SubImage | |
| void | _calcFillAreaParams (const SubImageBox &box, const SubImageBox &maxValidInputRegion, ImageVector &boxV1, ImageVector &boxV2, ImageVector &outputTSubImageV1, ImageVector &outputTSubImageV2, MLint &fullLineLenX, MLint &fullLineLenXB, MLint &leftLineStartX, MLint &leftLineLenX, MLint &leftLineLenXB, MLint &rightLineStartX, MLint &rightLineLenX, MLint &rightLineLenXB) |
| void | _copySubImageGeneric (const SubImage &fromImage, const ScaleShiftData &scaleShiftData) |
| Generic, non-optimized version of copySubImage. | |
| const MLTypeInfos * | _getDataTypeInfos (MLDataType dt) const |
Returns MLTypeInfos for used datatypes, indicates error if the type dt is not registered. | |
| Protected Attributes inherited from ml::SubImage | |
| SubImageBox | _box |
| The box of the subimage. | |
| ImageVector | _sourceImageExtent |
| The extent of the source image, which is used for getValidRegion(). | |
| void * | _data |
| Memory chunk managed by this subimage. | |
| MLMemoryBlockHandle | _memoryBlock |
| Memory block used by this subimage. | |
| ImageVector | _stride |
| MLDataType | _dataType |
| Data type of the image. | |
A class that offers a TSubImage with a TSubImageCursor. This class should only be used in legacy code to keep old code working.
Definition at line 989 of file mlTSubImage.h.
|
inline |
Default constructor.
Definition at line 995 of file mlTSubImage.h.
References ml::TSubImage< DATATYPE >::TSubImage().
Referenced by operator=(), and TSubImageWithCursor().
|
inline |
Constructor with TSubImage.
Definition at line 999 of file mlTSubImage.h.
References ml::TSubImage< DATATYPE >::TSubImage().
|
inline |
Constructor with SubImage.
Definition at line 1004 of file mlTSubImage.h.
References ml::TSubImage< DATATYPE >::TSubImage().
|
inline |
Constructor with TSubImageWithCursor.
Definition at line 1009 of file mlTSubImage.h.
References ml::TSubImage< DATATYPE >::TSubImage(), and TSubImageWithCursor().
|
inline |
Returns the current cursor pointer (i.e., returns the memory address of the voxel the cursor points to).
Definition at line 1093 of file mlTSubImage.h.
|
inline |
Returns the cursor pointer of the voxel computed from the current cursor shifted by offset.
Definition at line 1095 of file mlTSubImage.h.
References ml::SubImage::_stride, and ml::TVector< TVector6DBase< MLint > >::dot().
|
inline |
Returns the cursor pointer of the voxel computed from the current cursor shifted by (dx, dy, dz).
Definition at line 1097 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Returns the voxel value at the cursor position.
Definition at line 1080 of file mlTSubImage.h.
|
inline |
Returns the voxel value at (cursor position + offset).
Definition at line 1082 of file mlTSubImage.h.
References ml::SubImage::_stride, and ml::TVector< TVector6DBase< MLint > >::dot().
|
inline |
Returns the voxel value at (cursor position + (dx, dy, dz)).
Definition at line 1084 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Moves the cursor to cursor position + offset.
Definition at line 1041 of file mlTSubImage.h.
References ml::SubImage::_stride, and ml::TVector< TVector6DBase< MLint > >::dot().
|
inline |
Moves the cursor to cursor position + (x, y, z).
Definition at line 1043 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Moves the cursor forward in c direction.
Definition at line 1051 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Moves the cursor forward in t direction.
Definition at line 1053 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Moves the cursor forward in u direction.
Definition at line 1055 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Moves the cursor forward in x direction.
Definition at line 1045 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Moves the cursor forward in y direction.
Definition at line 1047 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Moves the cursor forward in z direction.
Definition at line 1049 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
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 1015 of file mlTSubImage.h.
References ml::TSubImage< DATATYPE >::operator=(), and TSubImageWithCursor().
|
inline |
Moves the cursor backward in c direction.
Definition at line 1063 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Moves the cursor backward in t direction.
Definition at line 1065 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Moves the cursor backward in u direction.
Definition at line 1067 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Moves the cursor backward in x direction.
Definition at line 1057 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Moves the cursor backward in y direction.
Definition at line 1059 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
inline |
Moves the cursor backward in z direction.
Definition at line 1061 of file mlTSubImage.h.
References ml::SubImage::_stride.
|
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 1034 of file mlTSubImage.h.
References ml::SubImage::_box, ml::SubImage::_data, _ML_TSUBIMG_SUBDOT6, and ml::SubImage::_stride.
Referenced by ml::MLKernelToolsApplyFiltering().
|
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 1037 of file mlTSubImage.h.
References ml::SubImage::_box, ml::SubImage::_data, _ML_TSUBIMG_SUBDOT3, and ml::SubImage::_stride.
|
inline |
Sets the cursor to the given pointer where pointer is the memory address of the voxel.
Definition at line 1039 of file mlTSubImage.h.
|
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 1028 of file mlTSubImage.h.
References ml::SubImage::_data, ml::SubImage::_stride, and ml::TVector< TVector6DBase< MLint > >::dot().
|
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 1031 of file mlTSubImage.h.
References ml::SubImage::_data, and ml::SubImage::_stride.
|
inline |
Sets the voxel value at the cursor position to value.
Definition at line 1109 of file mlTSubImage.h.
|
inline |
Sets the voxel value at (cursor position + offset) to value.
Definition at line 1111 of file mlTSubImage.h.
References ml::SubImage::_stride, and ml::TVector< TVector6DBase< MLint > >::dot().
|
inline |
Sets voxel value at (cursor position + (dx, dy,dz)) to value.
Definition at line 1113 of file mlTSubImage.h.
References ml::SubImage::_stride.