From 13d9e72d711109a9e0eb114bb410eb1b6cab1bb9 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Thu, 8 Oct 2026 13:48:29 -0500 Subject: [PATCH 1/9] COMP: Find VTK 9 for the examples and visualization tools With LSTK_USE_VTK=ON the examples failed at the first VTK header. The VTK 8 era vtk_module_config() macro built target names from an undefined _target_prefix and nothing called find_package(VTK), so the targets received neither the VTK:: libraries nor their include directories. Use find_package(VTK 9 COMPONENTS ...) for the modules the sources include, link the module library the same way src/ does, and add the module include directory. --- CMakeLists.txt | 87 +++++++++++++++++--------------------------------- 1 file changed, 30 insertions(+), 57 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a27deba3..a4a62d69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,64 +11,37 @@ endif() option(LSTK_USE_VTK "Build visualization helper tools." OFF) if(LSTK_USE_VTK) - if(NOT COMMAND vtk_module_config) - macro(vtk_module_config ns) - foreach(arg ${ARGN}) - if(${arg} MATCHES "^[Vv][Tt][Kk]") - string(REGEX REPLACE "^[Vv][Tt][Kk]" "" _arg ${arg}) - else() - set(_arg ${arg}) - endif() - set(${ns}_LIBRARIES ${${ns}_LIBRARIES} VTK::${_arg}) - endforeach() - endmacro() - - if(NOT VTK_RENDERING_BACKEND) - set(VTK_RENDERING_BACKEND OpenGL2) - endif() - endif() - - if(NOT VTK_RENDERING_BACKEND) - if(NOT COMMAND vtk_module_config) - set(VTK_RENDERING_BACKEND OpenGL2) - else() - set(VTK_RENDERING_BACKEND OpenGL) - endif() - endif() - - set(_target_freetypeopengl) - if(TARGET ${_target_prefix}RenderingFreeType${VTK_RENDERING_BACKEND}) - set(_target_freetypeopengl ${_target_prefix}RenderingFreeType${VTK_RENDERING_BACKEND}) + find_package( + VTK 9.0 REQUIRED + COMPONENTS + CommonCore + FiltersCore + FiltersGeneral + FiltersSources + ImagingCore + InteractionImage + InteractionStyle + InteractionWidgets + IOGeometry + IOImage + IOLegacy + RenderingCore + RenderingFreeType + RenderingOpenGL2 + RenderingVolume + RenderingVolumeOpenGL2 + vtksys + ) + # 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() - - set(_required_vtk_libraries - ${_target_prefix}RenderingVolume - #${_target_prefix}Rendering${VTK_RENDERING_BACKEND} - ${_target_prefix}IOGeometry - ${_target_prefix}IOLegacy - ${_target_prefix}IOImage - ${_target_prefix}InteractionWidgets - ${_target_prefix}InteractionImage - ) - - vtk_module_config(ITK_VTK_LSTK - ${_required_vtk_libraries} - ) - - set(ITK_VTK_LSTK_LIBRARIES ${LesionSizingToolkit_LIBRARIES} ${_required_vtk_libraries}) - - # The VTK DICOMParser and vtkmetaio includes conflict with the ITK - # versions. Here we remove them from the include directories. - # - string(REGEX REPLACE "[^;]*MetaIO;" - "" ITK_VTK_LSTK_INCLUDE_DIRS "${ITK_VTK_LSTK_INCLUDE_DIRS}") - string(REGEX REPLACE "[^;]*vtkmetaio;" - "" ITK_VTK_LSTK_INCLUDE_DIRS "${ITK_VTK_LSTK_INCLUDE_DIRS}") - string(REGEX REPLACE "[^;]*DICOMParser;" - "" ITK_VTK_LSTK_INCLUDE_DIRS "${ITK_VTK_LSTK_INCLUDE_DIRS}") - - # Add preprocessor definitions needed to use VTK. - set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${ITK_VTK_LSTK_VTK_DEFINITIONS}) + set(ITK_VTK_LSTK_LIBRARIES ${_lstk_libraries} ${ITK_LIBRARIES} ${VTK_LIBRARIES}) + include_directories("${LesionSizingToolkit_SOURCE_DIR}/include") add_subdirectory(Examples) add_subdirectory(Utilities) From b4f7ef0e4a3115868d7fe05234bf55fc03d9ba9c Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Thu, 8 Oct 2026 13:48:37 -0500 Subject: [PATCH 2/9] COMP: Auto-initialize the VTK 9 modules in the VTK executables VTK 9 registers the rendering and IO object factories of the modules an executable links through vtk_module_autoinit(); without it, creating a render window or an image writer finds no implementation at run time. --- Examples/CMakeLists.txt | 1 + Utilities/Visualization/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index 52007a9f..aa80847e 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -6,4 +6,5 @@ add_executable( LesionSegmentation LesionSegmentation.cxx itkLesionSegmentationCommandLineProgressReporter.cxx ) target_link_libraries( LesionSegmentation ${ITK_VTK_LSTK_LIBRARIES} ) +vtk_module_autoinit( TARGETS LesionSegmentation MODULES ${VTK_LIBRARIES} ) diff --git a/Utilities/Visualization/CMakeLists.txt b/Utilities/Visualization/CMakeLists.txt index 6aa04644..3f604e6a 100644 --- a/Utilities/Visualization/CMakeLists.txt +++ b/Utilities/Visualization/CMakeLists.txt @@ -4,16 +4,20 @@ include_directories(${Visualization_SOURCE_DIR}) add_executable(ViewImageAndSegmentationSurface ViewImageAndSegmentationSurface.cxx ) target_link_libraries(ViewImageAndSegmentationSurface ${ITK_VTK_LSTK_LIBRARIES}) +vtk_module_autoinit(TARGETS ViewImageAndSegmentationSurface MODULES ${VTK_LIBRARIES}) add_executable(ViewImageSlicesAndSegmentationContours ViewImageSlicesAndSegmentationContours.cxx vtkContourVisualizationModule.cxx ) target_link_libraries(ViewImageSlicesAndSegmentationContours ${ITK_VTK_LSTK_LIBRARIES}) +vtk_module_autoinit(TARGETS ViewImageSlicesAndSegmentationContours MODULES ${VTK_LIBRARIES}) add_executable(LesionSurfaceExtraction LesionSurfaceExtraction.cxx ) target_link_libraries(LesionSurfaceExtraction ${ITK_VTK_LSTK_LIBRARIES}) +vtk_module_autoinit(TARGETS LesionSurfaceExtraction MODULES ${VTK_LIBRARIES}) add_executable(IsoSurfaceVolumeEstimation IsoSurfaceVolumeEstimation.cxx ) target_link_libraries(IsoSurfaceVolumeEstimation ${ITK_VTK_LSTK_LIBRARIES}) +vtk_module_autoinit(TARGETS IsoSurfaceVolumeEstimation MODULES ${VTK_LIBRARIES}) From 6bf80c1ab23573084ae0baa9a6d95a9d3deb401e Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Thu, 8 Oct 2026 13:48:47 -0500 Subject: [PATCH 3/9] COMP: Use the ITK 5 SpatialObject API in the VTK examples ITK 5 renamed SpatialObjectPoint::GetPosition()/SetPosition() to GetPositionInObjectSpace()/SetPositionInObjectSpace(), and GroupSpatialObject::GetNumberOfObjects()/GetObjects() to GetNumberOfChildren()/GetChildren() with ChildrenListType. --- Examples/LesionSegmentationCLI.h | 6 +++--- .../ViewImageSlicesAndSegmentationContours.cxx | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Examples/LesionSegmentationCLI.h b/Examples/LesionSegmentationCLI.h index 4d5e9984..2c17922d 100644 --- a/Examples/LesionSegmentationCLI.h +++ b/Examples/LesionSegmentationCLI.h @@ -125,8 +125,8 @@ class LesionSegmentationCLI : public MetaCommand seeds[0]; for (int i = 0; i < 3; i++) { - this->ROI[2 * i] = seeds[0].GetPosition()[i] - this->GetValueAsFloat("MaximumRadius"); - this->ROI[2 * i + 1] = seeds[0].GetPosition()[i] + this->GetValueAsFloat("MaximumRadius"); + this->ROI[2 * i] = seeds[0].GetPositionInObjectSpace()[i] - this->GetValueAsFloat("MaximumRadius"); + this->ROI[2 * i + 1] = seeds[0].GetPositionInObjectSpace()[i] + this->GetValueAsFloat("MaximumRadius"); } } return this->ROI; @@ -252,7 +252,7 @@ class LesionSegmentationCLI : public MetaCommand exit(-1); } - seeds[i].SetPosition(sx, sy, sz); + seeds[i].SetPositionInObjectSpace(sx, sy, sz); } return seeds; } diff --git a/Utilities/Visualization/ViewImageSlicesAndSegmentationContours.cxx b/Utilities/Visualization/ViewImageSlicesAndSegmentationContours.cxx index b764e30a..70f0a600 100644 --- a/Utilities/Visualization/ViewImageSlicesAndSegmentationContours.cxx +++ b/Utilities/Visualization/ViewImageSlicesAndSegmentationContours.cxx @@ -88,11 +88,11 @@ main(int argc, char * argv[]) return EXIT_FAILURE; } - std::cout << "Number of objects in the group:" << group->GetNumberOfObjects(1) << std::endl; + std::cout << "Number of objects in the group:" << group->GetNumberOfChildren(1) << std::endl; - using ObjectListType = SpatialObjectReaderType::GroupType::ObjectListType; + using ObjectListType = SpatialObjectReaderType::GroupType::ChildrenListType; - ObjectListType * groupChildren = group->GetObjects(999999); + ObjectListType * groupChildren = group->GetChildren(999999); ObjectListType::const_iterator spatialObjectItr = groupChildren->begin(); @@ -119,7 +119,7 @@ main(int argc, char * argv[]) const LandmarkPointListType & points = landmarkSpatialObject->GetPoints(); // Grab the first point in the list of seed points - PointType point = points[0].GetPosition(); + PointType point = points[0].GetPositionInObjectSpace(); std::cout << "Seed point = " << point << std::endl; From 2211a9702ae1d658c658a5288458e1f2c9cfb898 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Thu, 8 Oct 2026 13:48:47 -0500 Subject: [PATCH 4/9] COMP: Fix C++ errors that current compilers reject in the examples LesionSegmentation.cxx returned NULL where an Image::Pointer is expected, which does not convert once NULL is an integer constant, and LesionSurfaceExtraction.cxx used std::cerr without including . --- Examples/LesionSegmentation.cxx | 6 +++--- Utilities/Visualization/LesionSurfaceExtraction.cxx | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Examples/LesionSegmentation.cxx b/Examples/LesionSegmentation.cxx index 0cf9796f..8923925c 100644 --- a/Examples/LesionSegmentation.cxx +++ b/Examples/LesionSegmentation.cxx @@ -151,7 +151,7 @@ GetImage(std::string dir, bool ignoreDirection) catch (itk::ExceptionObject & ex) { std::cout << ex << std::endl; - return NULL; + return nullptr; } @@ -172,10 +172,10 @@ GetImage(std::string dir, bool ignoreDirection) catch (itk::ExceptionObject & ex) { std::cout << ex << std::endl; - return NULL; + return nullptr; } - return NULL; + return nullptr; } // -------------------------------------------------------------------------- diff --git a/Utilities/Visualization/LesionSurfaceExtraction.cxx b/Utilities/Visualization/LesionSurfaceExtraction.cxx index 13abbc06..07d402b5 100644 --- a/Utilities/Visualization/LesionSurfaceExtraction.cxx +++ b/Utilities/Visualization/LesionSurfaceExtraction.cxx @@ -24,6 +24,8 @@ #include "vtksys/SystemTools.hxx" #include "vtkVersion.h" +#include + #define VTK_CREATE(type, name) vtkSmartPointer name = vtkSmartPointer::New() From 143acd077b13d75910fad78ff409f4c39b552b83 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Thu, 8 Oct 2026 13:48:47 -0500 Subject: [PATCH 5/9] BUG: Fix the misspelled include guard define in the progress reporter The header tested itkLesionSegmentationCommandLineProgressReporter_h but defined itkLesionSegmentatioCommandLineProgressReporter_h, so the guard never took effect and a second inclusion redefined the class. --- Examples/itkLesionSegmentationCommandLineProgressReporter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/itkLesionSegmentationCommandLineProgressReporter.h b/Examples/itkLesionSegmentationCommandLineProgressReporter.h index 9d8465a9..eaf0454f 100644 --- a/Examples/itkLesionSegmentationCommandLineProgressReporter.h +++ b/Examples/itkLesionSegmentationCommandLineProgressReporter.h @@ -17,7 +17,7 @@ *=========================================================================*/ #ifndef itkLesionSegmentationCommandLineProgressReporter_h -# define itkLesionSegmentatioCommandLineProgressReporter_h +# define itkLesionSegmentationCommandLineProgressReporter_h # include "itkLesionSegmentationImageFilter8.h" # include "itkCommand.h" From 97a2d113234ec272aff3e47851bef06c6bc6fa1a Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Thu, 8 Oct 2026 13:48:56 -0500 Subject: [PATCH 6/9] COMP: Mark the progress reporter Execute methods as override Both Execute() overloads override itk::Command and trigger -Winconsistent-missing-override on every file that includes the header. --- .../itkLesionSegmentationCommandLineProgressReporter.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Examples/itkLesionSegmentationCommandLineProgressReporter.h b/Examples/itkLesionSegmentationCommandLineProgressReporter.h index eaf0454f..822d646c 100644 --- a/Examples/itkLesionSegmentationCommandLineProgressReporter.h +++ b/Examples/itkLesionSegmentationCommandLineProgressReporter.h @@ -45,10 +45,10 @@ class ITKCommon_EXPORT LesionSegmentationCommandLineProgressReporter : public Co // the instance invoking the event; eid is the event id (see // vtkCommand.h); and calldata is information sent when the callback // was invoked (e.g., progress value in the vtkCommand::ProgressEvent). - virtual void - Execute(const Object * caller, const EventObject & event); - virtual void - Execute(Object * caller, const EventObject & event); + void + Execute(const Object * caller, const EventObject & event) override; + void + Execute(Object * caller, const EventObject & event) override; void SetReportProgress(int i) From 097cf7f8e5588a61464cec949ed6462a7c7abcb0 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Thu, 8 Oct 2026 13:48:56 -0500 Subject: [PATCH 7/9] STYLE: Apply clang-format to the progress reporter header Drop the indentation after # in the preprocessor directives, which the repository .clang-format does not use. --- .../itkLesionSegmentationCommandLineProgressReporter.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Examples/itkLesionSegmentationCommandLineProgressReporter.h b/Examples/itkLesionSegmentationCommandLineProgressReporter.h index 822d646c..86956ca0 100644 --- a/Examples/itkLesionSegmentationCommandLineProgressReporter.h +++ b/Examples/itkLesionSegmentationCommandLineProgressReporter.h @@ -17,11 +17,11 @@ *=========================================================================*/ #ifndef itkLesionSegmentationCommandLineProgressReporter_h -# define itkLesionSegmentationCommandLineProgressReporter_h +#define itkLesionSegmentationCommandLineProgressReporter_h -# include "itkLesionSegmentationImageFilter8.h" -# include "itkCommand.h" -# include +#include "itkLesionSegmentationImageFilter8.h" +#include "itkCommand.h" +#include namespace itk { From 0304bc86c1ab667ac92ce90920768f6f45dfcdae Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Tue, 13 Oct 2026 06:51:34 -0500 Subject: [PATCH 8/9] COMP: Use ITKRemoteModuleBuildTestPackageAction v5.4.7 for the ITK 5.4 jobs v5.4.7 defaults to ITK 5.4.7 and updates the GitHub Actions that emit Node.js 20 deprecation warnings. --- .github/workflows/build-test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml index 7cef0fd3..25266307 100644 --- a/.github/workflows/build-test-package.yml +++ b/.github/workflows/build-test-package.yml @@ -12,7 +12,7 @@ on: jobs: cxx-build-workflow-itk5: - uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.4.6 + uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.4.7 cxx-build-workflow-itk6: uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v6.0b02 @@ -21,7 +21,7 @@ jobs: itk-git-tag: '5d31af3cfdf2071d14dfc331d169111487b80597' python-build-workflow-itk5: - uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v5.4.6 + uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v5.4.7 with: test-notebooks: false From 1136140c567d9dcc270db06cdb80c1596e3e1ed4 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Tue, 13 Oct 2026 07:38:31 -0500 Subject: [PATCH 9/9] BUG: Do not keep a ProgressAccumulator as a member of its mini-pipeline filter ProgressAccumulator::SetMiniPipelineFilter() holds a SmartPointer, so a member accumulator pointed at its owner formed a reference cycle and LesionSegmentationMethod and FeatureAggregator were never destroyed. The leaked PoolMultiThreader kept the global ThreadPool alive past the teardown of its globals, so a pool thread that started late read a null ThreadPoolGlobals at exit and crashed intermittently. Create the accumulator in the call that uses it, as the other filters do. --- include/itkFeatureAggregator.h | 2 -- include/itkFeatureAggregator.hxx | 8 ++++---- include/itkLesionSegmentationMethod.h | 6 ++---- include/itkLesionSegmentationMethod.hxx | 18 +++++++++--------- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/include/itkFeatureAggregator.h b/include/itkFeatureAggregator.h index edaef58a..29c1e026 100644 --- a/include/itkFeatureAggregator.h +++ b/include/itkFeatureAggregator.h @@ -102,8 +102,6 @@ class ITK_TEMPLATE_EXPORT FeatureAggregator : public FeatureGenerator; diff --git a/include/itkFeatureAggregator.hxx b/include/itkFeatureAggregator.hxx index 0437f848..e8967ca5 100644 --- a/include/itkFeatureAggregator.hxx +++ b/include/itkFeatureAggregator.hxx @@ -36,9 +36,6 @@ FeatureAggregator::FeatureAggregator() typename OutputImageSpatialObjectType::Pointer outputObject = OutputImageSpatialObjectType::New(); this->ProcessObject::SetNthOutput(0, outputObject.GetPointer()); - - this->m_ProgressAccumulator = ProgressAccumulator::New(); - this->m_ProgressAccumulator->SetMiniPipelineFilter(this); } @@ -143,6 +140,9 @@ template void FeatureAggregator::UpdateAllFeatureGenerators() { + ProgressAccumulator::Pointer progress = ProgressAccumulator::New(); + progress->SetMiniPipelineFilter(this); + auto gitr = this->m_FeatureGenerators.begin(); auto gend = this->m_FeatureGenerators.end(); @@ -150,7 +150,7 @@ FeatureAggregator::UpdateAllFeatureGenerators() { // Assuming that most of the time is spent in generating the features and // hardly negligible time is spent in consolidating the features - this->m_ProgressAccumulator->RegisterInternalFilter(*gitr, 1.0 / this->m_FeatureGenerators.size()); + progress->RegisterInternalFilter(*gitr, 1.0 / this->m_FeatureGenerators.size()); (*gitr)->Update(); ++gitr; diff --git a/include/itkLesionSegmentationMethod.h b/include/itkLesionSegmentationMethod.h index d6dfa7b5..5382d06b 100644 --- a/include/itkLesionSegmentationMethod.h +++ b/include/itkLesionSegmentationMethod.h @@ -125,12 +125,10 @@ class ITK_TEMPLATE_EXPORT LesionSegmentationMethod : public ProcessObject SegmentationModulePointer m_SegmentationModule; - ProgressAccumulator::Pointer m_ProgressAccumulator; - /** This method calls the Update() method of each one of the feature generators */ void - UpdateAllFeatureGenerators(); + UpdateAllFeatureGenerators(ProgressAccumulator * progress); /** This method compares the number of available features against the number * of expected features, and it will throw an exception if they do not match. @@ -143,7 +141,7 @@ class ITK_TEMPLATE_EXPORT LesionSegmentationMethod : public ProcessObject ConnectFeaturesToSegmentationModule(); void - ExecuteSegmentationModule(); + ExecuteSegmentationModule(ProgressAccumulator * progress); }; } // end namespace itk diff --git a/include/itkLesionSegmentationMethod.hxx b/include/itkLesionSegmentationMethod.hxx index 76c85611..f31f7500 100644 --- a/include/itkLesionSegmentationMethod.hxx +++ b/include/itkLesionSegmentationMethod.hxx @@ -42,9 +42,6 @@ LesionSegmentationMethod::LesionSegmentationMethod() typename OutputSpatialObjectType::Pointer outputObject = OutputSpatialObjectType::New(); this->ProcessObject::SetNthOutput(0, outputObject.GetPointer()); - - this->m_ProgressAccumulator = ProgressAccumulator::New(); - this->m_ProgressAccumulator->SetMiniPipelineFilter(this); } @@ -105,13 +102,16 @@ LesionSegmentationMethod::GenerateData() itkExceptionMacro("Segmentation Module has not been connected"); } - this->UpdateAllFeatureGenerators(); + ProgressAccumulator::Pointer progress = ProgressAccumulator::New(); + progress->SetMiniPipelineFilter(this); + + this->UpdateAllFeatureGenerators(progress); this->VerifyNumberOfAvailableFeaturesMatchedExpectations(); this->ConnectFeaturesToSegmentationModule(); - this->ExecuteSegmentationModule(); + this->ExecuteSegmentationModule(progress); } @@ -120,14 +120,14 @@ LesionSegmentationMethod::GenerateData() */ template void -LesionSegmentationMethod::UpdateAllFeatureGenerators() +LesionSegmentationMethod::UpdateAllFeatureGenerators(ProgressAccumulator * progress) { auto gitr = this->m_FeatureGenerators.begin(); auto gend = this->m_FeatureGenerators.end(); while (gitr != gend) { - this->m_ProgressAccumulator->RegisterInternalFilter(*gitr, 0.5 / this->m_FeatureGenerators.size()); + progress->RegisterInternalFilter(*gitr, 0.5 / this->m_FeatureGenerators.size()); (*gitr)->Update(); ++gitr; } @@ -164,9 +164,9 @@ LesionSegmentationMethod::ConnectFeaturesToSegmentationModule() template void -LesionSegmentationMethod::ExecuteSegmentationModule() +LesionSegmentationMethod::ExecuteSegmentationModule(ProgressAccumulator * progress) { - this->m_ProgressAccumulator->RegisterInternalFilter(this->m_SegmentationModule, 0.5); + progress->RegisterInternalFilter(this->m_SegmentationModule, 0.5); this->m_SegmentationModule->SetInput(this->m_InitialSegmentation); this->m_SegmentationModule->Update(); }