Page MenuHomePhabricator

ITK Macro problem while compiling debug with ITK 3.18
Closed, ResolvedPublic

Description

While building the current MITK with ITK 3.18 as a Release works fine, building it as a Debug produces as error:

itk3180\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)

resulting in the mitkIGT.lib not being build.

As far as I can trace the problem through the macros it is located in

itkMacro.h line 237

which is only compiled for a Debug build.

Event Timeline

Coming from:
mitkVirtualTrackingTool.h, ln. 54
itkGetObjectMacro(Spline, SplineType);

The problem is actually a bug in ITK 3.18.

I committed a ITK bug report: http://public.kitware.com/Bug/view.php?id=10633

I already got an answer from Luis Ibanez:
http://www.itk.org/pipermail/insight-users/2010-April/036546.html

But either I don't understand his diff, or it does not solve the solution. He committed the patch to the 3.18 branch, but I don't know when a bugfix release will be published.

Now there are a total of 8 commits in itkNonUniformBSpline.h and itkNonUniformBSpline.txx. Using the new version, MITK compiles with ITK 3.18 in Debug (and Release) mode.

Now the question is, how we will incorporate this into MITK?

Copy the updated files into MITK and use an ifdef on the ITK version 3.18 to include our copied file instead of the regular 3.18 file? Wait for a bugfix release?

[SVN revision 22710]
FIX (#3839): import and use CVS version of itkNonUniformBSpline class to circumvent a bug in ITK 3.18 (see http://public.kitware.com/Bug/view.php?id=10633)

After discussion in the MITK meeting, I used this solution:

Copy the updated files into MITK and use an #if on the ITK version 3.18 to include our copied file instead of the regular 3.18 file.

With this change, MITK compiles in debug mode on my machine. If the dartclient is green tomorrow, this bug can be closed.

All dart clients running ITK 3.18 compiled and passed the tests.

Changing status to resolved-fixed