[Insight-users] posssible bug in ÎTK 3.18

Luis Ibanez luis.ibanez at kitware.com
Wed Apr 28 10:44:50 EDT 2010


Hi Jochem,

Thanks a lot for pointing this out and for your detailed
analysis of the problem.

As an immediate remedy,
Please apply the following patch to your checkout of ITK

Index: itkNonUniformBSpline.h
===================================================================
RCS file: /cvsroot/Insight/Insight/Code/Common/itkNonUniformBSpline.h,v
retrieving revision 1.6
diff -p -u -r1.6 itkNonUniformBSpline.h
--- itkNonUniformBSpline.h    25 Mar 2010 14:57:49 -0000    1.6
+++ itkNonUniformBSpline.h    28 Apr 2010 14:40:53 -0000
@@ -26,6 +26,7 @@

 #include "itkPoint.h"
 #include "itkObject.h"
+#include "itkObjectFactory.h"
 #include "itkArray.h"

 namespace itk {

--------------------------------------------------------------------------


You make a good point that this class is to fitting the
quality standards of ITK.

In particular, it has the comment:

 *
 * CAUTION: THIS CLASS IS STILL UNDER DEVELOPMENT.
 *
 */

and it doesn't have a unit test.

I'm now adding a unit test for it....
and most likely we will find with it that some functionalities
of the class are not fully implemented.


I'll the put this patch in both ITK CVS HEAD
and the ITK 3.18 branch.


    Regards,


        Luis



---------------------------------------------------------------------------------
On Wed, Apr 28, 2010 at 10:34 AM, Neuhaus Jochen <
j.neuhaus at dkfz-heidelberg.de> wrote:

> Hi List,
>
>
> 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:
>
> #include <itkNonUniformBSpline.h>
> int main(int /* argc */, char* /*argv*/[])
> {
>  typedef itk::NonUniformBSpline<3> SplineType;
>  SplineType::Pointer mySpline;
>  return 0;
> }
>
>
> itkNonUniformBSpline.h changed between 3.16 and 3.18 to use
> itkGetConstReferenceMacro instead of direct inline Get-methods (see bug
> http://public.kitware.com/Bug/view.php?id=10458). 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:
>
> itkDebugMacro("returning " << #name " of " << this->m_##name );
>
> <-- this produces an compiler error that there is no valid << operator.
>
> 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...
>
> However, we use this class in our MITK toolkit, which makes MITK
> incompatible with ITK 3.18.
>
> 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?
>
>
> Best Regards,
>  Jochen
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100428/ca81ce21/attachment.htm>


More information about the Insight-users mailing list