]> Creatis software - FrontAlgorithms.git/blob - appli/CTArteries/algorithms/DijkstraWithMeanAndVariance.h
...
[FrontAlgorithms.git] / appli / CTArteries / algorithms / DijkstraWithMeanAndVariance.h
1 // =========================================================================
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // =========================================================================
4 #ifndef __DijkstraWithMeanAndVariance__h__
5 #define __DijkstraWithMeanAndVariance__h__
6
7 #include <fpa/Common/IncrementalMeanAndVariance.h>
8 #include <fpa/Filters/Image/Dijkstra.h>
9 #include <fpa/Functors/Dijkstra/Image/Gaussian.h>
10
11 /**
12  */
13 template< class _TInput, class _TOutput >
14 class DijkstraWithMeanAndVariance
15   : public fpa::Filters::Image::Dijkstra< _TInput, _TOutput >
16 {
17 public:
18   typedef fpa::Filters::Image::Dijkstra< _TInput, _TOutput > Superclass;
19   typedef DijkstraWithMeanAndVariance     Self;
20   typedef itk::SmartPointer< Self >       Pointer;
21   typedef itk::SmartPointer< const Self > ConstPointer;
22
23   typedef typename Superclass::TTraits TTraits;
24   fpaTraitsMacro( typename TTraits );
25   typedef fpa::Common::IncrementalMeanAndVariance TMeanAndVar;
26
27 public:
28   itkNewMacro( Self );
29   itkTypeMacro( DijkstraWithMeanAndVariance, fpa::Image::Dijkstra );
30
31   itkGetConstMacro( MinVertex, TVertex );
32   itkGetConstMacro( MaxVertex, TVertex );
33
34 public:
35   double GetMean( ) const;
36   double GetDeviation( ) const;
37   double GetVariance( ) const;
38
39 protected:
40   DijkstraWithMeanAndVariance( );
41   virtual ~DijkstraWithMeanAndVariance( );
42
43   virtual void _BeforeGenerateData( ) override;
44   virtual void _PostComputeOutputValue( TNode& n ) override;
45
46 private:
47   // Purposely not implemented
48   DijkstraWithMeanAndVariance( const Self& other );
49   Self& operator=( const Self& other );
50
51 protected:
52   TMeanAndVar m_MeanAndVar;
53   TVertex m_MinVertex;
54   TVertex m_MaxVertex;
55 };
56
57 #ifndef ITK_MANUAL_INSTANTIATION
58 #  include "DijkstraWithMeanAndVariance.hxx"
59 #endif // ITK_MANUAL_INSTANTIATION
60 #endif // __DijkstraWithMeanAndVariance__h__
61
62 // eof - $RCSfile$