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__
10 #include <itkConceptChecking.h>
11 #include <itkImageToImageFilter.h>
12 #include <fpa/Filters/MarksWithCollisionsInterface.h>
13 #include <fpa/Filters/SeedsInterface.h>
23 template< class _TInputImage, class _TOutputImage, class _TMark >
27 typedef _TInputImage TInputImage;
28 typedef _TOutputImage TOutputImage;
34 typedef typename TInputImage::IndexType TVertex;
35 typedef typename TInputImage::PixelType TInputValue;
36 typedef typename TInputImage::PointType TPoint;
37 typedef typename TOutputImage::PixelType TOutputValue;
38 typedef typename TVertex::LexicographicCompare TVertexCompare;
40 Dimension, unsigned int, _TInputImage::ImageDimension
43 typedef std::vector< TVertex > TNeighborhood;
50 TSeed( const TMark& fid = 0 )
54 typedef std::vector< TSeed > TSeeds;
62 // Hack to hide the fact that nodes need to be (re-)initialized
63 mutable TOutputValue Value;
67 bool operator()( const TNode& a, const TNode& b ) const
69 static TVertexCompare c;
70 return( c( a.Vertex, b.Vertex ) );
73 typedef std::set< TNode, TNodeCompare > TNodes;
76 typedef itk::ImageToImageFilter< TInputImage, TOutputImage > TFilter;
77 typedef fpa::Filters::MarksWithCollisionsInterface< TInternalTraits > TMarksInterface;
78 typedef fpa::Filters::SeedsInterface< TInternalTraits > TSeedsInterface;
83 ( itk::Concept::SameDimension< TInputImage::ImageDimension, TOutputImage::ImageDimension > )
93 #endif // __fpa__Filters__Image__DefaultTraits__h__