#ifndef __FPA__BASE__REGIONGROW__H__ #define __FPA__BASE__REGIONGROW__H__ #include #include #include namespace fpa { namespace Base { /** */ template< class _TSuperclass > class RegionGrow : public _TSuperclass { public: typedef RegionGrow Self; typedef _TSuperclass Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; // Template arguments typedef typename Superclass::TVertex TVertex; typedef typename Superclass::TScalar TScalar; typedef typename Superclass::TFilter TFilter; typedef typename Superclass::TVertexCompare TVertexCompare; typedef typename Superclass::TFrontId TFrontId; typedef typename Superclass::TCollision TCollision; typedef typename Superclass::TCollisionsRow TCollisionsRow; typedef typename Superclass::TCollisions TCollisions; typedef typename Superclass::TNodeLabel TNodeLabel; typedef typename Superclass::TNode TNode; typedef typename Superclass::TNodes TNodes; typedef typename Superclass::TVertices TVertices; typedef itk::FunctionBase< TVertex, bool > TRegionGrowFunction; public: itkTypeMacro( RegionGrow, Algorithm ); itkGetObjectMacro( RegionGrowFunction, TRegionGrowFunction ); itkGetConstMacro( InsideValue, TScalar ); itkGetConstMacro( OutsideValue, TScalar ); itkSetObjectMacro( RegionGrowFunction, TRegionGrowFunction ); itkSetMacro( InsideValue, TScalar ); itkSetMacro( OutsideValue, TScalar ); protected: // Methods to extend itk-based architecture RegionGrow( ); virtual ~RegionGrow( ); // Front propagation methods to be overloaded virtual bool _Result( TNode& node, const TNode& parent ) fpa_OVERRIDE; virtual void _QueueClear( ) fpa_OVERRIDE; virtual void _QueuePush( const TNode& node ) fpa_OVERRIDE; virtual TNode _QueuePop( ) fpa_OVERRIDE; virtual bool _IsQueueEmpty( ) const fpa_OVERRIDE; private: // Purposely not implemented RegionGrow( const Self& other ); Self& operator=( const Self& other ); protected: std::deque< TNode > m_Queue; typename TRegionGrowFunction::Pointer m_RegionGrowFunction; TScalar m_InsideValue; TScalar m_OutsideValue; }; } // ecapseman } // ecapseman #ifndef ITK_MANUAL_INSTANTIATION # include #endif #endif // __FPA__BASE__REGIONGROW__H__ // eof - $RCSfile$