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 $
=========================================================================*/
/* ---------------------------------------------------------------------
// Min Max Value // EED
- //itk::MinimumMaximumImageFilter< TInputImage >
- printf("EED ImageProperties::DoIt 1\n");
- itk::MinimumMaximumImageFilter<itkImageType> *minmaxfilter = itk::MinimumMaximumImageFilter< itkImageType >::New();
- printf("EED ImageProperties::DoIt 2\n");
std::vector<float> 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);
}