[Insight-users] ApproximateSignedDistanceMapImageFilterType

francois rousseau rousseau at unistra.fr
Thu Sep 6 03:59:57 EDT 2012


When I create an image, as in the example, it does not crash.

When I try to use some of the images (short, values equal to 0 or 1 only) I have obtained on real data, it crashes.

I'll try to figure out.

Thanks
françois 


On Sep 5, 2012, at 6:27 PM, Cagatay Bilgin wrote:

> Can you post an executable code illustrating the 
> problem. If possible create the input image 
> programmatically. 
> 
> Cheers, 
> Cagatay 
> 
> On Wed, Sep 5, 2012 at 8: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
> 
> 
> 
> 
> -- 
> Cemal Cagatay Bilgin
> Life Sciences Division
> Lawrence Berkeley National Lab
> MS977, One Cyclotron Road
> Berkeley, CA 94720, USA
> Email: ccbilgin at lbl.gov

--
---------------------------
Francois Rousseau
LSIIT
Pôle API
Boulevard Sébastien Brant
F-67400 ILLKIRCH
tel : +33 3 68 85 44 89
email : rousseau at unistra.fr
http://lsiit-miv.u-strasbg.fr/miv/19-ROUSSEAU-Francois.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120906/fd94a3a1/attachment.htm>


More information about the Insight-users mailing list