]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/Functors/VertexCost.h
...
[FrontAlgorithms.git] / lib / fpa / Image / Functors / VertexCost.h
1 #ifndef __fpa__Image__Functors__VertexCost__h__
2 #define __fpa__Image__Functors__VertexCost__h__
3
4 #include <fpa/Image/Functors/Base.h>
5 #include <fpa/Base/Functors/VertexCostFunctionBase.h>
6
7 namespace fpa
8 {
9   namespace Image
10   {
11     namespace Functors
12     {
13       /**
14        */
15       template< class _TImage, class _TOutput >
16       class VertexCost
17         : public fpa::Image::Functors::Base< _TImage, fpa::Base::Functors::VertexCostFunctionBase< 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::Functors::VertexCostFunctionBase< TIndex, TOutput > TBaseFunctor;
25         typedef fpa::Image::Functors::Base< TImage, TBaseFunctor > Superclass;
26         typedef VertexCost              Self;
27         typedef itk::SmartPointer< Self >       Pointer;
28         typedef itk::SmartPointer< const Self > ConstPointer;
29
30       public:
31         itkNewMacro( Self );
32         itkTypeMacro( VertexCost, 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 override;
42
43       protected:
44         VertexCost( );
45         virtual ~VertexCost( );
46
47       private:
48         // Purposely not implemented
49         VertexCost( 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/VertexCost.hxx>
64 #endif // ITK_MANUAL_INSTANTIATION
65
66 #endif // __fpa__Image__Functors__VertexCost__h__
67
68 // eof - $RCSfile$