/**
* @param I Input image type
*/
- template< class I >
+ template< class I, class O = I, class CC = fpa::Image::Functors::CastVertexValueToCost< typename I::PixelType, typename O::PixelType > >
class RegionGrow
- : public Algorithm< I, fpa::Base::RegionGrow< typename I::IndexType, typename I::PixelType, typename I::PixelType, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, itk::ImageToImageFilter< I, I > > >
+ : public Algorithm< I, fpa::Base::RegionGrow< typename I::IndexType, typename O::PixelType, typename I::PixelType, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, itk::ImageToImageFilter< I, O > >, CC >
{
public:
// Standard class typdedefs
typedef typename I::IndexType TVertex;
- typedef typename I::PixelType TResult;
+ typedef typename O::PixelType TResult;
typedef typename I::PixelType TVertexValue;
- typedef itk::ImageToImageFilter< I, I > TBaseFilter;
+ typedef itk::ImageToImageFilter< I, O > TBaseFilter;
typedef fpa::Base::RegionGrow< TVertex, TResult, TVertexValue, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, TBaseFilter > TBaseAlgorithm;
- typedef RegionGrow Self;
- typedef Algorithm< I, TBaseAlgorithm > Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
+ typedef RegionGrow Self;
+ typedef Algorithm< I, TBaseAlgorithm, CC > Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
typedef
fpa::Image::Functors::ImageFunction< I, bool >