<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Prashanth,</div><div><br></div><div>I recently updated my N3 bias correction filter &nbsp;</div><div><br></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><a href="http://hdl.handle.net/10380/3053">http://hdl.handle.net/10380/3053</a></span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><br></span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; line-height: normal; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; ">which contains the relevant B-spline code to solve the second component of your problem. &nbsp;Specifically, you should look at the following function in the BSplineControlPointImageFilter class</span></span></font></div><div><font class="Apple-style-span" face="Helvetica, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="Helvetica, helvetica, sans-serif">CalculateParametersClosestToDataPoint()</font></div><div><br></div><div>which uses the LBFGSB optimizer to find the parametric values closest to a user-specified point. &nbsp;One can then calculate the actual point on the curve corresponding to the minimizing parametric values by calling the function</div><div><br></div><div>EvaluateAtPoint()</div><div><br></div><div>and determining the distance between the two points to determine whether it satisfies the specified threshold. &nbsp;Let me know if you have any questions.</div><div><br></div><div>Nick</div><div><br></div><br><div><div>On Nov 5, 2009, at 11:25 PM, Prashanth Ravindran wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Nick-<br><br>Of course I am interested. Thanks a lot for taking the effort.<br><br>Thanks<br>-- Prashanth<br><br><br><br>----- Original Message ----<br><blockquote type="cite">From: Nicholas Tustison &lt;<a href="mailto:ntustison@gmail.com">ntustison@gmail.com</a>&gt;<br></blockquote><blockquote type="cite">To: Prashanth Ravindran &lt;<a href="mailto:prashanth@100ximaging.com">prashanth@100ximaging.com</a>&gt;<br></blockquote><blockquote type="cite">Cc: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br></blockquote><blockquote type="cite">Sent: Fri, November 6, 2009 6:07:58 AM<br></blockquote><blockquote type="cite">Subject: Re: [Insight-users] ITK support for path generation<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hi Prashanth,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Your email motivated me to complete an additional portion of my B-spline code <br></blockquote><blockquote type="cite">which would answer the second component of your problem, i.e. determining <br></blockquote><blockquote type="cite">whether or not a given point lies on the curve (with some tolerance). &nbsp;What the <br></blockquote><blockquote type="cite">code actually does is, in the B-spline curve case, determine the parametric <br></blockquote><blockquote type="cite">values of a point on the curve closest to a user-specified point. &nbsp;Are you still <br></blockquote><blockquote type="cite">interested in this second part?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Nick<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Nov 4, 2009, at 8:43 AM, Prashanth Ravindran wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Hi Nick-<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">These points are not ordered, i.e one does not know which point comes before <br></blockquote></blockquote><blockquote type="cite">the other, also the parametrization is not known a-priori. Ordering can be done <br></blockquote><blockquote type="cite">via chain coding, and I know that &nbsp;there is ITK support for that, however is <br></blockquote><blockquote type="cite">there a ITK way of calculating the parametrization?<br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">--Prashanth<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">From: Nicholas Tustison <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">To: Prashanth Ravindran <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Cc: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Sent: Wed, November 4, 2009 6:49:09 PM<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Subject: Re: [Insight-users] ITK support for path generation<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Hi Prashanth,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Take a look at the following which should help you with the first part.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="http://www.insight-journal.org/browse/publication/57">http://www.insight-journal.org/browse/publication/57</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">The relevant classes are currently in the Review directory.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Good luck,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Nick<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">On Nov 4, 2009, at 4:47 AM, Prashanth Ravindran wrote:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Hi All-<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I have &nbsp;set of 2-d points, and want to use these points to generate a curve<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">that fits all these points, and lets me test if a given 2-d point lies on the<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">curve (with some tolerance). Are there any classes that I can use to this <br></blockquote></blockquote></blockquote><blockquote type="cite">end?<br></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Thanks,<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">--Prashanth<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">_____________________________________<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Powered by <a href="http://www.kitware.com">www.kitware.com</a><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Visit other Kitware open-source projects at<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Kitware offers ITK Training Courses, for more information visit:<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Please keep messages on-topic and check the ITK FAQ at:<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Follow this link to subscribe/unsubscribe:<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><br></div></blockquote></div><br></body></html>