// ========================================================================= // @author Leonardo Florez Valencia // @email florez-l@javeriana.edu.co // ========================================================================= #ifndef __fpa__Base__Dijkstra__h__ #define __fpa__Base__Dijkstra__h__ #include namespace fpa { namespace Base { /** */ template< class _TFilter, class _TMarksInterface, class _TSeedsInterface > class Dijkstra : public _TFilter, public _TMarksInterface, public _TSeedsInterface { public: typedef Dijkstra Self; typedef _TFilter Superclass; typedef _TMarksInterface TMarksInterface; typedef _TSeedsInterface TSeedsInterface; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef typename Superclass::TInputValue TInputValue; typedef typename Superclass::TOutputValue TOutputValue; typedef typename Superclass::TVertex TVertex; typedef typename Superclass::TVertices TVertices; typedef itk::FunctionBase< TInputValue, TOutputValue > TIntensityFunctor; typedef itk::FunctionBase< TVertex, TOutputValue > TVertexFunctor; protected: struct _TNode { TVertex Vertex; TVertex Parent; TOutputValue Cost; _TNode( const TVertex& v, const TVertex& p ) { this->Vertex = v; this->Parent = p; this->Cost = TOutputValue( 0 ); } bool operator<( const _TNode& b ) const { return( this->Cost < b.Cost ); } }; public: itkTypeMacro( Dijkstra, TFilter ); public: const TIntensityFunctor* GetIntensityFunctor( ) const; const TVertexFunctor* GetVertexFunctor( ) const; void SetFunctor( TIntensityFunctor* functor ); void SetFunctor( TVertexFunctor* functor ); protected: Dijkstra( ); virtual ~Dijkstra( ); virtual void GenerateData( ) override; private: Dijkstra( const Self& other ); Self& operator=( const Self& other ); protected: typename TIntensityFunctor::Pointer m_IntensityFunctor; typename TVertexFunctor::Pointer m_VertexFunctor; }; } // ecapseman } // ecapseman #ifndef ITK_MANUAL_INSTANTIATION # include #endif // ITK_MANUAL_INSTANTIATION #endif // __fpa__Base__Dijkstra__h__ // eof - $RCSfile$