]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Base/FastMarching.h
acea8e7935e243f057dad6447d8126a6b9a7705e
[FrontAlgorithms.git] / lib / fpa / Base / FastMarching.h
1 #ifndef __fpa__Base__FastMarching__h__
2 #define __fpa__Base__FastMarching__h__
3
4 #include <fpa/Base/PriorityQueueAlgorithm.h>
5
6 namespace fpa
7 {
8   namespace Base
9   {
10     /**
11      */
12     template< class _TSuperclass >
13     class FastMarching
14       : public fpa::Base::PriorityQueueAlgorithm< _TSuperclass >
15     {
16     public:
17       typedef FastMarching                                      Self;
18       typedef fpa::Base::PriorityQueueAlgorithm< _TSuperclass > Superclass;
19       typedef itk::SmartPointer< Self >                         Pointer;
20       typedef itk::SmartPointer< const Self >                   ConstPointer;
21
22       typedef typename Superclass::TFrontId TFrontId;
23       typedef typename Superclass::TOutput  TOutput;
24       typedef typename Superclass::TVertex  TVertex;
25
26       typedef std::pair< TVertex, double >         TFastMarchingNeighbor;
27       typedef std::vector< TFastMarchingNeighbor > TFastMarchingNeighborhood;
28
29     protected:
30       typedef typename Superclass::_TQueueNode _TQueueNode;
31
32     public:
33       itkTypeMacro( FastMarching, Algorithm );
34
35     protected:
36       FastMarching( );
37       virtual ~FastMarching( );
38
39       virtual TFastMarchingNeighborhood _FastMarchingNeighbors( const TVertex& v ) const = 0;
40
41       virtual bool _UpdateValue( _TQueueNode& v, const _TQueueNode& p ) override;
42
43     private:
44       // Purposely not defined
45       FastMarching( const Self& other );
46       Self& operator=( const Self& other );
47     };
48
49   } // ecapseman
50
51 } // ecapseman
52
53 #ifndef ITK_MANUAL_INSTANTIATION
54 #  include <fpa/Base/FastMarching.hxx>
55 #endif // ITK_MANUAL_INSTANTIATION
56
57 #endif // __fpa__Base__FastMarching__h__
58
59 // eof - $RCSfile$