]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/DefaultTraits.h
...
[FrontAlgorithms.git] / lib / fpa / Image / DefaultTraits.h
1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5
6 #ifndef __fpa__Image__DefaultTraits__h__
7 #define __fpa__Image__DefaultTraits__h__
8
9 #include <vector>
10 #include <itkConceptChecking.h>
11 #include <itkImageToImageFilter.h>
12
13 #include <fpa/Base/MarksInterfaceWithCollisions.h>
14 #include <fpa/Base/SeedsInterface.h>
15
16 namespace fpa
17 {
18   namespace Image
19   {
20     /**
21      */
22     template< class _TInputImage, class _TOutputImage, class _TFrontId >
23     class DefaultTraits
24     {
25     public:
26       typedef DefaultTraits Self;
27       typedef _TInputImage  TInputImage;
28       typedef _TOutputImage TOutputImage;
29       typedef _TFrontId     TFrontId;
30       itkStaticConstMacro( Dimension, unsigned int, TInputImage::ImageDimension );
31
32       typedef typename TInputImage::IndexType        TVertex;
33       typedef typename TInputImage::PixelType        TInputValue;
34       typedef typename TInputImage::PointType        TPoint;
35       typedef typename TOutputImage::PixelType       TOutputValue;
36       typedef typename TVertex::LexicographicCompare TCompare;
37
38       typedef std::vector< TVertex > TNeighborhood;
39
40       typedef fpa::Base::SeedsInterface< TVertex, TPoint, TInputValue, TOutputValue, TFrontId, TCompare > TSeedsInterface;
41       typedef fpa::Base::MarksInterfaceWithCollisions< TVertex > TMarksInterface;
42       typedef itk::ImageToImageFilter< TInputImage, TOutputImage > TFilter;
43
44       typedef typename TSeedsInterface::TNode  TNode;
45       typedef typename TSeedsInterface::TNodes TNodes;
46       typedef typename TSeedsInterface::TSeed  TSeed;
47       typedef typename TSeedsInterface::TSeeds TSeeds;
48
49     public:
50       itkConceptMacro(
51         Check_SameDimension,
52         ( itk::Concept::SameDimension< TInputImage::ImageDimension, TOutputImage::ImageDimension > )
53         );
54
55     private:
56       // Purposely not implemented.
57       DefaultTraits( );
58       DefaultTraits( const Self& other );
59       virtual ~DefaultTraits( );
60       Self& operator=( const Self& other );
61     };
62
63   } // ecapseman
64
65 } // ecapseman
66
67 #endif // __fpa__Image__DefaultTraits__h__
68
69 // eof - $RCSfile$