<br>Surprise, surprise:<br><br> Code that was not tested... was Broken !<br><br>now that we are building the NonUniformBSpline class,<br>it fails to compile in several platforms.<br><br><a href="http://public.kitware.com/dashboard.php?name=itk">http://public.kitware.com/dashboard.php?name=itk</a><br>
<br>with the error message:<br><br><b><pre>/Utilities/vxl/core/vnl/algo/vnl_svd.h:193: error: 'vnl_svd<T>::vnl_svd(const vnl_svd<T>&) [with T = double]' is private<br></pre></b><br>It has however, a curious pattern...<br>
<br>It fails in some Linux builds, but not all...<br><br>It fails in Mac builds, <br><br>and in some of the SunOS builds, but not all...<br><br>it seems to build on Windows (so far).<br><br>The problem seems to originate from line 313 of<br>
<br>Insight/Code/Common/itkNonUniformBSpline.txx:<br><br> vnl_matrix<double> B = vnl_matrix_inverse<double>(N_matrix.transpose() * N_matrix) * N_matrix.transpose() * data_matrix;<br><br><br>We will track the problem and clean it up...<br>
<br><br> Luis<br><br><br>-------------------------------------------------------------------<br><div class="gmail_quote">On Wed, Apr 28, 2010 at 12:54 PM, Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Hi Jochen,<br><br>Thanks a lot for filing the bug report on this problem<br><br> <a href="http://public.kitware.com/Bug/view.php?id=10633" target="_blank">http://public.kitware.com/Bug/view.php?id=10633</a><br>
<br><br>We just committed a patch to fix the problem.<br>
<br><br>It includes a unit test for the NonUniformBSpline class.<br>
The test still needs some work on verifying the <br>correctness of its numerical outputs.<br><br>The changes are:<br>
<br>
<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkNonUniformBSpline.h?root=Insight&r1=1.6&r2=1.7&sortby=date" target="_blank">http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkNonUniformBSpline.h?root=Insight&r1=1.6&r2=1.7&sortby=date</a> [<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkNonUniformBSpline.h?root=Insight&r1=1.6&r2=1.7&sortby=date" target="_blank">^</a>]<br>
<br>
<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkNonUniformBSpline.txx?root=Insight&r1=1.8&r2=1.9&sortby=date" target="_blank">http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkNonUniformBSpline.txx?root=Insight&r1=1.8&r2=1.9&sortby=date</a> [<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkNonUniformBSpline.txx?root=Insight&r1=1.8&r2=1.9&sortby=date" target="_blank">^</a>]<br>
<br>
<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/itkCommonTests2.cxx?root=Insight&r1=1.30&r2=1.31&sortby=date" target="_blank">http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/itkCommonTests2.cxx?root=Insight&r1=1.30&r2=1.31&sortby=date</a> [<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/itkCommonTests2.cxx?root=Insight&r1=1.30&r2=1.31&sortby=date" target="_blank">^</a>]<br>
<br>
<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/CMakeLists.txt?root=Insight&r1=1.253&r2=1.254&sortby=date" target="_blank">http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/CMakeLists.txt?root=Insight&r1=1.253&r2=1.254&sortby=date</a> [<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/CMakeLists.txt?root=Insight&r1=1.253&r2=1.254&sortby=date" target="_blank">^</a>]<br>
<br>
New File: Unit Test.<br>
<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/itkNonUniformBSplineTest.cxx?root=Insight&sortby=date&view=log" target="_blank">http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/itkNonUniformBSplineTest.cxx?root=Insight&sortby=date&view=log</a> [<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/itkNonUniformBSplineTest.cxx?root=Insight&sortby=date&view=log" target="_blank">^</a>]<br>
<br><br>
We will wait to see tomorrow's Dashboard. <br>
If it is green we will commit the same patch to the ITK 3.18 branch.        <br><br><br> Please let us know if you see any problems,<br><br><br> Thanks,<br><br><br> Luis<br><br><br><br>--------------------------------------------------------------------------------------<div>
<div></div><div class="h5"><br>
<div class="gmail_quote">On Wed, Apr 28, 2010 at 10:44 AM, Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Jochem,<br><br>Thanks a lot for pointing this out and for your detailed<br>analysis of the problem.<br><br>As an immediate remedy, <br>Please apply the following patch to your checkout of ITK<br><br>Index: itkNonUniformBSpline.h<br>
===================================================================<br>RCS file: /cvsroot/Insight/Insight/Code/Common/itkNonUniformBSpline.h,v<br>retrieving revision 1.6<br>diff -p -u -r1.6 itkNonUniformBSpline.h<br>--- itkNonUniformBSpline.h 25 Mar 2010 14:57:49 -0000 1.6<br>
+++ itkNonUniformBSpline.h 28 Apr 2010 14:40:53 -0000<br>@@ -26,6 +26,7 @@<br> <br> #include "itkPoint.h"<br> #include "itkObject.h"<br>+#include "itkObjectFactory.h"<br> #include "itkArray.h"<br>
<br> namespace itk {<br><br>--------------------------------------------------------------------------<br><br><br>You make a good point that this class is to fitting the <br>quality standards of ITK.<br><br>In particular, it has the comment:<br>
<br> *<br> * CAUTION: THIS CLASS IS STILL UNDER DEVELOPMENT.<br> *<br> */<br><br>and it doesn't have a unit test.<br><br>I'm now adding a unit test for it.... <br>and most likely we will find with it that some functionalities<br>
of the class are not fully implemented.<br><br><br>I'll the put this patch in both ITK CVS HEAD <br>and the ITK 3.18 branch.<br><br><br> Regards,<br><br><br> Luis<br><br><br><br>---------------------------------------------------------------------------------<div>
<div></div><div><br>
<div class="gmail_quote">On Wed, Apr 28, 2010 at 10:34 AM, Neuhaus Jochen <span dir="ltr"><<a href="mailto:j.neuhaus@dkfz-heidelberg.de" target="_blank">j.neuhaus@dkfz-heidelberg.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi List,<br>
<br>
<br>
I have a simple test program that produces compiler errors with ITK 3.18 in Debug mode (on Visual Studio 2008), but was working with ITK 3.16:<br>
<br>
#include <itkNonUniformBSpline.h><br>
int main(int /* argc */, char* /*argv*/[])<br>
{<br>
typedef itk::NonUniformBSpline<3> SplineType;<br>
SplineType::Pointer mySpline;<br>
return 0;<br>
}<br>
<br>
<br>
itkNonUniformBSpline.h changed between 3.16 and 3.18 to use itkGetConstReferenceMacro instead of direct inline Get-methods (see bug <a href="http://public.kitware.com/Bug/view.php?id=10458" target="_blank">http://public.kitware.com/Bug/view.php?id=10458</a>). The problem is, that the type if the member that is returned is not an itk-type, but stl::vector. Inside itkGetConstReferenceMacro, in Debug mode, the stl vector is piped into an itk::OStringStream:<br>
<br>
itkDebugMacro("returning " << #name " of " << this->m_##name );<br>
<br>
<-- this produces an compiler error that there is no valid << operator.<br>
<br>
Unfortunately, there is no unit test for itkNonUniformBSpline and the class is not used anywhere in ITK, therefore it was probably never compiled by a dartclient. Another example that untested code is to be considered buggy code...<br>
<br>
However, we use this class in our MITK toolkit, which makes MITK incompatible with ITK 3.18.<br>
<br>
This bug is easy enough to fix (use itk::VectorContainer instead of stl::vector), but the question is, will there be a bugfix release of ITK for this in the not too distant future that we could wait for? Or should we try to circumvent this on the MITK side to establish compatibility with ITK 3.18?<br>
<br>
<br>
Best Regards,<br>
<font color="#888888"> Jochen<br>
</font></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>