]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/RegionGrow.h
Segmentation guided by a gaussian estimator added -- Not yet finished
[FrontAlgorithms.git] / lib / fpa / Image / RegionGrow.h
index dd7c851a5bf5324ad12b72d101a9f59910e57232..b12a869d87ccdca57610f351da531a9b71e30bc0 100644 (file)
@@ -14,22 +14,22 @@ namespace fpa
     /**
      * @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 >