OpenWalnut  1.2.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Private Attributes
WROIArbitrary Class Reference

A box containing information on an arbitrarily shaped a region of interest. More...

#include <WROIArbitrary.h>

+ Inheritance diagram for WROIArbitrary:

List of all members.

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 ()
 
  

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
- Public Member Functions inherited from WROI
virtual ~WROI ()
 Need virtual destructor because of virtual function.
void setNot (bool isNot=true)
 sets the NOT flag
bool isNot ()
 getter for NOT flag
bool active ()
 getter
void setActive (bool active)
 setter
void hide ()
 hides the roi in the scene
void unhide ()
 unhides the roi in the scene
bool dirty ()
 Getter for modified flag.
void setDirty ()
 sets the dirty flag
boost::shared_ptr< WPropertiesgetProperties ()
 Getter.
void addROIChangeNotifier (boost::shared_ptr< boost::function< void() > > notifier)
 Add a specified notifier to the list of default notifiers which get connected to each roi.
void removeROIChangeNotifier (boost::shared_ptr< boost::function< void() > > notifier)
 Remove a specified notifier from the list of default notifiers which get connected to each roi.

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< WTriangleMeshm_triMesh
 This triangle mesh is provided as output through the connector.
WPropDouble m_threshold
 the threshold
WColor m_color
 The ROI color.

Additional Inherited Members

- Protected Member Functions inherited from WROI
void signalRoiChange ()
 signals a roi change to all subscribers
- Protected Attributes inherited from WROI
osg::ref_ptr< WPickHandlerm_pickHandler
 A pointer to the pick handler used to get gui events for moving the box.
boost::shared_ptr< WPropertiesm_properties
 the property object for the module
WPropBool m_dirty
 dirty flag, indicating the graphics needs updating, it is no longer used for bitfield updating since these customers get the update notification via callback
WPropBool m_active
 indicates if the roi is active
WPropBool m_show
 indicates if the roi is visible in the scene
WPropBool m_not
 indicates if the roi is negated
std::list< boost::shared_ptr
< boost::function< void() > > > 
m_changeNotifiers
 The notifiers connected to added rois by default.
boost::shared_mutex m_associatedNotifiersLock
 Lock for associated notifiers set.

Detailed Description

A box containing information on an arbitrarily shaped a region of interest.

Definition at line 50 of file WROIArbitrary.h.


Constructor & Destructor Documentation

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

Parameters:
nbCoordsXnumber of vertices in X direction
nbCoordsYnumber of vertices in Y direction
nbCoordsZnumber of vertices in Z direction
matthe matrix transforming the vertices from canonical space
valsthe values at the vertices
triMesh
threshold
maxThresholdThe maximum of the values.
colorthe color to use for the ROI.

Definition at line 40 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

Parameters:
nbCoordsXnumber of vertices in X direction
nbCoordsYnumber of vertices in Y direction
nbCoordsZnumber of vertices in Z direction
matthe matrix transforming the vertices from canonical space
valsthe values at the vertices
maxThresholdThe maximum of the values.
colorthe color to use for the ROI.

Definition at line 71 of file WROIArbitrary.cpp.

References WGraphicsEngine::getGraphicsEngine(), m_nbCoordsVec, m_threshold, properties(), WROI::setDirty(), and updateGFX().

WROIArbitrary::~WROIArbitrary ( )
virtual

destructor

Definition at line 99 of file WROIArbitrary.cpp.


Member Function Documentation

std::vector< size_t > WROIArbitrary::getCoordDimensions ( )

Get the number of vertices in the three coordinate directions.

Returns:
A vector containing the numbers of vertices

Definition at line 128 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.

Returns:
The offsets between point in each of the three coordinate directions

Definition at line 133 of file WROIArbitrary.cpp.

References m_matrix.

double WROIArbitrary::getThreshold ( )

getter

Returns:
The threshold on the data in box which leads to the arbitrary ROI

Definition at line 123 of file WROIArbitrary.cpp.

References m_threshold.

float WROIArbitrary::getValue ( size_t  i)

Get the i-th value of the data defining the ROI.

Parameters:
ithe index of the value
Returns:
The value at the given index.

Definition at line 142 of file WROIArbitrary.cpp.

References m_vals.

void WROIArbitrary::properties ( )

initalizes the properties

Reimplemented from WROI.

Definition at line 107 of file WROIArbitrary.cpp.

References WROI::m_properties, m_threshold, and propertyChanged().

Referenced by WROIArbitrary().

void WROIArbitrary::propertyChanged ( )

  

Reimplemented from WROI.

Definition at line 112 of file WROIArbitrary.cpp.

References WROI::setDirty().

Referenced by properties().

void WROIArbitrary::setThreshold ( double  threshold)

setter

Parameters:
threshold

Definition at line 117 of file WROIArbitrary.cpp.

References m_threshold, and WROI::setDirty().

void WROIArbitrary::updateGFX ( )
virtual

Member Data Documentation

WColor WROIArbitrary::m_color
private

The ROI color.

Reimplemented from WROI.

Definition at line 160 of file WROIArbitrary.h.

Referenced by updateGFX().

WMatrix< double > WROIArbitrary::m_matrix
private

The 4x4 transformation matrix for the vertices.

Definition at line 149 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 147 of file WROIArbitrary.h.

Referenced by getCoordDimensions(), updateGFX(), and WROIArbitrary().

WPropDouble WROIArbitrary::m_threshold
private

the threshold

Reimplemented from WROI.

Definition at line 155 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 153 of file WROIArbitrary.h.

Referenced by updateGFX().

const std::vector< float > WROIArbitrary::m_vals
private

The data at the vertices.

Definition at line 151 of file WROIArbitrary.h.

Referenced by getValue(), and updateGFX().


The documentation for this class was generated from the following files: