From: Leonardo Flórez-Valencia Date: Thu, 9 Nov 2017 16:32:56 +0000 (-0500) Subject: ... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8e106a179e9f1e7803c6309354ce367613290191;p=FrontAlgorithms.git ... --- 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