]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/Mori.h
...
[FrontAlgorithms.git] / lib / fpa / Image / Mori.h
1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5
6 #ifndef __fpa__Image__Mori__h__
7 #define __fpa__Image__Mori__h__
8
9 #include <fpa/Base/Mori.h>
10 #include <fpa/Base/MarksInterface.h>
11 #include <fpa/Base/SingleSeedInterface.h>
12 #include <fpa/Image/Algorithm.h>
13
14 namespace fpa
15 {
16   namespace Image
17   {
18     /**
19      */
20     template< class _TInputImage, class _TOutputImage >
21     class Mori
22       : public fpa::Base::Mori< fpa::Image::Algorithm< _TInputImage, _TOutputImage, fpa::Base::MarksInterface< typename _TInputImage::IndexType >, fpa::Base::SingleSeedInterface< typename _TInputImage::IndexType, typename _TInputImage::PointType, typename _TInputImage::PixelType, typename _TOutputImage::PixelType, typename _TOutputImage::PixelType, typename _TInputImage::IndexType::LexicographicCompare > > >
23     {
24     public:
25       typedef _TInputImage  TInputImage;
26       typedef _TOutputImage TOutputImage;
27
28       typedef typename TInputImage::IndexType        TVertex;
29       typedef typename TInputImage::PointType        TPoint;
30       typedef typename TVertex::LexicographicCompare TVertexCompare;
31       typedef typename TInputImage::PixelType        TInputValue;
32       typedef typename TOutputImage::PixelType       TOutputValue;
33       typedef typename TOutputImage::PixelType       TFrontId;
34
35       typedef fpa::Base::MarksInterface< TVertex > TMarksInterface;
36       typedef fpa::Base::SingleSeedInterface< TVertex, TPoint, TInputValue, TOutputValue, TFrontId, TVertexCompare > TSeedsInterface;
37       typedef fpa::Image::Algorithm< TInputImage, TOutputImage, TMarksInterface, TSeedsInterface > TAlgorithm;
38
39       typedef Mori                            Self;
40       typedef fpa::Base::Mori< TAlgorithm >   Superclass;
41       typedef itk::SmartPointer< Self >       Pointer;
42       typedef itk::SmartPointer< const Self > ConstPointer;
43
44       typedef typename TSeedsInterface::TNode  TNode;
45       typedef typename TSeedsInterface::TNodes TNodes;
46       typedef typename TAlgorithm::TMarks      TMarks;
47
48     public:
49       itkNewMacro( Self );
50       itkTypeMacro( fpa::Image::Mori, fpa::Base::Mori );
51
52     public:
53       TMarks* GetOutputLevels( )
54         {
55           return( this->GetMarks( ) );
56         }
57       const TMarks* GetOutputLevels( ) const
58         {
59           return( this->GetMarks( ) );
60         }
61
62     protected:
63       Mori( )
64         : Superclass( )
65         {
66         }
67       virtual ~Mori( )
68         {
69         }
70
71     private:
72       // Purposely not implemented.
73       Mori( const Self& other );
74       Self& operator=( const Self& other );
75     };
76
77   } // ecapseman
78
79 } // ecapseman
80
81 #endif // __fpa__Image__Mori__h__
82
83 // eof - $RCSfile$