ENH: Restore the static LevelSetsv4 examples without VTK rendering - #485
Merged
hjmjohnson merged 2 commits intoSep 15, 2026
Conversation
These examples demonstrate the LevelSetsv4 framework, not the VTK bridge. They have been excluded from the build since ITK 5 because their VTK visualization classes left ITK, so they are unbuilt on both sides of this move.
The examples rendered through VTK visualization classes that ITK no longer contains. Each now writes what it demonstrates: the dense level-set values, the zero set via ZeroCrossingImageFilter, or the sparse layers sampled on the image grid. A run test covers each one. The Otsu mask pipeline was never updated before the level set was initialized, so the level set started from an empty mask; update it first.
Member
|
Some of Kitware's services are currently under DDoS attack. cmake.org timeout is real, but temporary. |
hjmjohnson
marked this pull request as ready for review
September 15, 2026 16:34
hjmjohnson
merged commit Sep 15, 2026
f6571da
into
InsightSoftwareConsortium:main
12 of 15 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restore five LevelSetsv4 examples excluded since ITK 5 by writing their output
instead of rendering through VTK classes ITK no longer has. They move to
Segmentation/LevelSetsv4.Why these examples, and why they move
These are the only examples of the LevelSetsv4 framework —
LevelSetDenseImage,the Whitaker, Shi, and Malcolm sparse level sets, and
BinaryImageToLevelSetImageAdaptorappear in no other example. They were builtonly under
if(ITK_VERSION_MAJOR LESS 5)because their visualization classesmoved out of ITK in 2019 (
LevelSetsv4Visualization, now in the separateITKVtkGlue repository). The level-set code itself is unchanged ITK 6 API.
Once they no longer render, nothing ties them to VTK, so they move from
Bridge/VtkGluetoSegmentation/LevelSetsv4, matching the ITK module.What each example now writes
The two dense examples used to differ only in how they rendered, so each now
writes what its name describes:
VisualizeStaticDense2DLevelSetAsElevationMapVisualizeStaticDense2DLevelSetZeroSetZeroCrossingImageFilterVisualizeStatic{Whitaker,Shi,Malcolm}2DLevelSetLayersAll five also fix a latent bug: the Otsu mask pipeline was never updated before
the level set was initialized, so the level set started from an empty mask and
every pixel landed outside it.
The rendered screenshot (
levelsets.png) is removed from each page, since itshowed a renderer that no longer exists.
Verification
Built against ITK
main: 0 build failures, and all 5 new tests pass. Eachoutput was inspected, not just checked for existence:
Commit 1 is a pure move (25 renames at 100% similarity), so history follows the
files.
pre-commit run --all-filespasses.The tests check that each example runs; they do not compare against a baseline
image, which would first need new test data published.