1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5 #ifndef __fpa__Filters__Image__DefaultTraits__h__
6 #define __fpa__Filters__Image__DefaultTraits__h__
11 #include <itkImageToImageFilter.h>
12 #include <fpa/Filters/CollisionMarksInterface.h>
13 #include <fpa/Filters/MultipleSeedsInterface.h>
23 template< class _TInputImage, class _TOutputImage, class _TMark >
27 typedef _TInputImage TInputImage;
28 typedef _TOutputImage TOutputImage;
36 typedef typename TInputImage::IndexType TVertex;
37 typedef typename TInputImage::PixelType TInputValue;
38 typedef typename TInputImage::PointType TPoint;
39 typedef typename TOutputImage::PixelType TOutputValue;
40 typedef typename TVertex::LexicographicCompare TVertexCompare;
42 Dimension, unsigned int, TInputImage::ImageDimension
45 typedef std::vector< TVertex > TNeighborhood;
52 // Hack to hide the fact that nodes need to be (re-)initialized
53 mutable TOutputValue Value;
57 bool operator()( const TNode& a, const TNode& b ) const
59 static TVertexCompare c;
60 return( c( a.Vertex, b.Vertex ) );
63 typedef std::set< TNode, TNodeCompare > TNodes;
71 TSeed( const TMark& fid = 0 )
75 typedef std::vector< TSeed > TSeeds;
78 Dimension, unsigned int, TInternalTraits::Dimension
81 typedef itk::Image< _TMark, TInternalTraits::Dimension > TMarksImage;
82 typedef itk::ImageToImageFilter< TInputImage, TOutputImage > TFilterInterface;
83 typedef fpa::Filters::CollisionMarksInterface< TInternalTraits > TMarksInterface;
84 typedef fpa::Filters::MultipleSeedsInterface< TInternalTraits > TSeedsInterface;
93 #endif // __fpa__Filters__Image__DefaultTraits__h__