hjmjohnson
(Hans Johnson)
1
When vtkMultithreader.h and itkMultiThreader.h are both used then
VTK/Common/Core/vtkMultiThreader.h line 95
#define ThreadInfoStruct vtkMultiThreader::ThreadInfo
causes conflicts with ITK (master as of 20180326)
Modules/Core/Common/include/itkMultiThreader.h: struct ThreadInfoStruct: MultiThreaderBase::ThreadInfoStruct
Modules/Core/Common/include/itkMultiThreaderBase.h: struct ThreadInfoStruct
The #define in the VTK file changes the name of the struct in the ITK file.
I think this is a bug in VTK v9.
1 Like
jcfr
(Jean Christophe Fillion Robin (Kitware))
2
I think defines in each toolkit should be namespaced.
On the ITK side, the struct is already in the itk::
namespace.
On the VTK side, it should probably be:
#define vtkThreadInfoStruct vtkMultiThreader::ThreadInfo
hjmjohnson
(Hans Johnson)
3
JC, I think this is a hack for backwards compatibility. Slicer uses “ThreadInfoStruct” for vtk in some places.
My guess is that it will have different behavior for different versions of VTK.
Hans
dzenanz
(Dženan Zukić)
4
Then changes are needed in VTK. Who should write a patch and submit a PR?
hjmjohnson
(Hans Johnson)
5
4 Likes
jcfr
(Jean Christophe Fillion Robin (Kitware))
6
To follow up, corresponding fix what just got merged in upstream VTK.
Update of Slicer will follow up.
1 Like