#ifndef __FPA__BASE__INCREMENTALREGIONGROW__H__ #define __FPA__BASE__INCREMENTALREGIONGROW__H__ #include #include #include namespace fpa { namespace Base { /** * Region grow is a front propagation with no costs. */ template< class V, class R, class VV, class VC, class B > class IncrementalRegionGrow : public RegionGrow< V, R, VV, VC, B > { public: /// Standard class typdedefs typedef IncrementalRegionGrow Self; typedef RegionGrow< V, R, VV, VC, B > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef typename Superclass::TVertex TVertex; typedef typename Superclass::TValue TValue; typedef typename Superclass::TResult TResult; typedef typename Superclass::TVertexCompare TVertexCompare; typedef typename Superclass::TGrowingFunction TGrowingFunction; typedef std::vector< typename TGrowingFunction::Pointer > TFunctions; typedef std::vector< unsigned long > TVolumes; protected: typedef typename Superclass::_TVertices _TVertices; typedef typename Superclass::_TCollision _TCollision; typedef typename Superclass::_TCollisionsRow _TCollisionsRow; typedef typename Superclass::_TCollisions _TCollisions; typedef typename Superclass::_TNode _TNode; typedef typename Superclass::_TNodes _TNodes; typedef typename Superclass::_TQueue _TQueue; public: itkTypeMacro( IncrementalRegionGrow, RegionGrow ); public: TGrowingFunction* GetGrowingFunction( unsigned int i ); const TGrowingFunction* GetGrowingFunction( unsigned int i ) const; unsigned long GetGrowingFunctionVolume( unsigned int i ) const; unsigned int GetNumberOfGrowingFunctions( ) const; void ClearGrowingFunctions( ); unsigned int AddGrowingFunction( TGrowingFunction* function ); protected: IncrementalRegionGrow( ); virtual ~IncrementalRegionGrow( ); virtual void _BeforeGenerateData( ); virtual void _AfterLoop( ); virtual void _Loop( ); virtual bool _CheckMembership( const TVertex& v ) const; private: // Purposely not implemented. IncrementalRegionGrow( const Self& ); void operator=( const Self& ); protected: mutable _TQueue m_AuxiliaryQueue; TFunctions m_Functions; TVolumes m_Volumes; unsigned int m_ActualFunction; }; } // ecapseman } // ecapseman #ifndef ITK_MANUAL_INSTANTIATION #include #endif // ITK_MANUAL_INSTANTIATION #endif // __FPA__BASE__INCREMENTALREGIONGROW__H__ // eof - $RCSfile$