#ifndef __fpa__Image__RegionGrow__h__
#define __fpa__Image__RegionGrow__h__
-#include <itkImageToImageFilter.h>
-#include <itkFunctionBase.h>
+#include <fpa/Base/RegionGrow.h>
#include <fpa/Base/SeedsInterface.h>
#include <fpa/Image/MarksInterface.h>
+#include <fpa/Image/Filter.h>
namespace fpa
{
*/
template< class _TInputImage, class _TOutputImage >
class RegionGrow
- : public itk::ImageToImageFilter< _TInputImage, _TOutputImage >,
- public fpa::Base::SeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::IndexType::LexicographicCompare >,
- public fpa::Image::MarksInterface< _TInputImage::ImageDimension >
+ : 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:
- typedef _TInputImage TInputImage;
- typedef _TOutputImage TOutputImage;
- typedef typename TInputImage::IndexType TIndex;
- typedef typename TInputImage::RegionType TRegion;
- typedef typename TInputImage::PixelType TInputPixel;
- typedef typename TOutputImage::PixelType TOutputPixel;
- typedef typename TIndex::LexicographicCompare TIndexCompare;
-
- typedef RegionGrow Self;
- typedef itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- typedef fpa::Base::SeedsInterface< TIndex, TIndexCompare > TSeedsInterface;
+ // Interfaces
+ typedef fpa::Image::Filter< _TInputImage, _TOutputImage > TFilter;
typedef fpa::Image::MarksInterface< _TInputImage::ImageDimension > TMarksInterface;
- typedef itk::FunctionBase< TInputPixel, bool > TIntensityFunctor;
-
- public:
- itkNewMacro( Self );
- itkTypeMacro( fpa::Image::RegionGrow, itk::ImageToImageFilter );
-
- itkGetConstMacro( InsideValue, TOutputPixel );
- itkGetConstMacro( OutsideValue, TOutputPixel );
+ typedef fpa::Base::SeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::IndexType::LexicographicCompare > TSeedsInterface;
- itkSetMacro( InsideValue, TOutputPixel );
- itkSetMacro( OutsideValue, TOutputPixel );
+ // Smart pointers
+ typedef RegionGrow Self;
+ typedef fpa::Base::RegionGrow< TFilter, TMarksInterface, TSeedsInterface > Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
public:
- void SetPredicate( TIntensityFunctor* functor );
+ itkNewMacro( Self );
+ itkTypeMacro( fpa::Image::RegionGrow, fpa::Base::RegionGrow );
protected:
- RegionGrow( );
- virtual ~RegionGrow( );
-
- virtual void GenerateInputRequestedRegion( ) override;
- virtual void EnlargeOutputRequestedRegion(
- itk::DataObject* output
- ) override;
- virtual void GenerateData( ) override;
+ RegionGrow( ) : Superclass( ) { }
+ virtual ~RegionGrow( ) { }
private:
- // Purposely not implemented
RegionGrow( const Self& other );
Self& operator=( const Self& other );
-
- protected:
- typename TIntensityFunctor::Pointer m_IntensityFunctor;
- TOutputPixel m_InsideValue;
- TOutputPixel m_OutsideValue;
};
} // ecapseman
} // ecapseman
-#ifndef ITK_MANUAL_INSTANTIATION
-# include <fpa/Image/RegionGrow.hxx>
-#endif // ITK_MANUAL_INSTANTIATION
-
#endif // __fpa__Image__RegionGrow__h__
// eof - $RCSfile$