[ITK] OtsuMultipleThresholdsCalculator

Matt McCormick matt.mccormick at kitware.com
Mon Sep 8 11:22:24 EDT 2014


Hi Zein,

If looking at Doxygen, the documentation for ITK 3.14 will need to be
used [1].  The documentation suggests that Update() should be called
[2].

HTH,
Matt


[1] http://itk.org/Doxygen314/html/

[2] http://itk.org/Doxygen314/html/classitk_1_1OtsuMultipleThresholdsCalculator.html

On Mon, Sep 8, 2014 at 11:14 AM, Zein Salah <zeinsalah at gmail.com> wrote:
> 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();
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>



More information about the Community mailing list