* @param I Input image type
* @param O Output image type
*/
- template< class I, class O >
+ template< class I, class O = I >
class RegionGrow
- : public Algorithm< I, O, fpa::Base::RegionGrow< typename I::IndexType, typename I::PixelType, typename O::PixelType, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, itk::ImageToImageFilter< I, O > > >
+ : public Algorithm< I, O, fpa::Base::RegionGrow< typename I::IndexType, typename I::PixelType, typename O::PixelType, I, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, itk::ImageToImageFilter< I, O > > >
{
public:
- typedef fpa::Base::RegionGrow< typename I::IndexType, typename I::PixelType, typename O::PixelType, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, itk::ImageToImageFilter< I, O > > TBaseAlgorithm;
+ typedef fpa::Base::RegionGrow< typename I::IndexType, typename I::PixelType, typename O::PixelType, I, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, itk::ImageToImageFilter< I, O > > TBaseAlgorithm;
typedef RegionGrow Self;
typedef Algorithm< I, O, TBaseAlgorithm > Superclass;
typedef itk::SmartPointer< Self > Pointer;
typedef itk::SmartPointer< const Self > ConstPointer;
- typedef typename Superclass::TInputImage TInputImage;
- typedef typename Superclass::TOutputImage TOutputImage;
- typedef typename Superclass::TVertex TVertex;
- typedef typename Superclass::TValue TValue;
- typedef typename Superclass::TResult TResult;
-
- typedef itk::FunctionBase< TValue, bool > TMembershipFunction;
+ typedef typename Superclass::TInputImage TInputImage;
+ typedef typename Superclass::TOutputImage TOutputImage;
+ typedef typename Superclass::TVertex TVertex;
+ typedef typename Superclass::TValue TValue;
+ typedef typename Superclass::TResult TResult;
+ typedef typename Superclass::TSpace TSpace;
+ typedef typename Superclass::TGrowingFunction TGrowingFunction;
protected:
typedef typename Superclass::_TVertices _TVertices;
itkNewMacro( Self );
itkTypeMacro( RegionGrow, Algorithm );
- itkGetObjectMacro( MembershipFunction, TMembershipFunction );
- itkGetConstObjectMacro( MembershipFunction, TMembershipFunction );
- itkSetObjectMacro( MembershipFunction, TMembershipFunction );
-
protected:
RegionGrow( );
virtual ~RegionGrow( );
- virtual bool _CheckMembership( const TVertex& v ) const;
virtual void _InitResults( );
private:
// Purposely not implemented
RegionGrow( const Self& other );
Self& operator=( const Self& other );
-
- protected:
- typename TMembershipFunction::Pointer m_MembershipFunction;
};
} // ecapseman