]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/Dijkstra.h
Architecture revisited.
[FrontAlgorithms.git] / lib / fpa / Image / Dijkstra.h
1 #ifndef __FPA__IMAGE__DIJKSTRA__H__
2 #define __FPA__IMAGE__DIJKSTRA__H__
3
4 #include <fpa/Base/Dijkstra.h>
5 #include <fpa/Image/Algorithm.h>
6
7 namespace fpa
8 {
9   namespace Image
10   {
11     /**
12      */
13     template< class _TInputImage, class _TOutputImage = _TInputImage >
14     class Dijkstra
15       : public fpa::Base::Dijkstra< fpa::Image::Algorithm< _TInputImage, _TOutputImage > >
16     {
17     public:
18       typedef fpa::Base::Dijkstra< fpa::Image::Algorithm< _TInputImage, _TOutputImage > > Superclass;
19       typedef Dijkstra                        Self;
20       typedef itk::SmartPointer< Self >       Pointer;
21       typedef itk::SmartPointer< const Self > ConstPointer;
22
23       // Template arguments
24       typedef typename Superclass::TVertex        TVertex;
25       typedef typename Superclass::TScalar        TScalar;
26       typedef typename Superclass::TFilter        TFilter;
27       typedef typename Superclass::TVertexCompare TVertexCompare;
28       typedef typename Superclass::TFrontId       TFrontId;
29       typedef typename Superclass::TCollision     TCollision;
30       typedef typename Superclass::TCollisionsRow TCollisionsRow;
31       typedef typename Superclass::TCollisions    TCollisions;
32       typedef typename Superclass::TNodeLabel     TNodeLabel;
33       typedef typename Superclass::TNode          TNode;
34       typedef typename Superclass::TNodes         TNodes;
35       typedef typename Superclass::TVertices      TVertices;
36
37     public:
38       itkNewMacro( Self );
39       itkTypeMacro( Dijkstra, fpa::Base::Dijkstra );
40
41       itkBooleanMacro( UseImageSpacing );
42       itkGetConstMacro( UseImageSpacing, bool );
43       itkSetMacro( UseImageSpacing, bool );
44
45     protected:
46       Dijkstra( );
47       virtual ~Dijkstra( );
48
49       // Dijkstra methods to be overloaded
50       virtual TScalar _Cost(
51         const TVertex& a, const TVertex& b
52         ) const fpa_OVERRIDE;
53
54     private:
55       // Purposely not implemented
56       Dijkstra( const Self& other );
57       Self& operator=( const Self& other );
58
59     protected:
60       bool m_UseImageSpacing;
61     };
62
63   } // ecapseman
64
65 } // ecapseman
66
67 #ifndef ITK_MANUAL_INSTANTIATION
68 #  include <fpa/Image/Dijkstra.hxx>
69 #endif
70
71 #endif // __FPA__IMAGE__DIJKSTRA__H__
72
73 // eof - $RCSfile$