]> Creatis software - FrontAlgorithms.git/blobdiff - appli/CTArteries/algorithms/RandomWalkLabelling.h
...
[FrontAlgorithms.git] / appli / CTArteries / algorithms / RandomWalkLabelling.h
index 06667a459471a66dfe34211e07a41ce594d707b9..1f3602a7e7e553e1884b56c5855918690ad2ab85 100644 (file)
@@ -9,13 +9,15 @@
 
 /**
  */
-template< class _TRawImage, class _TLabelsImage >
+template< class _TRawImage, class _TCostsImage, class _TLabelsImage >
 class RandomWalkLabelling
   : public fpa::Filters::Image::RegionGrow< _TRawImage, _TLabelsImage, typename _TLabelsImage::PixelType >
 {
 public:
-  typedef _TRawImage   TRawImage;
+  typedef _TRawImage    TRawImage;
+  typedef _TCostsImage  TCostsImage;
   typedef _TLabelsImage TLabelsImage;
+  typedef typename TCostsImage::PixelType  TScalar;
   typedef typename TLabelsImage::PixelType TLabel;
 
   typedef fpa::Filters::Image::RegionGrow< TRawImage, TLabelsImage, TLabel > Superclass;
@@ -50,7 +52,10 @@ public:
   itkGetConstMacro( UpperThreshold, double );
   itkSetMacro( UpperThreshold, double );
 
-  fpaFilterInputMacro( InputMarks, TLabelsImage );
+  itkGetConstMacro( MaxCost, TScalar );
+  itkSetMacro( MaxCost, TScalar );
+
+  fpaFilterInputMacro( InputCosts, TCostsImage );
   fpaFilterInputMacro( InputPath, TPath );
 
 public:
@@ -84,6 +89,8 @@ protected:
   double m_LowerThreshold;
   double m_UpperThreshold;
 
+  TScalar m_MaxCost;
+
   unsigned long m_CurrIdx;
 };