33 #ifndef ROI_LABELNAMING_ACTION_H 
   34 #define ROI_LABELNAMING_ACTION_H 
   50   class RoiLabelNamingActionView_Private ;
 
   58     virtual std::string 
name() 
const;
 
   69       std::cout << 
"Setting label naming mode to 2D" << std::endl ;
 
   73       std::cout << 
"Setting label naming mode to 3D" << std::endl ;
 
   80                      std::list< std::pair< Point3d, ChangesItem> >& changes, 
 
   81                      bool add, 
bool wholeImage ) ;
 
   82     bool fillPoint( 
const Point3d& pc, 
int t,
 
   86                     std::queue<Point3d>& trialPoints, 
bool replace = 
false, 
bool add = 
true )  ;
 
   91     static std::vector< std::map< int16_t, int32_t> > myCurrentImageValues ;
 
   92     static std::vector<bool> myComputeCurrentImageValueMap ;
 
   93     static int32_t myNbOfPointsToSegmentLimit ;
 
   96     struct PointLess : 
public std::binary_function< Point3d, Point3d , bool>
 
  100         return( p1[2] < p2[2] 
 
  101                 || ( (p1[2] == p2[2]) && (p1[1] < p2[1])  )
 
  102                 || ( (p1[2] == p2[2]) 
 
  103                      && (p1[1] == p2[1]) && (p1[0] < p2[0]) ) ) ;
 
  111 anatomist::RoiLabelNamingAction::fillPoint( 
const Point3d& pc, 
int t,
 
  115                                             std::queue<Point3d>& trialPoints, 
bool replace, 
bool add )
 
  121     std::vector<float> vpos( 4 );
 
  129       if( (volumeOfLabels->
at( pc ) != region)
 
  130           &&  (
short(rint(val) == label)
 
  131           && ( replace || ( (!replace) && volumeOfLabels->
at( pc ) == 0 )) ) )
 
  134         trialPoints.push(pc) ;
 
  135         *toChange = volumeOfLabels->
at( pc ) ;
 
  137         volumeOfLabels->
at( pc ) = region ;
 
  143       if( (volumeOfLabels->
at( pc ) != 0 ) && (
short(rint(val) == label)
 
  144           && ( replace || ( (!replace) && volumeOfLabels->
at( pc ) == region ) ) ) )
 
  147         trialPoints.push(pc) ;
 
  148         *toChange = volumeOfLabels->
at( pc ) ;
 
  150         volumeOfLabels->
at( pc ) = 0 ;
 
  160 anatomist::RoiLabelNamingAction::in( 
const Point3d& dims, 
const Point3d& p )
 
  162   if ( p[0] < 0 || p[0] > dims[0] - 1 ||
 
  163        p[1] < 0 || p[1] > dims[1] - 1 ||
 
  164        p[2] < 0 || p[2] > dims[2] - 1 )
 
Anatomist graph object: a list that manages destruction of its sub-elements.
Base Anatomist object (abstract)
virtual float mixedTexValue(const std::vector< float > &pos, const Referential *orgRef) const
Gets a "mixed" texture value at a given space / time location.
void removeWholeLabelFromRegion(int x, int y, int globalX, int globalY)
virtual ~RoiLabelNamingAction()
void addWholeLabelToRegion(int x, int y, int globalX, int globalY)
void removeConnecCompFromRegion(int x, int y, int globalX, int globalY)
static Action * creator()
void addConnecCompToRegion(int x, int y, int globalX, int globalY)
virtual std::string name() const
const T & at(long x, long y=0, long z=0, long t=0) const