[Insight-users] 4D Bspline approximation

DE CRAENE, MATHIEU mathieu.de_craene at philips.com
Thu Sep 20 12:55:01 EDT 2012


Hi Nick

Thanks a lot for the input.

For the first point, I understand that what matters is the domain as defined from (Origin,Size,Spacing) since I don't want to generate an output image but only the phi lattice. For the second point, I have removed my border control points since this is internally handled.

When debugging further the code, I noticed the following

1) The origin of the lattice as obtained from the bspline projection filter seems to be

                                latticeOrigin = -latticeSpacing.
   When I would expect it to be
                                latticeOrigin = domainOrigin -latticeSpacing.

   Is it assumed  that the origin of the domain is 0 ?

2) When I use a time lower bound equal to the Upper bound equal to 0, I get infinite displacement.

3) As a test, I overwrote the result of the projection filter and set all node values to be equal to 10. I was expecting the mesh to be shifted from a constant translation at each time step. But it seems to be moving only at the first time point. Maybe I incorrectly defined the temporal span of the transformation ....

I reattach the source code to this email. I'm using  ITK 4.2.
Since this part of the toolkit is under intense development, I maybe should move to a more recent version. Let me know where to download it if that would be the case.


Thanks a lot!!!!


Mathieu

-----Message d'origine-----
Envoyé : jeudi 20 septembre 2012 13:38
À : DE CRAENE, MATHIEU
Objet : Re: 4D Bspline approximation

Hi Mathieu,

Perhaps answering your short questions will help us figure out what's going on.

> - Is it correct to use the same size as the number of control points in itkBSplineScatteredDataPointSetToImageFilter ?

No, they're distinct.  The spacing and size combination define the sampled parametric domain (I did this primarily since the filter derives from the PointSetToImageFilter base class).  So if I have a 20x20 control point grid defining a b-spline object over a domain of 100mm x 100mm, there are many ways I can define the domain which won't matter for the internal calculations of the final "PhiLattice".
For example, a size and spacing combination of

size = 101, spacing = 1

will define the same parametric domain as

size = 1001, spacing = 0.1

The only difference will be the size of the "image", i.e. sampled B-spline object when you call GetOutput() but the GetPhiLattice() will be the same.

> - Should I take care of having enough border control points around the mesh nodes (padding) ? How many nodes ?

In the B-spline classes that I've written (including a rewrite of the B-spline transform class), I don't make a distinction between the internal control points and the border control points.  When you specify the parametric domain for the BSplineScattered...Filter (by specifying the origin, size, and spacing), the control points get laid out automatically based on that domain and the spline order(s) including the border ones.

I hope that helps.  Let me know if it doesn't and I can try running things on my end.

Nick





________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testRegulItkBspline.cxx
Type: application/octet-stream
Size: 6896 bytes
Desc: testRegulItkBspline.cxx
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120920/69f6f537/attachment.obj>


More information about the Insight-users mailing list