You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add SignedMaurerDistanceMapImageFilter as default distance transform method
This change makes SignedMaurerDistanceMapImageFilter the default method for computing distance transforms, replacing ReinitializeLevelSetImageFilter. The new default is faster and more robust, working directly on segmentations without requiring anti-aliasing.
Changes:
- Add DistanceTransformType enum to Image class with SignedMaurer and
ReinitializeLevelSet options
- Update Image::computeDT() to accept method parameter with SignedMaurer
as default
- Expose DistanceTransformType enum in Python bindings
- Add --method option to CLI compute-dt command (choices: "maurer",
"levelset")
- Update existing tests to explicitly use ReinitializeLevelSet method
to match existing ground truth files
- Add new tests to verify SignedMaurer method and default behavior
- Update GroomTests baseline to use new default method
- Maintain backward compatibility by keeping legacy method available
The legacy ReinitializeLevelSetImageFilter remains available for cases
where the old behavior is needed.
Copy file name to clipboardExpand all lines: Applications/shapeworks/ImageCommands.cpp
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -548,6 +548,8 @@ void ComputeDT::buildParser()
548
548
parser.prog(prog).description(desc);
549
549
550
550
parser.add_option("--isovalue").action("store").type("double").set_default(0.0).help("Level set value that defines the interface between foreground and background [default: %default].");
"incrementally compute (single-component) mean of field");
@@ -323,7 +329,8 @@ PYBIND11_MODULE(shapeworks_py, m) {
323
329
"outerVal"_a = 0.0)
324
330
325
331
.def("computeDT", &Image::computeDT,
326
-
"computes signed distance transform volume from an image at the specified isovalue", "isovalue"_a = 0.0)
332
+
"computes signed distance transform volume from an image at the specified isovalue using the specified method (SignedMaurer is default, faster and more robust)",
0 commit comments