[Insight-users] Failed to allocate memory in filtering an image by
Canny
Yan Yang
y.yang at anglia.ac.uk
Wed Aug 9 16:11:15 EDT 2006
Dear All,
I got a memory allocation problem, please see the copied error message below. I would be very grateful if anyone could help me solve this problem.
My data:
Dimension: 512x512x277
Pixel Type: signed short
Operation: Generate the edge map of the input image using CannyEdgeDetectionImageFilter
Code snippet:
CastToReal->SetInput( inputImage );
cannyFilter->SetInput( CastToReal->GetOutput() );
cannyFilter->SetVariance( 0.5 );
cannyFilter->SetLowerThreshold( 255 );
cannyFilter->SetUpperThreshold( 90 );
cannyFilter->Update();
rescaleToChar->SetOutputMinimum( NumericTraits< CharPixelType >::min() );
rescaleToChar->SetOutputMaximum( NumericTraits< CharPixelType >::max() );
rescaleToChar->SetInput( cannyFilter->GetOutput() );
rescaleToChar->Update();
An error occured at runing the line "rescaleToChar->Update();", the error message is as the following.
----------------------------------------------------------------------------------------------------------------------------------------------
itk::ExceptionObject (0138F9D8)
Location: "ImportImageContainer::AllocateElements"
File: C:\Librabries\InsightToolkit-2.4.1\InsightToolkit-2.4.1\Code\Common\itkImp
ortImageContainer.txx
Line: 186
Description: Failed to allocate memory for image.
Caught an ITK exception at executing registration app.
itk::ExceptionObject (0138F9D8)
Location: "ImportImageContainer::AllocateElements"
File: C:\Librabries\InsightToolkit-2.4.1\InsightToolkit-2.4.1\Code\Common\itkImp
ortImageContainer.txx
Line: 186
Description: Failed to allocate memory for image.
-------------------------------------------------------------------------------------------------------------------------------------------------
Many thanks in advance.
Yan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060809/ae364119/attachment.htm
More information about the Insight-users
mailing list