]> Creatis software - FrontAlgorithms.git/blobdiff - plugins/RegionGrowFunctors/BinaryThreshold.cxx
Mori is alivegit status!
[FrontAlgorithms.git] / plugins / RegionGrowFunctors / BinaryThreshold.cxx
index 9ed2db673500df1c8f59a63c3451f30ae5734aa6..f385e4aa3d4d3a3c62d0ad75519668ed4561f0bd 100644 (file)
@@ -1,7 +1,7 @@
 #include <RegionGrowFunctors/BinaryThreshold.h>
 #include <cpInstances/DataObjects/Image.h>
 
-#include <fpa/Image/Functors/RegionGrowBinaryThreshold.h>
+#include <fpa/Image/Functors/RegionGrow/BinaryThreshold.h>
 #include <itkConstNeighborhoodIterator.h>
 #include <vtkPolyData.h>
 
@@ -18,8 +18,8 @@ BinaryThreshold( )
   this->_ConfigureOutput< _TData >( "Output" );
 
   this->m_Parameters.ConfigureAsUint( "Radius", 1 );
-  this->m_Parameters.ConfigureAsReal( "LowerThreshold", 0 );
-  this->m_Parameters.ConfigureAsReal( "UpperThreshold", 0 );
+  this->m_Parameters.ConfigureAsReal( "Lower", 0 );
+  this->m_Parameters.ConfigureAsReal( "Upper", 0 );
 }
 
 // -------------------------------------------------------------------------
@@ -44,7 +44,7 @@ _GD0( _TImage* image )
 {
   typedef itk::ConstNeighborhoodIterator< _TImage > _TInIt;
   typedef
-    fpa::Image::Functors::RegionGrowBinaryThreshold< _TImage >
+    fpa::Image::Functors::RegionGrow::BinaryThreshold< _TImage >
     _TFunctor;
   auto out = this->GetOutput( "Output" );
   auto f = out->GetITK< _TFunctor >( );
@@ -107,15 +107,15 @@ _GD0( _TImage* image )
     s = std::sqrt( s );
     v_min = m - s;
     v_max = m + s;
-    f->SetLowerThreshold( v_min );
-    f->SetUpperThreshold( v_max );
-    this->m_Parameters.SetReal( "LowerThreshold", f->GetLowerThreshold( ) );
-    this->m_Parameters.SetReal( "UpperThreshold", f->GetUpperThreshold( ) );
+    f->SetLower( v_min );
+    f->SetUpper( v_max );
+    this->m_Parameters.SetReal( "Lower", f->GetLower( ) );
+    this->m_Parameters.SetReal( "Upper", f->GetUpper( ) );
   }
   else
   {
-    f->SetLowerThreshold( this->m_Parameters.GetReal( "LowerThreshold" ) );
-    f->SetUpperThreshold( this->m_Parameters.GetReal( "UpperThreshold" ) );
+    f->SetLower( this->m_Parameters.GetReal( "Lower" ) );
+    f->SetUpper( this->m_Parameters.GetReal( "Upper" ) );
 
   } // fi
 }