25 #ifndef WROIARBITRARY_H
26 #define WROIARBITRARY_H
33 #include <boost/thread.hpp>
35 #include "../common/WColor.h"
36 #include "../common/math/WMatrix.h"
37 #include "WGEViewer.h"
38 #include "WPickHandler.h"
40 #include "WTriangleMesh.h"
63 WROIArbitrary(
size_t nbCoordsX,
size_t nbCoordsY,
size_t nbCoordsZ,
65 const std::vector< float >& vals,
66 std::shared_ptr< WTriangleMesh > triMesh,
81 WROIArbitrary(
size_t nbCoordsX,
size_t nbCoordsY,
size_t nbCoordsZ,
83 const std::vector< float >& vals,
172 virtual void operator()( osg::Node* node, osg::NodeVisitor* nv )
174 osg::ref_ptr< WROIArbitrary > module =
static_cast< WROIArbitrary*
> ( node->getUserData() );
179 traverse( node, nv );
This data set type contains scalars as values.
Node callback to handle updates properly.
virtual void operator()(osg::Node *node, osg::NodeVisitor *nv)
operator ()
A box containing information on an arbitrarily shaped a region of interest.
double getThreshold()
getter
float getValue(size_t i)
Get the i-th value of the data defining the ROI.
void properties()
initalizes the properties
virtual void updateGFX()
updates the graphics
void setThreshold(double threshold)
setter
WMatrix< double > m_matrix
The 4x4 transformation matrix for the vertices.
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.
void propertyChanged()
Used as callback to mark a change in the ROI.
WROIArbitrary(size_t nbCoordsX, size_t nbCoordsY, size_t nbCoordsZ, const WMatrix< double > &mat, const std::vector< float > &vals, std::shared_ptr< WTriangleMesh > triMesh, float threshold, float maxThreshold, WColor color)
constructor
std::vector< size_t > m_nbCoordsVec
The data's number of vertices in X, Y and Z direction.
const std::vector< float > m_vals
The data at the vertices.
WPropDouble m_threshold
the threshold
virtual ~WROIArbitrary()
destructor
std::shared_ptr< WTriangleMesh > m_triMesh
This triangle mesh is provided as output through the connector.
WColor m_color
The ROI color.
Superclass for different ROI (region of interest) types.