[Insight-users] ApproximateSignedDistanceMapImageFilterType

Bill Lorensen bill.lorensen at gmail.com
Wed Sep 5 12:25:58 EDT 2012


Please show how inputImage is produced.

On Wed, Sep 5, 2012 at 11:07 AM, francois rousseau <rousseau at unistra.fr>wrote:

> 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
>
> _____________________________________
> 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://www.itk.org/mailman/listinfo/insight-users
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120905/e67378aa/attachment.htm>


More information about the Insight-users mailing list