-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to successfully compile LesionSizingToolkit module #42
Comments
The original author (@karthikkrishnan?) has abandoned this nearly 10 years ago. ITK 5 had a significant SpatialObject refactoring, and I don't think anyone updated this remote properly. Does it build if you build without VTK? |
Thanks for the quick reply! If I set LSTK_USE_VTK=OFF, the LesionSegmentation binary doesn't get built. |
I meant, are there compile errors? Yes, this module is in serious need of maintenance. Contributions are welcome. If anyone wants to do it, they should follow the migration guide: |
Sorry I wasn't clear. While there are no compile errors, it doesn't look like the LegionSegmentation binary is actually part of the build; only its dependencies get built. Thank you for your help though! I was confused since even the latest 5.2 rc 3 release notes specifically say the LesionSizingToolkit module is updated (https://github.com/InsightSoftwareConsortium/ITK/releases). |
I guess it was only updated to build in default configuration. By build, I mean have no compile errors. |
I am unable to successfully compile the LesionSizingToolkit module using ITK 5.12. I am building the module in tree by enabling the Module_LesionSizingToolkit option, setting LSTK_USE_VTK=ON. I have tried VTK 9.0.1 and VTK 7.1.1. I am using Ubuntu 20.04.2.
I receive the following errors:
`[ 80%] Building CXX object Modules/Remote/LesionSizingToolkit/Examples/CMakeFiles/LesionSegmentation.dir/LesionSegmentation.cxx.o
In file included from /home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx:40:
/home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentationCLI.h: In member function ‘double* LesionSegmentationCLI::GetROI()’:
/home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentationCLI.h:128:37: error: ‘__gnu_cxx::__alloc_traits<std::allocator<itk::SpatialObjectPoint<3> >, itk::SpatialObjectPoint<3> >::value_type’ {aka ‘class itk::SpatialObjectPoint<3>’} has no member named ‘GetPosition’
128 | this->ROI[2 * i] = seeds[0].GetPosition()[i] - this->GetValueAsFloat("MaximumRadius");
| ^~~~~~~~~~~
/home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentationCLI.h:129:41: error: ‘__gnu_cxx::__alloc_traits<std::allocator<itk::SpatialObjectPoint<3> >, itk::SpatialObjectPoint<3> >::value_type’ {aka ‘class itk::SpatialObjectPoint<3>’} has no member named ‘GetPosition’
129 | this->ROI[2 * i + 1] = seeds[0].GetPosition()[i] + this->GetValueAsFloat("MaximumRadius");
| ^~~~~~~~~~~
/home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentationCLI.h: In member function ‘LesionSegmentationCLI::LandmarkPointListType LesionSegmentationCLI::GetSeeds()’:
/home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentationCLI.h:255:16: error: ‘__gnu_cxx::__alloc_traits<std::allocator<itk::SpatialObjectPoint<3> >, itk::SpatialObjectPoint<3> >::value_type’ {aka ‘class itk::SpatialObjectPoint<3>’} has no member named ‘SetPosition’
255 | seeds[i].SetPosition(sx, sy, sz);
| ^~~~~~~~~~~
In file included from /usr/include/dirent.h:245,
from /home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentationCLI.h:17,
from /home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx:40:
/home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx: In function ‘itk::Image<short int, 3>::Pointer GetImage(std::string, bool)’:
/home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx:154:14: error: conversion from ‘long int’ to ‘itk::Image<short int, 3>::Pointer’ {aka ‘itk::SmartPointer<itk::Image<short int, 3> >’} is ambiguous
154 | return NULL;
| ^~~~
In file included from /home/artit/src/InsightToolkit-5.1.2/Modules/Core/Common/include/itkExceptionObject.h:25,
from /home/artit/src/InsightToolkit-5.1.2/Modules/Core/Common/include/itkMacro.h:1272,
from /home/artit/src/InsightToolkit-5.1.2/Modules/IO/ImageBase/include/itkImageFileReaderException.h:22,
from /home/artit/src/InsightToolkit-5.1.2/Modules/IO/ImageBase/include/itkImageFileReader.h:20,
from /home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx:1:
/home/artit/src/InsightToolkit-5.1.2/Modules/Core/Common/include/itkSmartPointer.h:99:3: note: candidate: ‘itk::SmartPointer::SmartPointer(itk::SmartPointer::ObjectType*) [with TObjectType = itk::Image<short int, 3>; itk::SmartPointer::ObjectType = itk::Image<short int, 3>]’
99 | SmartPointer(ObjectType * p) noexcept
| ^~~~~~~~~~~~
/home/artit/src/InsightToolkit-5.1.2/Modules/Core/Common/include/itkSmartPointer.h:71:13: note: candidate: ‘constexpr itk::SmartPointer::SmartPointer(std::nullptr_t) [with TObjectType = itk::Image<short int, 3>; std::nullptr_t = std::nullptr_t]’
71 | constexpr SmartPointer(std::nullptr_t p) noexcept
| ^~~~~~~~~~~~
In file included from /usr/include/dirent.h:245,
from /home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentationCLI.h:17,
from /home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx:40:
/home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx:175:12: error: conversion from ‘long int’ to ‘itk::Image<short int, 3>::Pointer’ {aka ‘itk::SmartPointer<itk::Image<short int, 3> >’} is ambiguous
175 | return NULL;
| ^~~~
In file included from /home/artit/src/InsightToolkit-5.1.2/Modules/Core/Common/include/itkExceptionObject.h:25,
from /home/artit/src/InsightToolkit-5.1.2/Modules/Core/Common/include/itkMacro.h:1272,
from /home/artit/src/InsightToolkit-5.1.2/Modules/IO/ImageBase/include/itkImageFileReaderException.h:22,
from /home/artit/src/InsightToolkit-5.1.2/Modules/IO/ImageBase/include/itkImageFileReader.h:20,
from /home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx:1:
/home/artit/src/InsightToolkit-5.1.2/Modules/Core/Common/include/itkSmartPointer.h:99:3: note: candidate: ‘itk::SmartPointer::SmartPointer(itk::SmartPointer::ObjectType*) [with TObjectType = itk::Image<short int, 3>; itk::SmartPointer::ObjectType = itk::Image<short int, 3>]’
99 | SmartPointer(ObjectType * p) noexcept
| ^~~~~~~~~~~~
/home/artit/src/InsightToolkit-5.1.2/Modules/Core/Common/include/itkSmartPointer.h:71:13: note: candidate: ‘constexpr itk::SmartPointer::SmartPointer(std::nullptr_t) [with TObjectType = itk::Image<short int, 3>; std::nullptr_t = std::nullptr_t]’
71 | constexpr SmartPointer(std::nullptr_t p) noexcept
| ^~~~~~~~~~~~
In file included from /usr/include/dirent.h:245,
from /home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentationCLI.h:17,
from /home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx:40:
/home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx:178:10: error: conversion from ‘long int’ to ‘itk::Image<short int, 3>::Pointer’ {aka ‘itk::SmartPointer<itk::Image<short int, 3> >’} is ambiguous
178 | return NULL;
| ^~~~
In file included from /home/artit/src/InsightToolkit-5.1.2/Modules/Core/Common/include/itkExceptionObject.h:25,
from /home/artit/src/InsightToolkit-5.1.2/Modules/Core/Common/include/itkMacro.h:1272,
from /home/artit/src/InsightToolkit-5.1.2/Modules/IO/ImageBase/include/itkImageFileReaderException.h:22,
from /home/artit/src/InsightToolkit-5.1.2/Modules/IO/ImageBase/include/itkImageFileReader.h:20,
from /home/artit/src/InsightToolkit-5.1.2/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx:1:
/home/artit/src/InsightToolkit-5.1.2/Modules/Core/Common/include/itkSmartPointer.h:99:3: note: candidate: ‘itk::SmartPointer::SmartPointer(itk::SmartPointer::ObjectType*) [with TObjectType = itk::Image<short int, 3>; itk::SmartPointer::ObjectType = itk::Image<short int, 3>]’
99 | SmartPointer(ObjectType * p) noexcept
| ^~~~~~~~~~~~
/home/artit/src/InsightToolkit-5.1.2/Modules/Core/Common/include/itkSmartPointer.h:71:13: note: candidate: ‘constexpr itk::SmartPointer::SmartPointer(std::nullptr_t) [with TObjectType = itk::Image<short int, 3>; std::nullptr_t = std::nullptr_t]’
71 | constexpr SmartPointer(std::nullptr_t p) noexcept
| ^~~~~~~~~~~~
make[2]: *** [Modules/Remote/LesionSizingToolkit/Examples/CMakeFiles/LesionSegmentation.dir/build.make:63: Modules/Remote/LesionSizingToolkit/Examples/CMakeFiles/LesionSegmentation.dir/LesionSegmentation.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:15615: Modules/Remote/LesionSizingToolkit/Examples/CMakeFiles/LesionSegmentation.dir/all] Error 2
make: *** [Makefile:152: all] Error 2`
EDIT: I tried ITK 4.13.3 with VTK 7.1 and it compiled successfully. So the problem seems to be with the latest versions of ITK.
The text was updated successfully, but these errors were encountered: