1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5 #ifndef __fpa__Filters__RandomWalker__h__
6 #define __fpa__Filters__RandomWalker__h__
8 #include <itkFunctionBase.h>
9 #include <fpa/Config.h>
10 #include <fpa/Filters/PriorityQueueAlgorithm.h>
11 #include <fpa/Functors/VertexFunction.h>
19 template< class _TDataInterface >
21 : public fpa::Filters::PriorityQueueAlgorithm< _TDataInterface >
24 typedef _TDataInterface TDataInterface;
25 typedef fpa::Filters::PriorityQueueAlgorithm< TDataInterface > Superclass;
26 typedef RandomWalker Self;
27 typedef itk::SmartPointer< Self > Pointer;
28 typedef itk::SmartPointer< const Self > ConstPointer;
30 typedef typename TDataInterface::TTraits TTraits;
31 fpaTraitsMacro( typename TTraits );
32 typedef TOutputValue TCost;
35 typedef itk::FunctionBase< TCost, TCost > TScalarWeight;
36 typedef fpa::Functors::VertexFunction< TVertex, TCost > TVertexWeight;
40 fpa::Filters::RandomWalker, fpa::Filters::PriorityQueueAlgorithm
43 itkGetConstObjectMacro( ScalarWeight, TScalarWeight );
44 itkGetObjectMacro( ScalarWeight, TScalarWeight );
46 itkGetConstObjectMacro( VertexWeight, TVertexWeight );
47 itkGetObjectMacro( VertexWeight, TVertexWeight );
50 void SetWeightFunction( TScalarWeight* p );
51 void SetWeightFunction( TVertexWeight* p );
55 virtual ~RandomWalker( );
57 virtual void _PostComputeOutputValue( TNode& n ) override;
58 virtual void _PreComputeOutputValue( TNode& n ) override;
61 RandomWalker( const Self& other );
62 Self& operator=( const Self& other );
65 typename TScalarWeight::Pointer m_ScalarWeight;
66 typename TVertexWeight::Pointer m_VertexWeight;
73 #ifndef ITK_MANUAL_INSTANTIATION
74 # include <fpa/Filters/RandomWalker.hxx>
75 #endif // ITK_MANUAL_INSTANTIATION
76 #endif // __fpa__Filters__RandomWalker__h__