From 8e106a179e9f1e7803c6309354ce367613290191 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leonardo=20Fl=C3=B3rez-Valencia?= Date: Thu, 9 Nov 2017 11:32:56 -0500 Subject: [PATCH] ... --- appli/CTBronchi/MoriLabelling.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/appli/CTBronchi/MoriLabelling.h b/appli/CTBronchi/MoriLabelling.h index 1481d73..fc5edc4 100644 --- a/appli/CTBronchi/MoriLabelling.h +++ b/appli/CTBronchi/MoriLabelling.h @@ -5,7 +5,7 @@ #ifndef __CTBronchi__MoriLabelling__h__ #define __CTBronchi__MoriLabelling__h__ -#include +#include #include #include #include @@ -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 -- 2.47.1