I am having trouble trying to build the Lesion Sizing Toolkit module. I first tried the latest released version of ITK, 5.1.2, enabling the LesionSizingToolkit and ITKVTKglue modules. While the dependencies build correctly (that is, things like itkCannEdgeDetectionImageFilter1), a LesionSegmentation binary doesn’t get generated.
I next tried building the git master version of ITK with the LesionSizingToolkit module, with LSTK_USE_VTK on, and I get errors such as
[100%] Building CXX object Modules/Remote/LesionSizingToolkit/Examples/CMakeFiles/LesionSegmentation.dir/LesionSegmentation.cxx.o
In file included from /home/artit/src/ITK/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx:40:
/home/artit/src/ITK/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentationCLI.h: In member function ‘double* LesionSegmentationCLI::GetROI()’:
/home/artit/src/ITK/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/ITK/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/ITK/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentationCLI.h: In member function ‘LesionSegmentationCLI::LandmarkPointListType LesionSegmentationCLI::GetSeeds()’:
/home/artit/src/ITK/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/ITK/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentationCLI.h:17,
from /home/artit/src/ITK/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx:40:
/home/artit/src/ITK/Modules/Remote/LesionSizingToolkit/Examples/LesionSegmentation.cxx: In function ‘itk::Image<short int, 3>::Pointer GetImage(std::string, bool)’:
/home/artit/src/ITK/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;
I next tried building the LesionSizingToolkit separately, from the git master, but I get several undefined references:
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x0): undefined reference to `itk::BMPImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x8): undefined reference to `itk::BioRadImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x10): undefined reference to `itk::Bruker2dseqImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x20): undefined reference to `itk::GE4ImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x28): undefined reference to `itk::GE5ImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x30): undefined reference to `itk::GiplImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x38): undefined reference to `itk::HDF5ImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x40): undefined reference to `itk::JPEGImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x48): undefined reference to `itk::JPEG2000ImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x50): undefined reference to `itk::LSMImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x58): undefined reference to `itk::MINCImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x60): undefined reference to `itk::MRCImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x70): undefined reference to `itk::NiftiImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x78): undefined reference to `itk::NrrdImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x88): undefined reference to `itk::StimulateImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x90): undefined reference to `itk::TIFFImageIOFactoryRegister__Private()'
/usr/bin/ld: CMakeFiles/itkCannyEdgeDetectionImageFilter1.dir/itkCannyEdgeDetectionImageFilter1.cxx.o:(.data.rel+0x98): undefined reference to `itk::VTKImageIOFactoryRegister__Private()'
collect2: error: ld returned 1 exit status
I also tried using the git master branch of ITK instead of 5.1.2 but get the same undefined references.
Any thoughts? The README for the LSTK on github makes references to a python pip module that no longer exists, which is why I’m going through this process.
EDIT: I tried ITK 4.13.3 with VTK 7.0 and it built correctly.