OpenWalnut
1.4.0
|
A box containing information on an arbitrarily shaped a region of interest. More...
#include <WROIArbitrary.h>
Classes | |
class | ROIArbNodeCallback |
Node callback to handle updates properly. More... | |
Public Member Functions | |
WROIArbitrary (size_t nbCoordsX, size_t nbCoordsY, size_t nbCoordsZ, const WMatrix< double > &mat, const std::vector< float > &vals, boost::shared_ptr< WTriangleMesh > triMesh, float threshold, float maxThreshold, WColor color) | |
constructor | |
WROIArbitrary (size_t nbCoordsX, size_t nbCoordsY, size_t nbCoordsZ, const WMatrix< double > &mat, const std::vector< float > &vals, float maxThreshold, WColor color) | |
constructor | |
virtual | ~WROIArbitrary () |
destructor | |
void | properties () |
initalizes the properties | |
void | propertyChanged () |
Used as callback to mark a change in the ROI. | |
void | setThreshold (double threshold) |
setter | |
double | getThreshold () |
getter | |
std::vector< size_t > | getCoordDimensions () |
Get the number of vertices in the three coordinate directions. | |
std::vector< double > | getCoordOffsets () |
Get the vertex offsets in the three coordinate directions. | |
float | getValue (size_t i) |
Get the i-th value of the data defining the ROI. | |
virtual void | updateGFX () |
updates the graphics | |
Private Attributes | |
std::vector< size_t > | m_nbCoordsVec |
The data's number of vertices in X, Y and Z direction. | |
WMatrix< double > | m_matrix |
The 4x4 transformation matrix for the vertices. | |
const std::vector< float > | m_vals |
The data at the vertices. | |
boost::shared_ptr< WTriangleMesh > | m_triMesh |
This triangle mesh is provided as output through the connector. | |
WPropDouble | m_threshold |
the threshold | |
WColor | m_color |
The ROI color. |
A box containing information on an arbitrarily shaped a region of interest.
Definition at line 49 of file WROIArbitrary.h.
WROIArbitrary::WROIArbitrary | ( | size_t | nbCoordsX, |
size_t | nbCoordsY, | ||
size_t | nbCoordsZ, | ||
const WMatrix< double > & | mat, | ||
const std::vector< float > & | vals, | ||
boost::shared_ptr< WTriangleMesh > | triMesh, | ||
float | threshold, | ||
float | maxThreshold, | ||
WColor | color | ||
) |
constructor
nbCoordsX | number of vertices in X direction |
nbCoordsY | number of vertices in Y direction |
nbCoordsZ | number of vertices in Z direction |
mat | the matrix transforming the vertices from canonical space |
vals | the values at the vertices |
triMesh | |
threshold | |
maxThreshold | The maximum of the values. |
color | the color to use for the ROI. |
Definition at line 41 of file WROIArbitrary.cpp.
References WGraphicsEngine::getGraphicsEngine(), m_nbCoordsVec, m_threshold, properties(), WROI::setDirty(), and updateGFX().
WROIArbitrary::WROIArbitrary | ( | size_t | nbCoordsX, |
size_t | nbCoordsY, | ||
size_t | nbCoordsZ, | ||
const WMatrix< double > & | mat, | ||
const std::vector< float > & | vals, | ||
float | maxThreshold, | ||
WColor | color | ||
) |
constructor
nbCoordsX | number of vertices in X direction |
nbCoordsY | number of vertices in Y direction |
nbCoordsZ | number of vertices in Z direction |
mat | the matrix transforming the vertices from canonical space |
vals | the values at the vertices |
maxThreshold | The maximum of the values. |
color | the color to use for the ROI. |
Definition at line 72 of file WROIArbitrary.cpp.
References WGraphicsEngine::getGraphicsEngine(), m_nbCoordsVec, m_threshold, properties(), WROI::setDirty(), and updateGFX().
WROIArbitrary::~WROIArbitrary | ( | ) | [virtual] |
destructor
Definition at line 100 of file WROIArbitrary.cpp.
std::vector< size_t > WROIArbitrary::getCoordDimensions | ( | ) |
Get the number of vertices in the three coordinate directions.
Definition at line 129 of file WROIArbitrary.cpp.
References m_nbCoordsVec.
Referenced by WSelectorRoi::recalculate().
std::vector< double > WROIArbitrary::getCoordOffsets | ( | ) |
Get the vertex offsets in the three coordinate directions.
Definition at line 134 of file WROIArbitrary.cpp.
References m_matrix.
double WROIArbitrary::getThreshold | ( | ) |
getter
Definition at line 124 of file WROIArbitrary.cpp.
References m_threshold.
float WROIArbitrary::getValue | ( | size_t | i | ) |
Get the i-th value of the data defining the ROI.
i | the index of the value |
Definition at line 143 of file WROIArbitrary.cpp.
References m_vals.
void WROIArbitrary::properties | ( | ) |
initalizes the properties
Reimplemented from WROI.
Definition at line 108 of file WROIArbitrary.cpp.
References WROI::m_properties, m_threshold, and propertyChanged().
Referenced by WROIArbitrary().
void WROIArbitrary::propertyChanged | ( | ) |
Used as callback to mark a change in the ROI.
Reimplemented from WROI.
Definition at line 113 of file WROIArbitrary.cpp.
References WROI::setDirty().
Referenced by properties().
void WROIArbitrary::setThreshold | ( | double | threshold | ) |
setter
threshold |
Definition at line 118 of file WROIArbitrary.cpp.
References m_threshold, and WROI::setDirty().
void WROIArbitrary::updateGFX | ( | ) | [virtual] |
updates the graphics
Implements WROI.
Definition at line 148 of file WROIArbitrary.cpp.
References WMarchingLegoAlgorithm::generateSurface(), m_color, WROI::m_dirty, m_matrix, m_nbCoordsVec, m_threshold, m_triMesh, and m_vals.
Referenced by WROIArbitrary::ROIArbNodeCallback::operator()(), and WROIArbitrary().
WColor WROIArbitrary::m_color [private] |
The ROI color.
Reimplemented from WROI.
Definition at line 159 of file WROIArbitrary.h.
Referenced by updateGFX().
WMatrix< double > WROIArbitrary::m_matrix [private] |
The 4x4 transformation matrix for the vertices.
Definition at line 148 of file WROIArbitrary.h.
Referenced by getCoordOffsets(), and updateGFX().
std::vector< size_t > WROIArbitrary::m_nbCoordsVec [private] |
The data's number of vertices in X, Y and Z direction.
Definition at line 146 of file WROIArbitrary.h.
Referenced by getCoordDimensions(), updateGFX(), and WROIArbitrary().
WPropDouble WROIArbitrary::m_threshold [private] |
the threshold
Reimplemented from WROI.
Definition at line 154 of file WROIArbitrary.h.
Referenced by getThreshold(), properties(), setThreshold(), updateGFX(), and WROIArbitrary().
boost::shared_ptr< WTriangleMesh > WROIArbitrary::m_triMesh [private] |
This triangle mesh is provided as output through the connector.
Definition at line 152 of file WROIArbitrary.h.
Referenced by updateGFX().
const std::vector< float > WROIArbitrary::m_vals [private] |
The data at the vertices.
Definition at line 150 of file WROIArbitrary.h.
Referenced by getValue(), and updateGFX().