// ========================================================================= // @author Leonardo Florez Valencia // @email florez-l@javeriana.edu.co // ========================================================================= #ifndef __fpa__Filters__RandomWalker__h__ #define __fpa__Filters__RandomWalker__h__ #include #include #include #include namespace fpa { namespace Filters { /** */ template< class _TDataInterface > class RandomWalker : public fpa::Filters::PriorityQueueAlgorithm< _TDataInterface > { public: typedef _TDataInterface TDataInterface; typedef fpa::Filters::PriorityQueueAlgorithm< TDataInterface > Superclass; typedef RandomWalker Self; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef typename TDataInterface::TTraits TTraits; fpaTraitsMacro( typename TTraits ); typedef TOutputValue TCost; typedef TMark TLabel; typedef itk::FunctionBase< TCost, TCost > TScalarWeight; typedef fpa::Functors::VertexFunction< TVertex, TCost > TVertexWeight; public: itkTypeMacro( fpa::Filters::RandomWalker, fpa::Filters::PriorityQueueAlgorithm ); itkGetConstObjectMacro( ScalarWeight, TScalarWeight ); itkGetObjectMacro( ScalarWeight, TScalarWeight ); itkGetConstObjectMacro( VertexWeight, TVertexWeight ); itkGetObjectMacro( VertexWeight, TVertexWeight ); public: void SetWeightFunction( TScalarWeight* p ); void SetWeightFunction( TVertexWeight* p ); protected: RandomWalker( ); virtual ~RandomWalker( ); virtual void _PostComputeOutputValue( TNode& n ) override; virtual void _PreComputeOutputValue( TNode& n ) override; private: RandomWalker( const Self& other ); Self& operator=( const Self& other ); protected: typename TScalarWeight::Pointer m_ScalarWeight; typename TVertexWeight::Pointer m_VertexWeight; }; } // ecapseman } // ecapseman #ifndef ITK_MANUAL_INSTANTIATION # include #endif // ITK_MANUAL_INSTANTIATION #endif // __fpa__Filters__RandomWalker__h__ // eof - $RCSfile$