Giter VIP home page Giter VIP logo

insightsoftwareconsortium / lesionsizingtoolkit Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 12.0 3.93 MB

A module for the Insight Toolkit (ITK) that provides a generic, modular, and extensible architecture for lesion sizing algorithms in medical images as well as a reference algorithm for lung solid lesion segmentation in CT images.

License: Other

TeX 13.48% C++ 76.32% CMake 9.84% Python 0.24% C 0.12%
itk insight-toolkit itk-module computed-tomography segmentation lung-cancer

lesionsizingtoolkit's Issues

Add CI

Add Continuous Integration to the module.

Compiler error concerning ITK_THREAD_RETURN_VALUE

There seems to be a compiler error involving the ITK_THREAD_RETURN_VALUE define:

Error C2065 'ITK_THREAD_RETURN_VALUE': undeclared identifier itkCannyEdgeDetectionImageFilter2  
\lesionsizingtoolkit\include\itkCannyEdgeDetectionRecursiveGaussianImageFilter.hxx 305

@dzenanz could you please cast some light on this?

Also missing to use the ProgressTransformer class instead of ProgressReporter.

Add license file.

The license file is missing from this module.

According to the LST wiki, BSD applies, but ITK uses Apache. Which one should be used?

Refactor the module

As @dzenanz pointed in #20 , the module needs to be refactored. Some classes seem to be specialized versions of classes that exist in the toolkit (Canny detection filters, morphological filters, etc.), but it should be investigated whether better inheritance can be achieved.

Some minor issues related to the refactoring, or which could be done while refactoring are:

  • Separate the class header from the implementation (e.g. see itk::DescoteauxSheetnessImageFilter).

  • Provide Set / Get methods using ITK macros for all ivars.

  • Provide some default values for ivars (e.g. see itk::DescoteauxSheetnessImageFilter).

  • Provide the implementation for the PrintSelf method in cases which is missing or incomplete.

  • Prefer initialization lists over assignment.

Trouble installing itk-lesionsizingtoolkit

I input the following code -
!pip install itk
!python -m pip install --upgrade pip
!python -m pip install itk-lesionsizingtoolkit

and I am getting the following error-
ERROR: Could not find a version that satisfies the requirement itk-lesionsizingtoolkit (from versions: none)
ERROR: No matching distribution found for itk-lesionsizingtoolkit

Is there a reason I am still not able to install?

Unable to successfully compile LesionSizingToolkit module

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.

BUG: itkGrayscaleImageSegmentationVolumeEstimatorTest1 test fails

When LesionSizingToolkit is compiled against any version of ITK and ctest is ran in the build directory, itkGrayscaleImageSegmentationVolumeEstimatorTest1 fails with the following error:

Screen Shot 2020-05-04 at 12 34 14 PM

Source of issue:
Screen Shot 2020-05-04 at 12 49 50 PM

The function FloatAlmostEqual is comparing 1e-1 (0.1%) against the percent error in the volume estimation, with epsilon = 1e-6. If we are asserting the percent error is less than .1%, would we want to compare the percent error against 0.0%, with epsilon = 1e-1? If not, would this be an error in the estimator?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.