[ITK] [ITK-users] error exception occurred during SingleMethodExecute

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Mar 11 08:56:07 EDT 2015


Hello,

I think you have a build and include path problem and are mixing up using different versions of ITK headers. Or perhaps some how using an old version of the these filters.

Brad

On Mar 10, 2015, at 4:18 PM, amghanem <amghanem at gmail.com> wrote:

> Hi,
> 
> I am working on Osirix plugin and when the following code run, ITK generate
> the following runtime error
> 
> 
> itk::ERROR: MultiThreader(0x79f1400): Exception occurred during
> SingleMethodExecute
> ITK180/Modules/Core/Common/include/itkImageSource.hxx:300:
> itk::ERROR: ImageToImageFilter(0x126df1a0): Subclass should override this
> method!!!
> The signature of ThreadedGenerateData() has been changed in ITK v4 to use
> the new ThreadIdType.
> ImageToImageFilter::ThreadedGenerateData() might need to be updated to used
> it.
> 
>  the version of ITK that used by osirix is 4.1
> 
> 
> 
> 
> thanks,
> 
> 
> 
> const     unsigned int        Dimension       = 3;
> 
> 
>    typedef float                              PixelType;
>    typedef itk::Image< PixelType, Dimension > ImageType;
> 
> 
>    typedef itk::SymmetricSecondRankTensor< double, Dimension >
> HessianPixelType;
>    typedef itk::Image< HessianPixelType, Dimension >          
> HessianImageType;
>    typedef itk::HessianToObjectnessMeasureImageFilter< HessianImageType,
> ImageType > ObjectnessFilterType;
>    ObjectnessFilterType::Pointer objectnessFilter =
> ObjectnessFilterType::New();
>    //objectnessFilter->SetBrightObject( false );
>    objectnessFilter->SetBrightObject( true );
>    objectnessFilter->SetScaleObjectnessMeasure( false );
>    objectnessFilter->SetAlpha( 0.5 );
>    objectnessFilter->SetBeta( 1.0 );
>    objectnessFilter->SetGamma( 5.0 );
>    objectnessFilter->SetObjectDimension(1); //vessels
> 
>    typedef itk::MultiScaleHessianBasedMeasureImageFilter< ImageType,
> HessianImageType, ImageType > MultiScaleEnhancementFilterType;
>    MultiScaleEnhancementFilterType::Pointer multiScaleEnhancementFilter =
> MultiScaleEnhancementFilterType::New();
>    multiScaleEnhancementFilter->SetInput( importFilter->GetOutput() );
>    multiScaleEnhancementFilter->SetHessianToMeasureFilter( objectnessFilter
> );
>    multiScaleEnhancementFilter->SetSigmaStepMethodToEquispaced();
>    multiScaleEnhancementFilter->SetSigmaMinimum( 0.2 );
>    multiScaleEnhancementFilter->SetSigmaMaximum( 2 );
>    multiScaleEnhancementFilter->SetNumberOfSigmaSteps( 2);
>    multiScaleEnhancementFilter->SetGenerateHessianOutput(true);
>    multiScaleEnhancementFilter->SetGenerateScalesOutput(false);
> 
> 
> 
>    try
>    {
>        multiScaleEnhancementFilter->Update();
>    }
>    catch( itk::ExceptionObject & excep )
>    {
>        NSString * erro = [[ NSString alloc]
> initWithCString:excep.GetDescription()];
> 
>        NSLog(erro);
>        return 1;
>    }
> 
>    float*
> enhanceOutput=multiScaleEnhancementFilter->GetOutput()->GetBufferPointer();
> 
> 
> 
> --
> View this message in context: http://itk-users.7.n7.nabble.com/error-exception-occurred-during-SingleMethodExecute-tp35316.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list