[Insight-users] itkBSplineScatteredDataImageFilter exception thrown

Ian Malone ian.malone at drc.ion.ucl.ac.uk
Wed Dec 15 11:30:40 EST 2010


Matt McCormick wrote:
> Ian Malone <ian.malone at ...> writes:
>
>   
>>>> 3.16:
>>>> Test 2: itkBSplineScatteredDataImageFilter exception thrown
>>>>
>>>> itk::ExceptionObject (0x807d448)
>>>> Location: "void 
>>>>         
> itk::BSplineScatteredDataPointSetToImageFilter<TInputPointSet,
>   
>> TOutputImage>::GenerateControlLattice() [with TInputPointSet =
>> itk::PointSet<itk::Vector<double, 3u>, 1u, 
>>     
> itk::DefaultStaticMeshTraits<itk::Vector<double,
>   
>> 3u>, 1u, 1u, float, float, itk::Vector<double, 3u> > >, TOutputImage =
>> itk::Image<itk::Vector<double, 3u>, 1u>]"
>>     
>>>> File: 
>>>>         
> /var/drc/software/32bit/itk/include/InsightToolkit/Review/itkBSplineScatteredDat
> aPointSetToImageFilter.txx
>   
>>>> Line: 633
>>>> Description: itk::ERROR: PointSetToImageFilter(0x807a8a0): The 
>>>>         
> reparameterized point component
>   
>> 1.002 is outside the corresponding parametric domain of [0, 1].
>>     
>
> This fix was a result of some good teamwork with Nick.  You can try applying the 
> patch to your ITK 3.20 source tree to see if it fixes the problem.
>
> http://itk.org/gitweb?
> p=ITK.git;a=commitdiff;h=96250f837fd99ff6eea4f808ddebe1291189675f
>
>   

Thanks, I've tried making that fix and also just copying the .txx and .h 
out of that git tree-ish, the crash still occurs with 1000 points and 
0.001 spacing, but I assume that's simply because that range doesn't 
cover [0,1] so shouldn't be expected to work.

What's currently confusing me is that I'm trying to fit curves (1D 
parameter, R^3 values) on the surface of a radius 1 sphere at the moment 
and the control points and spline positions I'm getting out are not on 
the sphere at level 1, higher levels improve things, but using the same 
number of control points at level 1 does not. I assume this is simply 
related to the fitting and I'm not too concerned about it. The really 
puzzling thing is this curve at constant theta (code attached):
  pointval[0] = cos(theta);
  pointval[1] = sin(theta)*cos(phi);
  pointval[2] = sin(theta)*sin(phi);

While pointval[0] is constant (0.825336 in my example), when I fit at 
level 1 with 20 control points I get a constant offset along the middle 
of the curve (with a value of 0.928681, changes slightly if I add more 
input points). This leaves me wondering if I'm doing something wrong.

imalone



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: itk-curvebsplinetest2.cpp
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101215/9a49908a/attachment.txt>


More information about the Insight-users mailing list