MeVisLab Toolbox Reference
|
Base object to handle implicit or explicit functions to draw into subimages. More...
#include <mlRasterFunction.h>
Public Member Functions | |
RasterFunction () | |
Constructor. | |
RasterFunction (const RasterFunction &f) | |
Copy constructor. | |
~RasterFunction () override | |
Destructor. | |
virtual const RasterFunction & | operator= (const RasterFunction &f) |
Copy operator. | |
virtual bool | isVoxelInside (const ImageVector &) const |
The implicit function used to test whether a point p is inside (result == 1), onto (result == 0) or outside (result == -1) the image. | |
virtual bool | isWorldVoxelInside (const Vector6 &) const |
The implicit function used to test whether a point p is inside (result == 1), onto (result == 0) or outside (result == -1) the image. | |
virtual void | draw (SubImage *sImg) const |
Fill intersecting area of sImg with the currently selected function using the transformation matrices. | |
virtual RasterFunction * | clone () const |
Create a clone of the RasterFunction. | |
Sets/Gets the function which is used to fill the data. Default is \c VirtualWorldVoxelTest. | |
void | setFunctionMode (TestFuncMode mode) |
TestFuncMode | getFunctionMode () const |
By default no function is set. | |
void | setVoxelTestFunction (VoxelTestFunction f, void *data) |
void | getVoxelTestFunction (VoxelTestFunction &f, void *&data) const |
void | setModifierFunction (ModifierFunction f, void *data) |
void | getModifierFunction (ModifierFunction &f, void *&data) const |
void | enableModifierFunction (bool flag) |
bool | isModifierFunctionOn () const |
in world coordinates. By default no function is set. | |
void | setWorldVoxelTestFunction (WorldVoxelTestFunction f, void *data) |
void | getWorldVoxelTestFunction (WorldVoxelTestFunction &f, void *&data) const |
Set/Get the voxel fill value. Default is 1. | |
void | setFillValue (double val) |
double | getFillValue () const |
Set/Get the voxel fill value for the background. Default is 0. | |
void | setBGFillValue (double val) |
double | getBGFillValue () const |
Enable/disable background filling. default is off = false. | |
void | enableBGFilling (bool val) |
bool | isBGFilling () const |
const SubImageBox & | getVoxBoundingBox () const |
Set/Get bounding boxes of objects in implicit functions in voxel or in world coordinates. | |
void | setVoxBoundingBox (const SubImageBox &box) |
const SubImageBoxd & | getWorldBoundingBox () const |
void | setWorldBoundingBox (const SubImageBoxd &box) |
Set/Get the current transformation of the object before its transformation to world coordinates. Default is the identity. | |
void | setPreTransform (const Matrix4 &pre) |
const Matrix4 & | getPretransform () const |
Set/Get the voxel to world matrix. Default is the identity. | |
void | setVoxToWorld (const Matrix4 &v2w) |
const Matrix4 & | getVoxToWorld () const |
Persistence. Still to do! | |
std::string | persistentState () const override |
Returns a string describing the object's internal state. | |
void | setPersistentState (const std::string &) override |
Restores the object's internal state from a string that had been previously generated using persistentState() . | |
Public Member Functions inherited from ml::Base | |
Base () | |
Constructor. | |
virtual | ~Base () |
Destructor. | |
virtual Base * | deepCopy () const |
Set addStateToTree version number that can be accessed via getAddStateVersion() | |
bool | isOfAllowedType (const std::vector< const RuntimeType * > &types) const |
Check if this object's type is equal to or derived from one of the types given in the argument. | |
virtual bool | isRefCountedBase () const |
Returns if the instance is derived from RefCountedBase. | |
virtual std::string | detailString () const |
Return a string describing this object. | |
virtual bool | implementsPersistence (PersistenceInterface) const |
Override this method to declare which persistence interfaces are implemented by your derived class. | |
virtual void | addStateToTree (TreeNode *) const |
Attaches the object state as children of the given parent node. | |
virtual void | readStateFromTree (TreeNode *) |
Reads the object state from the children of the given parent node. | |
virtual void | writeTo (AbstractPersistenceOutputStream *) const |
Write the objects state to the data stream object. | |
virtual void | readFrom (AbstractPersistenceInputStream *, int) |
Read the objects state from the data stream object. | |
Protected Member Functions | |
virtual SubImageBox | _transformSubImgBox (const SubImageBoxd &box) const |
Transforms a subImgBox from world coordinates to a subImgBox in voxel coordinates. | |
virtual SubImageBox | _getClipBox (const SubImageBox &box) const |
Returns the subImgBox whose voxels are going to be tested. | |
virtual void | _getTransformBase (const ImageVector &p, Vector3 tBase[4]) const |
Get world coordinate of p , and world vectors from p to p+(1,0,0), to p+(0,1,0) and p+(0,0,1). | |
template<typename DATATYPE > | |
void | _fillRaster (const SubImageBox &box, TSubImage< DATATYPE > *pSubImg, Vector3 tBase[4]) const |
Test all voxels within pSubImg against the selected function if they are inside box. | |
Additional Inherited Members | |
Public Types inherited from ml::Base | |
enum | PersistenceInterface { PersistenceByString , PersistenceByTreeNode , PersistenceByStream } |
This enum describes the different persistence interfaces available. More... | |
Base object to handle implicit or explicit functions to draw into subimages.
Definition at line 69 of file mlRasterFunction.h.
|
inline |
Constructor.
Definition at line 73 of file mlRasterFunction.h.
|
inline |
Copy constructor.
Definition at line 76 of file mlRasterFunction.h.
|
inlineoverride |
Destructor.
Definition at line 79 of file mlRasterFunction.h.
|
inlineprotected |
Test all voxels within pSubImg against the selected function if they are inside box.
tBase must contain the world coordinate of the box' origin p
, and world vectors from p to p+(1,0,0), to p+(0,1,0) and p+(0,0,1).
Use normal write function with fill value.
Use normal write function with fill value.
Use normal write function with fill value.
Use normal write function with fill value.
Definition at line 203 of file mlRasterFunction.h.
References ML_BAD_PARAMETER, ML_PRINT_WARNING, mlrange_cast(), ml::StaticVoxelTest, ml::StaticWorldVoxelTest, ml::TSubImageBox< intT >::v1, ml::TSubImageBox< intT >::v2, ml::VirtualVoxelTest, and ml::VirtualWorldVoxelTest.
|
protectedvirtual |
Returns the subImgBox whose voxels are going to be tested.
If necessary the world subImgBox is transformed to voxel coordinates.
|
protectedvirtual |
Get world coordinate of p
, and world vectors from p to p+(1,0,0), to p+(0,1,0) and p+(0,0,1).
|
protectedvirtual |
Transforms a subImgBox from world coordinates to a subImgBox in voxel coordinates.
|
inlinevirtual |
Create a clone of the RasterFunction.
Definition at line 185 of file mlRasterFunction.h.
Fill intersecting area of sImg
with the currently selected function using the transformation matrices.
Definition at line 149 of file mlRasterFunction.h.
Definition at line 131 of file mlRasterFunction.h.
References mlrange_cast().
|
inline |
Definition at line 144 of file mlRasterFunction.h.
|
inline |
Definition at line 138 of file mlRasterFunction.h.
|
inline |
Definition at line 87 of file mlRasterFunction.h.
|
inline |
Definition at line 129 of file mlRasterFunction.h.
Definition at line 164 of file mlRasterFunction.h.
|
inline |
Set/Get bounding boxes of objects in implicit functions in voxel or in world coordinates.
Defaults are empty boxes.
Definition at line 155 of file mlRasterFunction.h.
|
inline |
Definition at line 109 of file mlRasterFunction.h.
Definition at line 170 of file mlRasterFunction.h.
|
inline |
Definition at line 157 of file mlRasterFunction.h.
|
inline |
Definition at line 118 of file mlRasterFunction.h.
|
inline |
Definition at line 150 of file mlRasterFunction.h.
|
inline |
Definition at line 132 of file mlRasterFunction.h.
|
inlinevirtual |
The implicit function used to test whether a point p
is inside (result == 1), onto (result == 0) or outside (result == -1) the image.
This function tests in voxel coordinates. Overload this function to implement your own voxel test function. Default implementation returns false, i.e. no object is rastered.
Definition at line 95 of file mlRasterFunction.h.
The implicit function used to test whether a point p
is inside (result == 1), onto (result == 0) or outside (result == -1) the image.
This function tests in voxel coordinates. Overload this function to implement your own world voxel test. Default implementation is false, i.e. no object is rastered.
Definition at line 102 of file mlRasterFunction.h.
|
virtual |
Copy operator.
|
inlineoverridevirtual |
Returns a string describing the object's internal state.
Reimplemented from ml::Base.
Definition at line 178 of file mlRasterFunction.h.
Definition at line 143 of file mlRasterFunction.h.
Definition at line 137 of file mlRasterFunction.h.
|
inline |
Definition at line 86 of file mlRasterFunction.h.
|
inline |
Definition at line 127 of file mlRasterFunction.h.
Restores the object's internal state from a string that had been previously generated using persistentState()
.
Reimplemented from ml::Base.
Definition at line 180 of file mlRasterFunction.h.
Definition at line 163 of file mlRasterFunction.h.
References mlrange_cast().
|
inline |
Definition at line 156 of file mlRasterFunction.h.
|
inline |
Definition at line 107 of file mlRasterFunction.h.
Definition at line 169 of file mlRasterFunction.h.
References mlrange_cast().
|
inline |
Definition at line 158 of file mlRasterFunction.h.
|
inline |
Definition at line 116 of file mlRasterFunction.h.