[Insight-users] itkBSplineScatteredDataImageFilter exception thrown

Ian Malone ian.malone at drc.ion.ucl.ac.uk
Tue Dec 14 11:12:13 EST 2010


Hi,

I'm trying to use itkBSplineScatteredDataImageFilter as a curve 
interpolator and I'm following
N-D C^k B-Spline Scattered Data Approximation, Tustison and Gee 
http://www.insight-journal.org/browse/publication/57

Just copying the 3D curve example there, wrapping it in an int 
main(void) and adding the right #includes (as attached), I made one 
change which was to output any itk::ExceptionObjects caught. It crashes 
in ITK 3.16 and 3.20 as follows:

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/itkBSplineScatteredDataPointSetToImageFilter.txx
Line: 633
Description: itk::ERROR: PointSetToImageFilter(0x807a8a0): The 
reparameterized point component 1.002 is outside the corresponding 
parametric domain of [0, 1].


3.20:
 Test 2: itkBSplineScatteredDataImageFilter exception thrown

itk::ExceptionObject (0x8153f38)
Location: "void itk::MultiThreader::SingleMethodExecute()"
File: 
/home/samba/user/malone/testing/itk/InsightToolkit-3.20.0/Code/Common/itkMultiThreader.cxx
Line: 471
Description: itk::ERROR: MultiThreader(0x8149ac0): Exception occurred 
during SingleMethodExecute

By comparison with 
Testing/Code/Review/itkBSplineScatteredDataPointSetToImageFilterTest2.cxx 
I guess that this is because itkBSplineScatteredDataImageFilter is 
trying to do calculations on the range [0:1] with a spacing 0.001, which 
requires size to be 1001 (when in fact the size Fill ( 1.0/ spacing [0]) 
results in 999). However this isn't really mentioned in the DOxygen for 
it. Also at the input end of things if pointSet -> SetPoint ( i , point 
); sets points beyond the range [0,1] then I get a similar error. So, is 
anyone who knows about itkBSplineScatteredDataPointSetToImageFilter able 
to tell me whether it's supposed to only operate on [0:1]?

Thanks for your time.

-- 
imalone
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: itk-curvebsplinetest.cpp
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101214/ad16bdd8/attachment.asc>


More information about the Insight-users mailing list