]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/Functors/SimpleDijkstraCost.h
d9a0405b5d2d6ff30747bb16114a7d9c51185ff9
[FrontAlgorithms.git] / lib / fpa / Image / Functors / SimpleDijkstraCost.h
1 #ifndef __fpa__Image__Functors__SimpleDijkstraCost__h__
2 #define __fpa__Image__Functors__SimpleDijkstraCost__h__
3
4 #include <fpa/Image/Functors/Base.h>
5 #include <fpa/Base/DijkstraCostFunctionBase.h>
6
7 namespace fpa
8 {
9   namespace Image
10   {
11     namespace Functors
12     {
13       /**
14        */
15       template< class _TImage, class _TOutput >
16       class SimpleDijkstraCost
17         : public fpa::Image::Functors::Base< _TImage, fpa::Base::DijkstraCostFunctionBase< typename _TImage::IndexType, _TOutput > >
18       {
19       public:
20         typedef _TImage                    TImage;
21         typedef typename TImage::IndexType TIndex;
22         typedef _TOutput                   TOutput;
23
24         typedef fpa::Base::DijkstraCostFunctionBase< TIndex, TOutput > TBaseFunctor;
25         typedef fpa::Image::Functors::Base< TImage, TBaseFunctor > Superclass;
26         typedef SimpleDijkstraCost              Self;
27         typedef itk::SmartPointer< Self >       Pointer;
28         typedef itk::SmartPointer< const Self > ConstPointer;
29
30       public:
31         itkNewMacro( Self );
32         itkTypeMacro( SimpleDijkstraCost, Base );
33
34         itkBooleanMacro( UseImageSpacing );
35         itkGetConstMacro( UseImageSpacing, bool );
36         itkSetMacro( UseImageSpacing, bool );
37
38       public:
39         virtual TOutput Evaluate(
40           const TIndex& a, const TIndex& b
41           ) const fpa_OVERRIDE;
42
43       protected:
44         SimpleDijkstraCost( );
45         virtual ~SimpleDijkstraCost( );
46
47       private:
48         // Purposely not implemented
49         SimpleDijkstraCost( const Self& other );
50         Self& operator=( const Self& other );
51
52       protected:
53         bool m_UseImageSpacing;
54       };
55
56     } // ecapseman
57
58   } // ecapseman
59
60 } // ecapseman
61
62 #ifndef ITK_MANUAL_INSTANTIATION
63 #  include <fpa/Image/Functors/SimpleDijkstraCost.hxx>
64 #endif // ITK_MANUAL_INSTANTIATION
65
66 #endif // __fpa__Image__Functors__SimpleDijkstraCost__h__
67
68 // eof - $RCSfile$