<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Vivien,<div><br></div><div>In an attempt to improve the B-spline transform in itk, we made a couple changes</div><div>which you've noticed. </div><div><br></div><div>1) We removed the bulk transform</div><div>2) We corrected incorrect behavior for even spline orders</div><div>3) We changed the api to make things easier for the user.</div><div><br></div><div>Your inquiry concerns item 3). To make things more clear, we need to distinguish</div><div>between the B-spline mesh and the corresponding control point grid. You can</div><div>think of the B-spline mesh in the same way as a FEM mesh---elements, or patches,</div><div>linked together in N-dimensions with some continuity constraints joining them. </div><div>The domain of the B-spline mesh is the domain of the B-spline transform. However,</div><div>that is not the case with the B-spline control point grid, which, depending on the</div><div>order, extends beyond the transform domain. Most users will have some idea of</div><div>the transform domain but would require some B-spline familiarity to be able to </div><div>translate that to specifying the control point configuration. The new API changes</div><div>hides all that complexity from the user. </div><div><br></div><div>As for your specific question---the meshSize (which is *not* the control point grid</div><div>size) is the number of elements comprising the transform domain in each dimension. </div><div>The relationship between the number of elements in a single dimension and the</div><div>number of control points in that dimension is given by</div><div><br></div><div>meshSize[d] = controlPointGridSize[d] - SplineOrder.</div><div><br></div><div>As for the wiki example, it appears to have a small mistake with the following lines.</div><div><br></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 10px; "><pre class="de1" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-color: white; border-right-color: white; border-bottom-color: white; border-left-color: white; color: black; background-color: initial; line-height: normal; font: normal normal normal 1em/1.2em monospace; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; vertical-align: top; background-position: initial initial; background-repeat: initial initial; "> <span class="kw4" style="color: rgb(0, 0, 255); ">unsigned</span> <span class="kw4" style="color: rgb(0, 0, 255); ">int</span> numberOfGridNodesInOneDimension <span class="sy1" style="color: rgb(0, 0, 128); ">=</span> <span class="nu0" style="color: rgb(0, 0, 221); ">5</span><span class="sy4" style="color: rgb(0, 128, 128); ">;</span>
meshSize.<span class="me1" style="color: rgb(0, 119, 136); ">Fill</span><span class="br0" style="color: rgb(0, 128, 0); ">(</span> numberOfGridNodesInOneDimension <span class="sy2" style="color: rgb(0, 0, 64); ">-</span> SplineOrder <span class="br0" style="color: rgb(0, 128, 0); ">)</span><span class="sy4" style="color: rgb(0, 128, 128); ">;</span>
</pre><div><span class="sy4" style="color: rgb(0, 128, 128); "><br></span></div></span>In order for it to be analogous to ITKv3, one shouldn't subtract the SplineOrder.</div><div>It would probably be more accurate for the first line to be something like</div><div><br></div><div>unsigned int numberOfMeshElementsInOneDimension = 5;</div><div><br></div><div>Nick</div><div><br></div><div><br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>From: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Subject: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>Fwd: [Insight-users] [ITK4] ITK/Examples/Registration/ImageRegistrationMethodBSpline</b><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">September 30, 2011 10:36:03 AM EDT<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>To: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Nick Tustison <<a href="mailto:ntustison@wustl.edu">ntustison@wustl.edu</a>><br></span></div><br><div>---------- Forwarded message ----------<br>From: Vivien Delmon <<a href="mailto:vivien.delmon@creatis.insa-lyon.fr">vivien.delmon@creatis.insa-lyon.fr</a>><br>Date: Thu, Sep 29, 2011 at 12:14 PM<br>Subject: [Insight-users] [ITK4]<br>ITK/Examples/Registration/ImageRegistrationMethodBSpline<br>To: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br><br><br>Dear all,<br><br>I am porting clitk tools to itk4 and I saw that the<br>itkBSplineTransform's API changed. I tried to understand how it works<br>with the example you written here :<br><a href="http://www.itk.org/Wiki/ITK/Examples/Registration/ImageRegistrationMethodBSpline#ImageRegistrationMethodBSpline.cxx">http://www.itk.org/Wiki/ITK/Examples/Registration/ImageRegistrationMethodBSpline#ImageRegistrationMethodBSpline.cxx</a><br><br>But I could not figure out why you subtract the SplineOrder from the<br>meshSize in the itk4 version :<br><br> unsigned int numberOfGridNodesInOneDimension = 5;<br> meshSize.Fill( numberOfGridNodesInOneDimension - SplineOrder );<br><br>I compiled the example with itkv3 / itkv4 and the only way I found to<br>get the same number of parameters is by removing this subtraction. Is<br>there something wrong on the wiki page or am I misunderstood something<br>? Moreover removing this subtract doesn't give the same result as the<br>itkv3 version. What is the right way to have similar result with itkv3<br>and itkv4 ?<br><br>King Regards,<br><br>--<br>Vivien Delmon<br>PhD student at CREATIS, Lyon<br>Supported by ANRT and ELEKTA<br>http://www.creatis.insa-lyon.fr/rio<br>_____________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at<br>http://www.kitware.com/opensource/opensource.html<br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.html<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></div></blockquote></div><br></div></body></html>