#define __fpa__Image__RegionGrow__h__
#include <fpa/Base/RegionGrow.h>
+#include <fpa/Base/MarksInterfaceWithCollisions.h>
#include <fpa/Base/SeedsInterface.h>
-#include <fpa/Image/MarksInterface.h>
-#include <fpa/Image/Filter.h>
+#include <fpa/Image/Algorithm.h>
namespace fpa
{
{
/**
*/
- template< class _TInputImage, class _TOutputImage >
+ template< class _TInputImage, class _TOutputImage, class _TFrontId = unsigned char >
class RegionGrow
- : public fpa::Base::RegionGrow< fpa::Image::Filter< _TInputImage, _TOutputImage >, fpa::Image::MarksInterface< _TInputImage::ImageDimension >, fpa::Base::SeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::IndexType::LexicographicCompare > >
+ : public fpa::Base::RegionGrow< fpa::Image::Algorithm< _TInputImage, _TOutputImage, fpa::Base::MarksInterfaceWithCollisions< typename _TInputImage::IndexType >, fpa::Base::SeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::PointType, typename _TInputImage::PixelType, typename _TOutputImage::PixelType, _TFrontId, typename _TInputImage::IndexType::LexicographicCompare > > >
{
public:
- // Interfaces
- typedef fpa::Image::Filter< _TInputImage, _TOutputImage > TFilter;
- typedef fpa::Image::MarksInterface< _TInputImage::ImageDimension > TMarksInterface;
- typedef fpa::Base::SeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::IndexType::LexicographicCompare > TSeedsInterface;
+ typedef _TInputImage TInputImage;
+ typedef _TOutputImage TOutputImage;
+ typedef _TFrontId TFrontId;
- // Smart pointers
- typedef RegionGrow Self;
- typedef fpa::Base::RegionGrow< TFilter, TMarksInterface, TSeedsInterface > Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
+ typedef typename TInputImage::IndexType TVertex;
+ typedef typename TInputImage::PointType TPoint;
+ typedef typename TVertex::LexicographicCompare TVertexCompare;
+ typedef typename TInputImage::PixelType TInputValue;
+ typedef typename TOutputImage::PixelType TOutputValue;
+
+ typedef fpa::Base::MarksInterfaceWithCollisions< TVertex > TMarksInterface;
+ typedef fpa::Base::SeedsInterface< TVertex, TPoint, TInputValue, TOutputValue, TFrontId, TVertexCompare > TSeedsInterface;
+ typedef fpa::Image::Algorithm< TInputImage, TOutputImage, TMarksInterface, TSeedsInterface > TAlgorithm;
+
+ typedef RegionGrow Self;
+ typedef fpa::Base::RegionGrow< TAlgorithm > Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
+
+ typedef typename TSeedsInterface::TNode TNode;
+ typedef typename TSeedsInterface::TNodes TNodes;
public:
itkNewMacro( Self );
itkTypeMacro( fpa::Image::RegionGrow, fpa::Base::RegionGrow );
protected:
- RegionGrow( ) : Superclass( ) { }
- virtual ~RegionGrow( ) { }
+ RegionGrow( )
+ : Superclass( )
+ {
+ }
+ virtual ~RegionGrow( )
+ {
+ }
private:
+ // Purposely not implemented.
RegionGrow( const Self& other );
Self& operator=( const Self& other );
};