From: Eduardo Davila Date: Fri, 4 Mar 2011 08:33:59 +0000 (+0000) Subject: min max X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=01c02940240bd8ca8fe689fa2d105061464526d3;p=bbtk.git min max --- diff --git a/packages/itk/src/bbitkImageProperties.cxx b/packages/itk/src/bbitkImageProperties.cxx index 2155f82..198c145 100644 --- a/packages/itk/src/bbitkImageProperties.cxx +++ b/packages/itk/src/bbitkImageProperties.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbitkImageProperties.cxx,v $ Language: C++ - Date: $Date: 2011/02/28 06:56:57 $ - Version: $Revision: 1.14 $ + Date: $Date: 2011/03/04 08:33:59 $ + Version: $Revision: 1.15 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -111,28 +111,14 @@ namespace bbitk // Min Max Value // EED - //itk::MinimumMaximumImageFilter< TInputImage > - printf("EED ImageProperties::DoIt 1\n"); - itk::MinimumMaximumImageFilter *minmaxfilter = itk::MinimumMaximumImageFilter< itkImageType >::New(); - printf("EED ImageProperties::DoIt 2\n"); std::vector vminmax; -/* - minmaxfilter->SetInput(im); - printf("EED ImageProperties::DoIt 3\n"); - minmaxfilter->Update(); - printf("EED ImageProperties::DoIt 4\n"); -// vminmax.push_back( minmaxfilter->GetMinimumOutput()->Get() ); -// vminmax.push_back( minmaxfilter->GetMaximumOutput()->Get() ); - vminmax.push_back( minmaxfilter->GetMinimum() ); - printf("EED ImageProperties::DoIt 5\n"); - vminmax.push_back( minmaxfilter->GetMaximum() ); - printf("EED ImageProperties::DoIt 6\n"); -*/ - vminmax.push_back( 22 ); - vminmax.push_back( 33 ); - + typedef itk::MinimumMaximumImageFilter< itkImageType > MinMaxFilterType; + typename MinMaxFilterType::Pointer minMaxCalculator = MinMaxFilterType::New(); + minMaxCalculator->SetInput(im); + minMaxCalculator->Update(); + vminmax.push_back( (float) (minMaxCalculator->GetMinimum()) ); + vminmax.push_back( (float) (minMaxCalculator->GetMaximum()) ); bbSetOutputMinMax(vminmax); - printf("EED ImageProperties::DoIt 7\n"); bbtkDebugDecTab("Core",9); }