[ITK] OtsuMultipleThresholdsCalculator

Zein Salah zeinsalah at gmail.com
Mon Sep 8 11:14:06 EDT 2014


Hi,

I was trying to use the OtsuMultipleThresholdsCalculator. Bellow is the
corresponding
code from my program. The compiler reports an error that Compute() is not a
member
of itk::OtsuMultipleThresholdsCalculator. I can't figure out what the
actual error is!!
BTW, due to compatibly reasons within our working team, I have to use
ITK3.14 and
and not a newer release. Does this have to do with the error??

Much thanks,
Z.


 typedef itk::Statistics::ScalarImageToHistogramGenerator< InputImageType
>   ScalarImageToHistogramGeneratorType;
   typedef ScalarImageToHistogramGeneratorType::HistogramType
HistogramType;
   typedef itk::OtsuMultipleThresholdsCalculator< HistogramType >
CalculatorType;

   ScalarImageToHistogramGeneratorType::Pointer
scalarImageToHistogramGenerator =
ScalarImageToHistogramGeneratorType::New();
   CalculatorType::Pointer calculator = CalculatorType::New();

   scalarImageToHistogramGenerator->SetNumberOfBins( 128 );
   scalarImageToHistogramGenerator->SetInput( m_ShiftedImage );
   scalarImageToHistogramGenerator->Compute();

   calculator->SetNumberOfThresholds( 3 );

calculator->SetInputHistogram(scalarImageToHistogramGenerator->GetOutput());
   calculator->Compute();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140908/0c98bf26/attachment.html>


More information about the Community mailing list