28 #include "WSelectorBranch.h"
32 m_size( fibers->size() ),
36 m_bitField = boost::shared_ptr< std::vector<bool> >(
new std::vector<bool>(
m_size, false ) );
39 boost::shared_ptr< boost::function< void() > >(
new boost::function< void() >( boost::bind( &
WSelectorBranch::setDirty,
this ) ) );
43 boost::shared_ptr< boost::function< void() > >(
new boost::function< void() >( boost::bind( &
WSelectorBranch::setDirty,
this ) ) );
51 for( std::list< boost::shared_ptr< WSelectorRoi > >::iterator roiIter =
m_rois.begin(); roiIter !=
m_rois.end(); ++roiIter )
75 for( std::list< boost::shared_ptr< WSelectorRoi > >::iterator iter =
m_rois.begin(); iter !=
m_rois.end(); ++iter )
77 if( ( *iter )->getRoi() == roi )
88 bool atLeastOneActive =
false;
90 for( std::list< boost::shared_ptr< WSelectorRoi > >::iterator iter =
m_rois.begin(); iter !=
m_rois.end(); ++iter )
92 if( ( *iter )->getRoi()->active() )
94 atLeastOneActive =
true;
98 if( atLeastOneActive )
102 for( std::list< boost::shared_ptr< WSelectorRoi > >::iterator iter =
m_rois.begin(); iter !=
m_rois.end(); ++iter )
104 if( ( *iter )->getRoi()->active() )
106 boost::shared_ptr< std::vector<bool> > bf = ( *iter )->getBitField();
107 bool isnot = ( *iter )->getRoi()->isNot();
110 for(
size_t i = 0 ; i <
m_size ; ++i )
112 ( *m_workerBitfield )[i] = ( *m_workerBitfield )[i] & ( *bf )[i];
117 for(
size_t i = 0 ; i <
m_size ; ++i )
119 ( *m_workerBitfield )[i] = ( *m_workerBitfield )[i] & !( *bf )[i];
127 for(
size_t i = 0 ; i <
m_size ; ++i )
129 ( *m_workerBitfield )[i] = !( *m_workerBitfield )[i];
143 return m_branch->colorProperty()->toPropColor()->get(
true );