[ITK-users] Segmentation fault when trying to generate a BSpline transform from a set of matching landmarks

Carlos Henrique Villa Pinto chvillap at gmail.com
Wed Nov 4 11:44:50 EST 2015


Hi Matt,

I installed the most recent version of ITK from Git master, wrote a SSCCE
code and tried again.
There is no segmentation fault anymore (good!), but now the program
terminates after throwing the following exception:

terminate called after throwing an instance of 'itk::ExceptionObject'
  what():
 /home/carlos/workspace/libraries/ITK/src/Modules/Core/Common/src/itkMultiThreader.cxx:417:
itk::ERROR: MultiThreader(0x1757290): Exception occurred during
SingleMethodExecute
/usr/local/include/ITK-4.9/itkBSplineScatteredDataPointSetToImageFilter.hxx:621:
itk::ERROR: PointSetToImageFilter(0x1761130): The reparameterized point
component -0.15748 is outside the corresponding parametric domain of [0, 2).

I still don't know why this is happening, but it seems to me that it has to
do with the image orientation... because my short example works fine when
the direction matrices of the fixed/moving images have positive values
only. If they have any negative value, however, the exception above is
thrown (segmentation fault in previous ITK versions).

I attached my SSCCE code for anyone who wants to take a look. You can use
it to manually define values for the direction matrix and see what happens.
No input data is needed.

Please let me know if you find out anything.

Thanks!
[]s

2015-11-02 14:10 GMT-02:00 Matt McCormick <matt.mccormick at kitware.com>:

> Hi Carlos,
>
> There have been some improvements to the
> LandmarkBasedTransformInitializer recently, so could you please try
> with Git master [1]?
>
> If the issue remains, could you please share a short, self-contained,
> compilable example?
>
> Thanks,
> Matt
>
> [1] http://www.itk.org/Wiki/ITK/Git
>
> [2] http://www.sscce.org/
>
> On Thu, Oct 29, 2015 at 9:12 AM, Carlos Henrique Villa Pinto
> <chvillap at gmail.com> wrote:
> > Hi, everyone.
> >
> > I have two sets of landmark points, detected from two different 3D MR
> > images, and I'm trying to estimate a nonlinear mapping between the pairs
> of
> > matching landmarks. I already have the matchings, I just need to
> generate a
> > BSpline transform from them. The LandmarkBasedTransformInitializer class
> > seems perfect for that, but when I call its InitializeTransform() method
> > (after setting all the required input parameters), the result is a
> > segmentation fault.
> >
> > I'm using ITK 4.8.0. I checked the source code and made some tests, but
> the
> > only thing that I could find out is that the problem happens in the
> > GenerateData() method of the BSplineScatteredDataPointSetToImageFilter
> > class, when the SingleMethodExecute() method is called by the
> > ThreadGenerator object. In such version of ITK, that happens in line 314
> of
> > the file BSplineScatteredDataPointSetToImageFilter.hxx. I couldn't go
> > further because I have no clue of what exactly is being called by the
> > ThreaderCallback in that class.
> >
> > Does anyone have any clue about what sort of things could cause a
> > segmentation fault in the BSplineScatteredDataPointSetToImageFilter
> class?
> > Could that be a bug, maybe?
> >
> > I don't know if this information is relevant, but my images have both LPI
> > orientation, origin = (-127.5, -127.5, -127.5) and spacing = 2 x 2 x 2
> mm.
> > And I'm using the SetReferenceImage() method of the
> > LandmarkBasedTransformInitializer class to define the parametric domain
> of
> > the BSpline transform.
> >
> > I can provide some pieces of code and more information about my data if
> > needed.
> >
> > Thanks in advance!
> >
> > []s
> >
> > --
> > Carlos Henrique Villa Pinto
> > Graduate Student in Computer Science
> > Federal University of São Carlos - Brazil
> > XCS
> >
> > _____________________________________
> > 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://public.kitware.com/mailman/listinfo/insight-users
> >
>



-- 
Carlos Henrique Villa Pinto
Graduate Student in Computer Science
Federal University of São Carlos - Brazil
XCS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20151104/99a4231e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Example.zip
Type: application/zip
Size: 2214 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20151104/99a4231e/attachment.zip>


More information about the Insight-users mailing list