OpenWalnut 1.3.1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
WSelectorBranch Class Reference

TODO(schurade): Document this! More...

#include <WSelectorBranch.h>

List of all members.

Public Member Functions

 WSelectorBranch (boost::shared_ptr< const WDataSetFibers > fibers, boost::shared_ptr< WRMBranch > branch)
 constructor
 ~WSelectorBranch ()
 destructor
boost::shared_ptr< std::vector
< bool > > 
getBitField ()
 getter
boost::shared_ptr< WRMBranchgetBranch ()
 getter
void addRoi (boost::shared_ptr< WSelectorRoi > roi)
 adds a roi to the branch
std::list< boost::shared_ptr
< WSelectorRoi > > 
getROIs ()
 Queries the ROIs.
void removeRoi (osg::ref_ptr< WROI > roi)
 Removes a roi fromt he branch.
bool empty ()
 Checks if empty.
void setDirty ()
 Sets the dirty flag.
bool dirty ()
 Checks if branch is dirty.

Protected Member Functions

void colorChanged ()
 function gets called when the color property of the roi branch has changed, it will write this color into the custom color array of the fiber dataset

Private Member Functions

void recalculate ()
 updates the output bitfield with the information from all rois in this branch

Private Attributes

boost::shared_ptr< const
WDataSetFibers
m_fibers
 Pointer to the fiber data set.
size_t m_size
 size of the fiber dataset, stored for convinience
bool m_dirty
 dirty flag
boost::shared_ptr< std::vector
< bool > > 
m_bitField
 the bitfield given to the outside world
boost::shared_ptr< std::vector
< bool > > 
m_workerBitfield
 the bitfield we work on
std::list< boost::shared_ptr
< WSelectorRoi > > 
m_rois
 list of rois in this branch
boost::shared_ptr< WRMBranchm_branch
 pointer to the branch object in the roi manager
boost::shared_ptr
< boost::function< void() > > 
m_changeSignal
 Signal that can be used to update the selector branch.
boost::shared_ptr
< boost::function< void() > > 
m_changeRoiSignal
 Signal that can be used to update the selector branch.

Detailed Description

TODO(schurade): Document this!

Definition at line 37 of file WSelectorBranch.h.


Constructor & Destructor Documentation

WSelectorBranch::WSelectorBranch ( boost::shared_ptr< const WDataSetFibers fibers,
boost::shared_ptr< WRMBranch branch 
)

constructor

Parameters:
fiberspointer to the fiber dataset to work on
branchpointer to the branch object in the roi manager

Definition at line 30 of file WSelectorBranch.cpp.

References m_bitField, m_branch, m_changeRoiSignal, m_changeSignal, m_size, and setDirty().

WSelectorBranch::~WSelectorBranch ( )

destructor

Definition at line 46 of file WSelectorBranch.cpp.

References m_branch, m_changeRoiSignal, m_changeSignal, and m_rois.


Member Function Documentation

void WSelectorBranch::addRoi ( boost::shared_ptr< WSelectorRoi roi)

adds a roi to the branch

Parameters:
roi

Definition at line 57 of file WSelectorBranch.cpp.

References m_changeRoiSignal, and m_rois.

void WSelectorBranch::colorChanged ( ) [protected]

function gets called when the color property of the roi branch has changed, it will write this color into the custom color array of the fiber dataset

Definition at line 145 of file WSelectorBranch.cpp.

References m_bitField, m_branch, m_fibers, and m_size.

Referenced by setDirty().

bool WSelectorBranch::dirty ( ) [inline]

Checks if branch is dirty.

Returns:
true if dirty

Definition at line 171 of file WSelectorBranch.h.

References m_dirty.

bool WSelectorBranch::empty ( ) [inline]

Checks if empty.

Returns:
true when this branch contains no rois

Definition at line 166 of file WSelectorBranch.h.

References m_rois.

boost::shared_ptr< std::vector< bool > > WSelectorBranch::getBitField ( ) [inline]

getter

Returns:
the bitfield that is created from all rois in this branch

Definition at line 152 of file WSelectorBranch.h.

References m_bitField, m_dirty, and recalculate().

boost::shared_ptr< WRMBranch > WSelectorBranch::getBranch ( ) [inline]

getter

Returns:
pointer to the branch object, mainly for deletion and update purposes

Definition at line 161 of file WSelectorBranch.h.

References m_branch.

std::list< boost::shared_ptr< WSelectorRoi > > WSelectorBranch::getROIs ( )

Queries the ROIs.

Returns:
A copy of the list of WSelectorRois

Definition at line 63 of file WSelectorBranch.cpp.

References m_rois.

void WSelectorBranch::recalculate ( ) [private]

updates the output bitfield with the information from all rois in this branch

Definition at line 90 of file WSelectorBranch.cpp.

References m_bitField, m_branch, m_rois, m_size, and m_workerBitfield.

Referenced by getBitField().

void WSelectorBranch::removeRoi ( osg::ref_ptr< WROI roi)

Removes a roi fromt he branch.

Parameters:
roi

Definition at line 77 of file WSelectorBranch.cpp.

References m_changeRoiSignal, and m_rois.

void WSelectorBranch::setDirty ( )

Sets the dirty flag.

Definition at line 68 of file WSelectorBranch.cpp.

References colorChanged(), m_branch, and m_dirty.

Referenced by WSelectorBranch().


Member Data Documentation

boost::shared_ptr< std::vector< bool > > WSelectorBranch::m_bitField [private]

the bitfield given to the outside world

Definition at line 131 of file WSelectorBranch.h.

Referenced by colorChanged(), getBitField(), recalculate(), and WSelectorBranch().

boost::shared_ptr< WRMBranch > WSelectorBranch::m_branch [private]

pointer to the branch object in the roi manager

Definition at line 146 of file WSelectorBranch.h.

Referenced by colorChanged(), getBranch(), recalculate(), setDirty(), WSelectorBranch(), and ~WSelectorBranch().

boost::shared_ptr< boost::function< void() > > WSelectorBranch::m_changeRoiSignal [private]

Signal that can be used to update the selector branch.

Definition at line 149 of file WSelectorBranch.h.

Referenced by addRoi(), removeRoi(), WSelectorBranch(), and ~WSelectorBranch().

boost::shared_ptr< boost::function< void() > > WSelectorBranch::m_changeSignal [private]

Signal that can be used to update the selector branch.

Definition at line 148 of file WSelectorBranch.h.

Referenced by WSelectorBranch(), and ~WSelectorBranch().

bool WSelectorBranch::m_dirty [private]

dirty flag

Definition at line 126 of file WSelectorBranch.h.

Referenced by dirty(), getBitField(), and setDirty().

boost::shared_ptr< const WDataSetFibers > WSelectorBranch::m_fibers [private]

Pointer to the fiber data set.

Definition at line 119 of file WSelectorBranch.h.

Referenced by colorChanged().

std::list< boost::shared_ptr< WSelectorRoi > > WSelectorBranch::m_rois [private]

list of rois in this branch

Definition at line 141 of file WSelectorBranch.h.

Referenced by addRoi(), empty(), getROIs(), recalculate(), removeRoi(), and ~WSelectorBranch().

size_t WSelectorBranch::m_size [private]

size of the fiber dataset, stored for convinience

Definition at line 124 of file WSelectorBranch.h.

Referenced by colorChanged(), recalculate(), and WSelectorBranch().

boost::shared_ptr< std::vector< bool > > WSelectorBranch::m_workerBitfield [private]

the bitfield we work on

Definition at line 136 of file WSelectorBranch.h.

Referenced by recalculate().


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