]> Creatis software - FrontAlgorithms.git/commitdiff
...
authorLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Thu, 9 Nov 2017 16:32:56 +0000 (11:32 -0500)
committerLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Thu, 9 Nov 2017 16:32:56 +0000 (11:32 -0500)
appli/CTBronchi/MoriLabelling.h

index 1481d73807cb601cf9808773daf9d337549b44dc..fc5edc48e9779461d2ca8fc6de16f7423ce9eb98 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef __CTBronchi__MoriLabelling__h__
 #define __CTBronchi__MoriLabelling__h__
 
-#include <itkMinimumMaximumImageCalculator.h>
+#include <itkStatisticsImageFilter.h>
 #include <fpa/Filters/BaseMarksInterface.h>
 #include <fpa/Filters/Image/SeedsFromLabelsInterface.h>
 #include <fpa/Filters/Image/DefaultTraits.h>
@@ -86,13 +86,20 @@ namespace CTBronchi
 
         this->m_Functor->SetUpperThreshold( this->m_UpperThreshold );
 
-        typedef itk::MinimumMaximumImageCalculator< _TScalarImage > _TMinMax;
-        typename _TMinMax::Pointer minMax = _TMinMax::New( );
-        minMax->SetImage( this->GetInputVesselness( ) );
-        minMax->Compute( );
-        this->m_MinVesselness =
-          ( this->m_VesselnessThreshold / double( 100 ) ) *
-          double( minMax->GetMaximum( ) );
+        typedef itk::StatisticsImageFilter< _TScalarImage > _TStats;
+        typename _TStats::Pointer stats = _TStats::New( );
+        stats->SetInput( this->GetInputVesselness( ) );
+        stats->Update( );
+        double vAvg = double( stats->GetMean( ) );
+        double vStd = double( stats->GetSigma( ) );
+        double vMin = double( stats->GetMinimum( ) );
+        double vMax = double( stats->GetMaximum( ) );
+        std::exit( 1 );
+        /* TODO
+           this->m_MinVesselness =
+           ( this->m_VesselnessThreshold / double( 100 ) ) *
+           double( stats->GetMaximum( ) );
+        */
       }
 
     virtual void _PostComputeOutputValue( TNode& n ) override