[Insight-users] Using MultiResolutionPyramidImageFilter : Exception occurred during SingleMethodExecute - please help

Luis Ibanez luis.ibanez at kitware.com
Fri Dec 22 08:16:09 EST 2006


Hi Kastern,

Your code seems to be fine...


A couple of questions:

   1) What is the size (in pixels) of your input image ?
   2) What is the pixel spacing of your input image ?



Please let us know,


    Thanks


      Luis


-------------------
Karsten N wrote:
> Hi everybody
> 
> I'm trying to use the itk::MultiResolutionPyramidImageFilter. However, I 
> get the following exception
> 
>   itk::ExceptionObject (0012F39C)
>   Location: "void __thiscall itk::MultiThreader::SingleMethodExecute(void)"
>   File: \devel\InsightToolkit-2.6.0\Code\Common\itkMultiThreader.cxx
>   Line: 358
>   Description: itk::ERROR: MultiThreader(053662C8): Exception occurred 
> during SingleMethodExecute
> 
> I'm using ITK version 2.6.0. My code looks like this:
> 
>   typedef itk::MultiResolutionPyramidImageFilter<ImageType, ImageType>  
> ImagePyramidType;
>   ImagePyramidType::Pointer image_pyramid = ImagePyramidType::New();
>   unsigned int levels = 4;
>   image_pyramid->SetInput(input_image);
>   itk::Vector<unsigned int,3> shrink_factors;
> 
>   shrink_factors[0] = 8;
>   shrink_factors[1] = 8;
>   shrink_factors[2] = 4;
> 
>   image_pyramid->SetNumberOfLevels(levels);
>   image_pyramid->SetStartingShrinkFactors(shrink_factors.Begin());
> 
>   std::vector<ImageType::Pointer> images;
> 
>   try
>   {
>     image_pyramid->GetOutput(0)->Update();
>     images.push_back(image_pyramid->GetOutput(0));      }
>   catch(  itk::ExceptionObject & exp )
>   {
>       std::cerr << exp << std::endl;
>   }
> 
> If have tried writing the input_image to disk and it looks fine. I have 
> also tried  itk::MultiThreader::SetGlobalMaximumNumberOfThreads(1) 
> without success.
> 
> What am I doing wrong?
> 
> Please help!
> 
> Best Regards
> Karsten
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 


More information about the Insight-users mailing list