]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/Dijkstra.h
24c06438c01885c54e184881e3f3edb33cdc64d8
[FrontAlgorithms.git] / lib / fpa / Image / Dijkstra.h
1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5
6 #ifndef __fpa__Image__Dijkstra__h__
7 #define __fpa__Image__Dijkstra__h__
8
9 #include <fpa/Base/Dijkstra.h>
10 #include <fpa/Image/Algorithm.h>
11 #include <fpa/Image/DefaultTraits.h>
12 #include <fpa/Image/MinimumSpanningTree.h>
13 #include <fpa/Image/Functors/Dijkstra/Function.h>
14
15 namespace fpa
16 {
17   namespace Image
18   {
19     /**
20      */
21     template< class _TInputImage, class _TOutputImage, class _TFrontId = unsigned char >
22     class Dijkstra
23       : public fpa::Base::Dijkstra< fpa::Image::Algorithm< fpa::Image::DefaultTraits< _TInputImage, _TOutputImage, _TFrontId > >, fpa::Image::MinimumSpanningTree< _TInputImage::ImageDimension > >
24     {
25     public:
26       typedef _TInputImage  TInputImage;
27       typedef _TOutputImage TOutputImage;
28       typedef _TFrontId     TFrontId;
29       typedef fpa::Image::MinimumSpanningTree< _TInputImage::ImageDimension > TMST;
30
31       typedef fpa::Image::DefaultTraits< TInputImage, TOutputImage, TFrontId > TTraits;
32       typedef fpa::Image::Algorithm< TTraits >        TAlgorithm;
33       typedef fpa::Base::Dijkstra< TAlgorithm, TMST > Superclass;
34       typedef Dijkstra                                Self;
35       typedef itk::SmartPointer< Self >               Pointer;
36       typedef itk::SmartPointer< const Self >         ConstPointer;
37
38       typedef typename Superclass::TOutputValue TOutputValue;
39       typedef typename Superclass::TVertex      TVertex;
40
41       typedef fpa::Image::Functors::Dijkstra::Function< TInputImage, TOutputValue > TWeightFunction;
42
43     public:
44       itkNewMacro( Self );
45       itkTypeMacro( fpa::Image::Dijkstra, fpa::Base::Dijkstra );
46
47     protected:
48       Dijkstra( );
49       virtual ~Dijkstra( );
50
51       virtual void _BeforeGenerateData( ) override;
52       virtual void _ConfigureOutput( const TOutputValue& v ) override;
53
54     private:
55       // Purposely not implemented.
56       Dijkstra( const Self& other );
57       Self& operator=( const Self& other );
58     };
59
60   } // ecapseman
61
62 } // ecapseman
63
64 #ifndef ITK_MANUAL_INSTANTIATION
65 #  include <fpa/Image/Dijkstra.hxx>
66 #endif // ITK_MANUAL_INSTANTIATION
67
68 #endif // __fpa__Image__Dijkstra__h__
69
70 // eof - $RCSfile$