View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010633ITKpublic2010-04-28 09:422011-06-17 12:53
Reporterjneuhaus 
Assigned ToNick Tustison 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformWindows/x64OSWindows Vista x64OS Version
Product VersionITK-3-18 
Target VersionFixed in Version 
Summary0010633: itk::NonUniformBSpline can not be instantiated
DescriptionI try to compile a very simple test program (see section "Steps To Reproduce") that basically defines a variable of type itk::NonUniformBSpline<3>.

Visual Studio 2008 produces the following complier error:

Compiling...
mitkSplineTest.cpp
v:\windows\source\itk318\code\common\itkNonUniformBSpline.h(83) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'const std::vector<_Ty>' (or there is no acceptable conversion)
        with
        [
            _Ty=itk::Point<itk::NonUniformBSpline<3>::ScalarType,3>
        ]
[... <-- lot of output with possible types that do not match...]

The same code was working on ITK 3.16.
I suppose, the problem is, that this class is not used anywhere in ITK and that there is no unit test for the class, therefore changes to the class were never really compiled (e.g. bug 0010458).
Steps To Reproduce#include <itkNonUniformBSpline.h>

int main(int /* argc */, char* /*argv*/[])
{
  typedef itk::NonUniformBSpline<3> SplineType;
  SplineType::Pointer mySpline;

  return 0;
}
TagsNo tags attached.
Resolution Date
Sprint
Sprint Statusbacklog
Attached Filespatch file icon NonUniformBSpline.patch [^] (4,130 bytes) 2010-04-28 12:47 [Show Content]
cxx file icon itkNonUniformBSplineTest.cxx [^] (5,957 bytes) 2010-04-28 12:47

 Relationships

  Notes
(0020461)
jneuhaus (reporter)
2010-04-28 10:13

An important note: This compiler error only occurs in DEBUG mode!

Digging deeper, I found that the problem is the use of the
itkGetConstReferenceMacro() to return the non-ITK type PointListType which is a stl container:
typedef std::vector < PointType > PointListType;

the macro tries to pipe the vector into an output stream, which fails because there is no operator to pipe stl vectors:
itkDebugMacro("returning " << #name " of " << this->m_##name ); \

(this syntax is strange, I would expect either << before AND after #name or not at all, but this is not part of this bug report)
(0020462)
jneuhaus (reporter)
2010-04-28 11:48

I also posted this to the mailing list and got a reply from Luis Ibanez:

http://www.itk.org/pipermail/insight-users/2010-April/036546.html [^]
(0020464)
Luis Ibanez (manager)
2010-04-28 12:52

The patch has been committed to the CVS Head.

In includes a unit test for the NonUniformBSpline class.
The test still needs some work on verifying the correctness of its numerical outputs.

http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkNonUniformBSpline.h?root=Insight&r1=1.6&r2=1.7&sortby=date [^]

http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkNonUniformBSpline.txx?root=Insight&r1=1.8&r2=1.9&sortby=date [^]

http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/itkCommonTests2.cxx?root=Insight&r1=1.30&r2=1.31&sortby=date [^]

http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/CMakeLists.txt?root=Insight&r1=1.253&r2=1.254&sortby=date [^]

New File
http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/itkNonUniformBSplineTest.cxx?root=Insight&sortby=date&view=log [^]

We will wait to see tomorrow's Dashboard.
If it is green we will commit the same patch to the ITK 3.18 branch.
(0022994)
Luis Ibanez (manager)
2010-11-07 02:00

The class does compile now,
but its implementation is not completed.

This class should be removed from ITK,
or at least, be moved to a module in the periphery.
(0026899)
Nick Tustison (developer)
2011-06-17 12:45

This class is in ITK-deprecated. Doesn't this mean it's slated to be removed and/or we don't have to provide support? I agree with Luis in that I think this class should be removed. It's functionality and usability is rather limited.
(0026901)
Hans Johnson (developer)
2011-06-17 12:53

This class has been deprecated.

 Issue History
Date Modified Username Field Change
2010-04-28 09:42 jneuhaus New Issue
2010-04-28 10:13 jneuhaus Note Added: 0020461
2010-04-28 11:48 jneuhaus Note Added: 0020462
2010-04-28 12:26 Luis Ibanez Status new => assigned
2010-04-28 12:26 Luis Ibanez Assigned To => Luis Ibanez
2010-04-28 12:47 Luis Ibanez File Added: NonUniformBSpline.patch
2010-04-28 12:47 Luis Ibanez File Added: itkNonUniformBSplineTest.cxx
2010-04-28 12:52 Luis Ibanez Note Added: 0020464
2010-11-07 02:00 Luis Ibanez Note Added: 0022994
2011-06-17 12:31 Hans Johnson Assigned To Luis Ibanez => Nick Tustison
2011-06-17 12:45 Nick Tustison Note Added: 0026899
2011-06-17 12:53 Hans Johnson Sprint Status => backlog
2011-06-17 12:53 Hans Johnson Note Added: 0026901
2011-06-17 12:53 Hans Johnson Status assigned => closed
2011-06-17 12:53 Hans Johnson Resolution open => won't fix


Copyright © 2000 - 2018 MantisBT Team