1 #ifndef __FPA__BASE__INCREMENTALREGIONGROW__H__
2 #define __FPA__BASE__INCREMENTALREGIONGROW__H__
5 #include <itkFunctionBase.h>
6 #include <fpa/Base/RegionGrow.h>
13 * Region grow is a front propagation with no costs.
15 template< class V, class R, class VV, class VC, class B >
16 class IncrementalRegionGrow
17 : public RegionGrow< V, R, VV, VC, B >
20 /// Standard class typdedefs
21 typedef IncrementalRegionGrow Self;
22 typedef RegionGrow< V, R, VV, VC, B > Superclass;
23 typedef itk::SmartPointer< Self > Pointer;
24 typedef itk::SmartPointer< const Self > ConstPointer;
26 typedef typename Superclass::TVertex TVertex;
27 typedef typename Superclass::TValue TValue;
28 typedef typename Superclass::TResult TResult;
29 typedef typename Superclass::TVertexCompare TVertexCompare;
30 typedef typename Superclass::TGrowingFunction TGrowingFunction;
32 typedef std::vector< typename TGrowingFunction::Pointer > TFunctions;
33 typedef std::vector< unsigned long > TVolumes;
36 typedef typename Superclass::_TVertices _TVertices;
37 typedef typename Superclass::_TCollision _TCollision;
38 typedef typename Superclass::_TCollisionsRow _TCollisionsRow;
39 typedef typename Superclass::_TCollisions _TCollisions;
40 typedef typename Superclass::_TNode _TNode;
41 typedef typename Superclass::_TNodes _TNodes;
42 typedef typename Superclass::_TQueue _TQueue;
45 itkTypeMacro( IncrementalRegionGrow, RegionGrow );
48 TGrowingFunction* GetGrowingFunction( unsigned int i );
49 const TGrowingFunction* GetGrowingFunction( unsigned int i ) const;
50 unsigned long GetGrowingFunctionVolume( unsigned int i ) const;
51 unsigned int GetNumberOfGrowingFunctions( ) const;
52 void ClearGrowingFunctions( );
53 unsigned int AddGrowingFunction( TGrowingFunction* function );
56 IncrementalRegionGrow( );
57 virtual ~IncrementalRegionGrow( );
59 virtual void _BeforeGenerateData( );
60 virtual void _AfterLoop( );
61 virtual void _Loop( );
62 virtual bool _CheckMembership( const TVertex& v ) const;
65 // Purposely not implemented.
66 IncrementalRegionGrow( const Self& );
67 void operator=( const Self& );
70 mutable _TQueue m_AuxiliaryQueue;
72 TFunctions m_Functions;
74 unsigned int m_ActualFunction;
81 #include <fpa/Base/IncrementalRegionGrow.hxx>
83 #endif // __FPA__BASE__INCREMENTALREGIONGROW__H__