]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/Mori.h
550864d7957de297a6f65bed47e84716af5903fb
[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       TOutputImage* GetThresholdedOutput( );
54       const TOutputImage* GetThresholdedOutput( ) const;
55
56     protected:
57       Mori( );
58       virtual ~Mori( );
59
60       virtual void _AfterGenerateData( ) override;
61
62     private:
63       // Purposely not implemented.
64       Mori( const Self& other );
65       Self& operator=( const Self& other );
66
67     protected:
68       unsigned long m_ThresholdedOutputIdx;
69     };
70
71   } // ecapseman
72
73 } // ecapseman
74
75 #ifndef ITK_MANUAL_INSTANTIATION
76 #  include <fpa/Image/Mori.hxx>
77 #endif // ITK_MANUAL_INSTANTIATION
78
79 #endif // __fpa__Image__Mori__h__
80
81 // eof - $RCSfile$