Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,23 @@ on:
- main

jobs:
cxx-build-workflow:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.4.4
cxx-build-workflow-itk5:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.4.6
Comment thread
hjmjohnson marked this conversation as resolved.

python-build-workflow:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v5.4.4
cxx-build-workflow-itk6:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v6.0b02
with:
# ITK main as of 2026-10-01; the action's own default predates v6.0b02. Replace with v6.0.0 once released.
itk-git-tag: '5d31af3cfdf2071d14dfc331d169111487b80597'

python-build-workflow-itk5:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v5.4.6
with:
test-notebooks: false

python-build-workflow-itk6:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v6.0b02
with:
itk-wheel-tag: 'v5.4.5'
itk-python-package-tag: 'v5.4.5'
test-notebooks: false
secrets:
pypi_password: ${{ secrets.pypi_password }}
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ project(LesionSizingToolkit)

if(NOT ITK_SOURCE_DIR)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR})
include(ITKModuleExternal)
else()
Expand Down
8 changes: 4 additions & 4 deletions include/itkRegionCompetitionImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "itkNeighborhoodAlgorithm.h"
#include "itkOffset.h"

#include <algorithm>

namespace itk
{

Expand Down Expand Up @@ -459,9 +461,7 @@ RegionCompetitionImageFilter<TInputImage, TOutputImage>::ComputeArrayOfNeighborh
// Copy the offsets from the Input image.
// We assume that they are the same for the output image.
//
const size_t sizeOfOffsetTableInBytes = (InputImageDimension + 1) * sizeof(unsigned long);

memcpy(this->m_OffsetTable, this->m_OutputImage->GetOffsetTable(), sizeOfOffsetTableInBytes);
std::copy_n(this->m_OutputImage->GetOffsetTable(), InputImageDimension + 1, this->m_OffsetTable);


//
Expand All @@ -482,7 +482,7 @@ RegionCompetitionImageFilter<TInputImage, TOutputImage>::ComputeArrayOfNeighborh
{
NeighborOffsetType offset = this->m_Neighborhood.GetOffset(i);

signed int bufferOffset = 0; // must be a signed number
OffsetValueType bufferOffset = 0;

for (unsigned int d = 0; d < InputImageDimension; d++)
{
Expand Down
8 changes: 4 additions & 4 deletions include/itkVotingBinaryHoleFillFloodingImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "itkOffset.h"
#include "itkProgressReporter.h"

#include <algorithm>

namespace itk
{

Expand Down Expand Up @@ -414,9 +416,7 @@ VotingBinaryHoleFillFloodingImageFilter<TInputImage, TOutputImage>::ComputeArray
// Copy the offsets from the Input image.
// We assume that they are the same for the output image.
//
const size_t sizeOfOffsetTableInBytes = (InputImageDimension + 1) * sizeof(unsigned long);

memcpy(this->m_OffsetTable, this->m_OutputImage->GetOffsetTable(), sizeOfOffsetTableInBytes);
std::copy_n(this->m_OutputImage->GetOffsetTable(), InputImageDimension + 1, this->m_OffsetTable);


//
Expand All @@ -437,7 +437,7 @@ VotingBinaryHoleFillFloodingImageFilter<TInputImage, TOutputImage>::ComputeArray
{
NeighborOffsetType offset = this->m_Neighborhood.GetOffset(i);

signed int bufferOffset = 0; // must be a signed number
OffsetValueType bufferOffset = 0;

for (unsigned int d = 0; d < InputImageDimension; d++)
{
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["scikit-build-core"]
build-backend = "scikit_build_core.build"

[project]
name = "lesionsizingtoolkit"
name = "itk-lesionsizingtoolkit"
version = "1.0.1"
description = "A generic and extensible ITK module for lesion segmentation"
readme = "README.rst"
Expand Down
28 changes: 18 additions & 10 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
include_directories("${LesionSizingToolkit_SOURCE_DIR}/src") # to include itkIncludeRequiredIOFactories.h
include_directories("${LesionSizingToolkit_SOURCE_DIR}/include")
# ITK 6 exports one interface library per module; ITK 5.4 provides only the list variable.
if(TARGET ITK::LesionSizingToolkitModule)
set(_lstk_libraries ITK::LesionSizingToolkitModule)
elseif(TARGET LesionSizingToolkitModule)
set(_lstk_libraries LesionSizingToolkitModule)
else()
set(_lstk_libraries ${LesionSizingToolkit_LIBRARIES})
endif()
add_executable(itkCannyEdgeDetectionImageFilter1 itkCannyEdgeDetectionImageFilter1.cxx )
target_link_libraries(itkCannyEdgeDetectionImageFilter1 ITK::LesionSizingToolkitModule ${ITK_LIBRARIES})
target_link_libraries(itkCannyEdgeDetectionImageFilter1 ${_lstk_libraries} ${ITK_LIBRARIES})

add_executable(itkCannyEdgeDetectionImageFilter2 itkCannyEdgeDetectionImageFilter2.cxx )
target_link_libraries(itkCannyEdgeDetectionImageFilter2 ITK::LesionSizingToolkitModule ${ITK_LIBRARIES})
target_link_libraries(itkCannyEdgeDetectionImageFilter2 ${_lstk_libraries} ${ITK_LIBRARIES})

add_executable(itkDicomSeriesReadImageWrite itkDicomSeriesReadImageWrite.cxx)
target_link_libraries(itkDicomSeriesReadImageWrite ITK::LesionSizingToolkitModule ${ITK_LIBRARIES})
target_link_libraries(itkDicomSeriesReadImageWrite ${_lstk_libraries} ${ITK_LIBRARIES})

add_executable(itkGradientMagnitudeImageFilter itkGradientMagnitudeImageFilter.cxx)
target_link_libraries(itkGradientMagnitudeImageFilter ITK::LesionSizingToolkitModule ${ITK_LIBRARIES})
target_link_libraries(itkGradientMagnitudeImageFilter ${_lstk_libraries} ${ITK_LIBRARIES})

add_executable(itkGradientMagnitudeRecursiveGaussianImageFilter itkGradientMagnitudeRecursiveGaussianImageFilter.cxx)
target_link_libraries(itkGradientMagnitudeRecursiveGaussianImageFilter ITK::LesionSizingToolkitModule ${ITK_LIBRARIES})
target_link_libraries(itkGradientMagnitudeRecursiveGaussianImageFilter ${_lstk_libraries} ${ITK_LIBRARIES})

add_executable(itkImageReadRegionOfInterestAroundSeedWrite itkImageReadRegionOfInterestAroundSeedWrite.cxx)
target_link_libraries(itkImageReadRegionOfInterestAroundSeedWrite ITK::LesionSizingToolkitModule ${ITK_LIBRARIES})
target_link_libraries(itkImageReadRegionOfInterestAroundSeedWrite ${_lstk_libraries} ${ITK_LIBRARIES})

add_executable(itkImageReadRegionOfInterestWrite itkImageReadRegionOfInterestWrite.cxx)
target_link_libraries(itkImageReadRegionOfInterestWrite ITK::LesionSizingToolkitModule ${ITK_LIBRARIES})
target_link_libraries(itkImageReadRegionOfInterestWrite ${_lstk_libraries} ${ITK_LIBRARIES})

add_executable(itkImageReadWrite itkImageReadWrite.cxx)
target_link_libraries(itkImageReadWrite ITK::LesionSizingToolkitModule ${ITK_LIBRARIES})
target_link_libraries(itkImageReadWrite ${_lstk_libraries} ${ITK_LIBRARIES})

add_executable(itkLaplacianRecursiveGaussianImageFilter itkLaplacianRecursiveGaussianImageFilter.cxx)
target_link_libraries(itkLaplacianRecursiveGaussianImageFilter ITK::LesionSizingToolkitModule ${ITK_LIBRARIES})
target_link_libraries(itkLaplacianRecursiveGaussianImageFilter ${_lstk_libraries} ${ITK_LIBRARIES})

add_executable(itkResampleVolumeToBeIsotropic itkResampleVolumeToBeIsotropic.cxx)
target_link_libraries(itkResampleVolumeToBeIsotropic ITK::LesionSizingToolkitModule ${ITK_LIBRARIES})
target_link_libraries(itkResampleVolumeToBeIsotropic ${_lstk_libraries} ${ITK_LIBRARIES})
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ itkDescoteauxSheetnessFeatureGeneratorMultiScaleTest1(int argc, char * argv[])

AggregatorType::Pointer featureAggregator = AggregatorType::New();

ITK_EXERCISE_BASIC_OBJECT_METHODS(featureAggregator, MaximumFeatureAggregator, UnaryFunctorImageFilter);
ITK_EXERCISE_BASIC_OBJECT_METHODS(featureAggregator, MaximumFeatureAggregator, FeatureAggregator);

using DescoteauxSheetnessFeatureGeneratorType = itk::DescoteauxSheetnessFeatureGenerator<Dimension>;
using SpatialObjectType = DescoteauxSheetnessFeatureGeneratorType::SpatialObjectType;
Expand Down
7 changes: 4 additions & 3 deletions test/itkFeatureAggregatorTest1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,19 @@ itkFeatureAggregatorTest1(int argc, char * argv[])
using VesselnessGeneratorType = itk::SatoVesselnessSigmoidFeatureGenerator<Dimension>;
VesselnessGeneratorType::Pointer vesselnessGenerator = VesselnessGeneratorType::New();

ITK_EXERCISE_BASIC_OBJECT_METHODS(vesselnessGenerator, SatoVesselnessSigmoidFeatureGenerator, FeatureAggregator);
ITK_EXERCISE_BASIC_OBJECT_METHODS(
vesselnessGenerator, SatoVesselnessSigmoidFeatureGenerator, SatoVesselnessFeatureGenerator);

using LungWallGeneratorType = itk::LungWallFeatureGenerator<Dimension>;
LungWallGeneratorType::Pointer lungWallGenerator = LungWallGeneratorType::New();

ITK_EXERCISE_BASIC_OBJECT_METHODS(lungWallGenerator, LungWallFeatureGenerator, FeatureAggregator);
ITK_EXERCISE_BASIC_OBJECT_METHODS(lungWallGenerator, LungWallFeatureGenerator, FeatureGenerator);


using SigmoidFeatureGeneratorType = itk::SigmoidFeatureGenerator<Dimension>;
SigmoidFeatureGeneratorType::Pointer sigmoidGenerator = SigmoidFeatureGeneratorType::New();

ITK_EXERCISE_BASIC_OBJECT_METHODS(sigmoidGenerator, SigmoidFeatureGenerator, FeatureAggregator);
ITK_EXERCISE_BASIC_OBJECT_METHODS(sigmoidGenerator, SigmoidFeatureGenerator, FeatureGenerator);

featureAggregator->AddFeatureGenerator(lungWallGenerator);
featureAggregator->AddFeatureGenerator(vesselnessGenerator);
Expand Down
2 changes: 1 addition & 1 deletion test/itkLesionSegmentationMethodTest10.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ itkLesionSegmentationMethodTest10(int argc, char * argv[])

MethodType::Pointer lesionSegmentationMethod = MethodType::New();

ITK_EXERCISE_BASIC_OBJECT_METHODS(lesionSegmentationMethod, LesionSegmentationMethod, LightObject);
ITK_EXERCISE_BASIC_OBJECT_METHODS(lesionSegmentationMethod, LesionSegmentationMethod, ProcessObject);


using ImageMaskSpatialObjectType = itk::ImageMaskSpatialObject<Dimension>;
Expand Down
12 changes: 8 additions & 4 deletions test/itkSatoVesselnessSigmoidFeatureGeneratorMultiScaleTest1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,23 @@ itkSatoVesselnessSigmoidFeatureGeneratorMultiScaleTest1(int argc, char * argv[])

FeatureGeneratorType::Pointer featureGenerator1 = FeatureGeneratorType::New();

ITK_EXERCISE_BASIC_OBJECT_METHODS(featureGenerator1, SatoVesselnessSigmoidFeatureGenerator, FeatureGenerator);
ITK_EXERCISE_BASIC_OBJECT_METHODS(
featureGenerator1, SatoVesselnessSigmoidFeatureGenerator, SatoVesselnessFeatureGenerator);

FeatureGeneratorType::Pointer featureGenerator2 = FeatureGeneratorType::New();

ITK_EXERCISE_BASIC_OBJECT_METHODS(featureGenerator2, SatoVesselnessSigmoidFeatureGenerator, FeatureGenerator);
ITK_EXERCISE_BASIC_OBJECT_METHODS(
featureGenerator2, SatoVesselnessSigmoidFeatureGenerator, SatoVesselnessFeatureGenerator);

FeatureGeneratorType::Pointer featureGenerator3 = FeatureGeneratorType::New();

ITK_EXERCISE_BASIC_OBJECT_METHODS(featureGenerator3, SatoVesselnessSigmoidFeatureGenerator, FeatureGenerator);
ITK_EXERCISE_BASIC_OBJECT_METHODS(
featureGenerator3, SatoVesselnessSigmoidFeatureGenerator, SatoVesselnessFeatureGenerator);

FeatureGeneratorType::Pointer featureGenerator4 = FeatureGeneratorType::New();

ITK_EXERCISE_BASIC_OBJECT_METHODS(featureGenerator4, SatoVesselnessSigmoidFeatureGenerator, FeatureGenerator);
ITK_EXERCISE_BASIC_OBJECT_METHODS(
featureGenerator4, SatoVesselnessSigmoidFeatureGenerator, SatoVesselnessFeatureGenerator);


double smallestSigma = 1.0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
itk_wrap_class("itk::CannyEdgeDetectionRecursiveGaussianImageFilter" POINTER)
itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2+)
itk_wrap_image_filter("${WRAP_ITK_REAL}" 2+)
itk_end_wrap_class()
2 changes: 1 addition & 1 deletion wrapping/itkLesionSegmentationImageFilter8.wrap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
itk_wrap_class("itk::LesionSegmentationImageFilter8" POINTER)
itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_REAL}" 3)
itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "F" 3)
itk_end_wrap_class()
Loading