<div dir="ltr">Hi Matt,<div><br></div><div>I installed the most recent version of ITK from Git master, wrote a SSCCE code and tried again.</div><div>There is no segmentation fault anymore (good!), but now the program terminates after throwing the following exception:</div><div><br></div><div><div>terminate called after throwing an instance of 'itk::ExceptionObject'</div><div> what(): /home/carlos/workspace/libraries/ITK/src/Modules/Core/Common/src/itkMultiThreader.cxx:417:</div><div>itk::ERROR: MultiThreader(0x1757290): Exception occurred during SingleMethodExecute</div><div>/usr/local/include/ITK-4.9/itkBSplineScatteredDataPointSetToImageFilter.hxx:621:</div><div>itk::ERROR: PointSetToImageFilter(0x1761130): The reparameterized point component -0.15748 is outside the corresponding parametric domain of [0, 2).</div><div><br></div></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>Please let me know if you find out anything.</div><div><br></div><div>Thanks!<br></div><div>[]s<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-02 14:10 GMT-02:00 Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Carlos,<br>
<br>
There have been some improvements to the<br>
LandmarkBasedTransformInitializer recently, so could you please try<br>
with Git master [1]?<br>
<br>
If the issue remains, could you please share a short, self-contained,<br>
compilable example?<br>
<br>
Thanks,<br>
Matt<br>
<br>
[1] <a href="http://www.itk.org/Wiki/ITK/Git" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK/Git</a><br>
<br>
[2] <a href="http://www.sscce.org/" rel="noreferrer" target="_blank">http://www.sscce.org/</a><br>
<div><div class="h5"><br>
On Thu, Oct 29, 2015 at 9:12 AM, Carlos Henrique Villa Pinto<br>
<<a href="mailto:chvillap@gmail.com">chvillap@gmail.com</a>> wrote:<br>
> Hi, everyone.<br>
><br>
> I have two sets of landmark points, detected from two different 3D MR<br>
> images, and I'm trying to estimate a nonlinear mapping between the pairs of<br>
> matching landmarks. I already have the matchings, I just need to generate a<br>
> BSpline transform from them. The LandmarkBasedTransformInitializer class<br>
> seems perfect for that, but when I call its InitializeTransform() method<br>
> (after setting all the required input parameters), the result is a<br>
> segmentation fault.<br>
><br>
> I'm using ITK 4.8.0. I checked the source code and made some tests, but the<br>
> only thing that I could find out is that the problem happens in the<br>
> GenerateData() method of the BSplineScatteredDataPointSetToImageFilter<br>
> class, when the SingleMethodExecute() method is called by the<br>
> ThreadGenerator object. In such version of ITK, that happens in line 314 of<br>
> the file BSplineScatteredDataPointSetToImageFilter.hxx. I couldn't go<br>
> further because I have no clue of what exactly is being called by the<br>
> ThreaderCallback in that class.<br>
><br>
> Does anyone have any clue about what sort of things could cause a<br>
> segmentation fault in the BSplineScatteredDataPointSetToImageFilter class?<br>
> Could that be a bug, maybe?<br>
><br>
> I don't know if this information is relevant, but my images have both LPI<br>
> orientation, origin = (-127.5, -127.5, -127.5) and spacing = 2 x 2 x 2 mm.<br>
> And I'm using the SetReferenceImage() method of the<br>
> LandmarkBasedTransformInitializer class to define the parametric domain of<br>
> the BSpline transform.<br>
><br>
> I can provide some pieces of code and more information about my data if<br>
> needed.<br>
><br>
> Thanks in advance!<br>
><br>
> []s<br>
><br>
> --<br>
> Carlos Henrique Villa Pinto<br>
> Graduate Student in Computer Science<br>
> Federal University of São Carlos - Brazil<br>
> XCS<br>
><br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Carlos Henrique Villa Pinto<div>Graduate Student in Computer Science</div><div>Federal University of São Carlos - Brazil</div><div>XCS</div></div></div>
</div>