[Insight-users] Fwd: [ITK4] ITK/Examples/Registration/ImageRegistrationMethodBSpline

Nicholas Tustison ntustison at gmail.com
Fri Sep 30 10:57:38 EDT 2011


Hi Vivien,

In an attempt to improve the B-spline transform in itk, we made a couple changes
which you've noticed.  

1) We removed the bulk transform
2) We corrected incorrect behavior for even spline orders
3) We changed the api to make things easier for the user.

Your inquiry concerns item 3).  To make things more clear, we need to distinguish
between the B-spline mesh and the corresponding control point grid.  You can
think of the B-spline mesh in the same way as a FEM mesh---elements, or patches,
linked together in N-dimensions with some continuity constraints joining them.  
The domain of the B-spline mesh is the domain of the B-spline transform.  However,
that is not the case with the B-spline control point grid, which, depending on the
order, extends beyond the transform domain.  Most users will have some idea of
the transform domain but would require some B-spline familiarity to be able to 
translate that to specifying the control point configuration.  The new API changes
hides all that complexity from the user.  

As for your specific question---the meshSize (which is *not* the control point grid
size) is the number of elements comprising the transform domain in each dimension.  
The relationship between the number of elements in a single dimension and the
number of control points in that dimension is given by

meshSize[d] = controlPointGridSize[d] - SplineOrder.

As for the wiki example, it appears to have a small mistake with the following lines.

  unsigned int numberOfGridNodesInOneDimension = 5;
  meshSize.Fill( numberOfGridNodesInOneDimension - SplineOrder );

In order for it to be analogous to ITKv3, one shouldn't subtract the SplineOrder.
It would probably be more accurate for the first line to be something like

unsigned int numberOfMeshElementsInOneDimension = 5;

Nick



Begin forwarded message:

> From: Bill Lorensen <bill.lorensen at gmail.com>
> Subject: Fwd: [Insight-users] [ITK4] ITK/Examples/Registration/ImageRegistrationMethodBSpline
> Date: September 30, 2011 10:36:03 AM EDT
> To: Nick Tustison <ntustison at wustl.edu>
> 
> ---------- Forwarded message ----------
> From: Vivien Delmon <vivien.delmon at creatis.insa-lyon.fr>
> Date: Thu, Sep 29, 2011 at 12:14 PM
> Subject: [Insight-users] [ITK4]
> ITK/Examples/Registration/ImageRegistrationMethodBSpline
> To: insight-users at itk.org
> 
> 
> Dear all,
> 
> I am porting clitk tools to itk4 and I saw that the
> itkBSplineTransform's API changed. I tried to understand how it works
> with the example you written here :
> http://www.itk.org/Wiki/ITK/Examples/Registration/ImageRegistrationMethodBSpline#ImageRegistrationMethodBSpline.cxx
> 
> But I could not figure out why you subtract the SplineOrder from the
> meshSize in the itk4 version :
> 
>  unsigned int numberOfGridNodesInOneDimension = 5;
>  meshSize.Fill( numberOfGridNodesInOneDimension - SplineOrder );
> 
> I compiled the example with itkv3 / itkv4 and the only way I found to
> get the same number of parameters is by removing this subtraction. Is
> there something wrong on the wiki page or am I misunderstood something
> ? Moreover removing this subtract doesn't give the same result as the
> itkv3 version. What is the right way to have similar result with itkv3
> and itkv4 ?
> 
> King Regards,
> 
> --
> Vivien Delmon
> PhD student at CREATIS, Lyon
> Supported by ANRT and ELEKTA
> http://www.creatis.insa-lyon.fr/rio
> _____________________________________
> 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.html
> 
> 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://www.itk.org/mailman/listinfo/insight-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110930/531ef255/attachment.htm>


More information about the Insight-users mailing list