[Insight-users] ApproximateSignedDistanceMapImageFilterType
francois rousseau
rousseau at unistra.fr
Wed Sep 5 11:07:23 EDT 2012
Hi,
I do have some issue to use the ApproximateSignedDistanceMapImageFilterType
I saw fews threads about that in ITK mailing list, but the problem here seems to be different.
The input image contains 0 and 1 values. It is a short image.
Here the code I use:
typedef itk::ApproximateSignedDistanceMapImageFilter< ImageType, FloatImageType > ApproximateSignedDistanceMapImageFilterType;
ApproximateSignedDistanceMapImageFilterType::Pointer filter = ApproximateSignedDistanceMapImageFilterType::New();
filter->SetInput(inputImage);
filter->SetInsideValue(1);
filter->SetOutsideValue(0);
filter->Update();
Here is the message in the terminal I get:
terminate called after throwing an instance of 'itk::ExceptionObject'
what(): /Users/rousseau/Code/src/InsightToolkit-4.0.0/Modules/Core/Common/src/itkMultiThreader.cxx:355:
itk::ERROR: MultiThreader(0x7fe592013000): Exception occurred during SingleMethodExecute
Abort trap: 6
The debugger indicates this line: 285 in itkImageBase.hxx (the update function)
template< unsigned int VImageDimension >
void
ImageBase< VImageDimension >
::UpdateOutputData()
{
// If the requested region does not contain any pixels then there is
// no reason to Update the output data. This is needed so that
// filters don't need to update all inputs. This occours in
// ImageBase as oppose to DataObject, but cause this statement
// requires the specific GetNumberOfPixels methods ( as oppose to a
// generic Region::IsEmpty method ).
//
// Also note, the check of the largest possible region is needed so
// that an exception will be thrown in the process object when no
// input has been set. ( This part of the statement could be removed
// if this check happened earlier in the pipeline )
if ( this->GetRequestedRegion().GetNumberOfPixels() > 0
|| this->GetLargestPossibleRegion().GetNumberOfPixels() == 0 )
{
this->Superclass::UpdateOutputData();
}
}
Am I doing something wrong?
Thanks
françois
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120905/7dddc599/attachment.htm>
More information about the Insight-users
mailing list