Repository navigation
BUG: Create orientation-space and pole-figure geometries without length units - #1838
Merged
imikejackson merged 4 commits intoOct 26, 2026
Conversation
joeykleingers
requested changes
Oct 20, 2026
joeykleingers
approved these changes
Oct 20, 2026
joeykleingers
left a comment
Contributor
There was a problem hiding this comment.
Fix the last finding and otherwise this looks good.
imikejackson
force-pushed
the
bug/orientation-geometry-length-units
branch
from
October 21, 2026 13:13
0ea6035 to
028a6d7
Compare
imikejackson
enabled auto-merge (squash)
October 21, 2026 13:15
imikejackson
disabled auto-merge
October 21, 2026 14:25
imikejackson
enabled auto-merge (squash)
October 21, 2026 14:25
joeykleingers
approved these changes
Oct 21, 2026
joeykleingers
left a comment
Contributor
There was a problem hiding this comment.
Approving at ff75b2eb4. I pushed that commit to fix the last review findings:
CreateVertexGeometryActionchecks the geometry it creates before it sets the units. When another DataObject already uses the path, it returns error-6108with a fix hint instead of dereferencing a null geometry. A newGeometryTestcase covers this in preflight and execute.- The new pole-figure unit checks use
REQUIRE_NOTHROWon each geometry lookup first, and the new test pointers end inPtr.
Verified locally on macOS arm64 (simplnx-Rel): the build has no warnings, and the 36 affected tests pass. Without the null check, the new test fails with SIGSEGV.
Problems that existed before this PR are not fixed here. I am filing or linking issues for them.
This was referenced Oct 21, 2026
imikejackson
force-pushed
the
bug/orientation-geometry-length-units
branch
from
October 21, 2026 23:08
ff75b2e to
c8996cd
Compare
imikejackson
force-pushed
the
bug/orientation-geometry-length-units
branch
2 times, most recently
from
October 23, 2026 18:39
b7440e1 to
5af3871
Compare
…th units * Convert Orientations To Rodrigues Geometry, Generate and Write Pole Figure Images, and Compute GBCD Pole Figure created geometries with the default Meter or Micrometer unit. Their coordinates are dimensionless orientation-space values, pixel indices, or stereographic projection values, not specimen lengths. * Create these geometries with IGeometry::LengthUnit::Unspecified. The numeric coordinates do not change. * Add an optional length-unit argument to CreateVertexGeometryAction. The default keeps the previous Meter behaviour for all other callers. The unit is applied in apply() and kept by clone(). * Make CreateImageGeometryAction::clone() carry the unit so a cloned action creates the same geometry as the original. * Add unit assertions to the three filter tests and a test for the vertex action that covers every array handling mode, apply() with and without clone(), and the default unit. * Document the unit choice in the three filter documentation pages. Fixes BlueQuartzSoftware#1803 Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
…e action cloning Move the CreateVertexGeometryAction units test from the OrientationAnalysis plugin into test/GeometryTest.cpp so the core action keeps coverage when the plugin is disabled. Add a CreateImageGeometryAction test that applies a cloned action and checks that the geometry keeps the requested length unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nits default Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
…tighten the new tests CreateVertexGeometryAction now checks the geometry it creates before it sets the units, so a name collision returns an error instead of a crash. The tests added by this change check each geometry lookup and follow the naming rules. 5 files changed, +72 / -39 lines. **1. Vertex geometry creation failure** - `src/simplnx/Filter/Actions/CreateVertexGeometryAction.hpp` - `test/GeometryTest.cpp` When VertexGeom::Create fails, for example because a DataArray already uses the geometry path, the action returns error -6108. The message tells the user to choose an unused path under a DataGroup or another geometry. Before, the new setUnits call dereferenced the null geometry. A new test applies the action where a DataArray already uses the path, in preflight and execute, and checks the error code, the message and the existing array. **2. Test checks and names** - `src/Plugins/OrientationAnalysis/test/ComputeGBCDPoleFigureTest.cpp` - `src/Plugins/OrientationAnalysis/test/WritePoleFigureTest.cpp` - `src/Plugins/OrientationAnalysis/test/ConvertOrientationsToVertexGeometryTest.cpp` - `test/GeometryTest.cpp` Each new pole-figure unit check is preceded by REQUIRE_NOTHROW on the same geometry lookup. Pointers added by the new tests end in Ptr, and the clone flag reads as a condition. Verification: simplnx-Rel (macOS arm64) builds with no warnings. The 36 affected tests pass: the action tests, ComputeGBCDPoleFigure, WritePoleFigure, ConvertOrientationsToVertexGeometry, and the SimplnxCore filters that use CreateVertexGeometryAction. Without the null check, the new collision test fails with SIGSEGV. clang-format 19.1.1 reports no changes.
imikejackson
force-pushed
the
bug/orientation-geometry-length-units
branch
from
October 24, 2026 12:49
5af3871 to
fbbdf29
Compare
imikejackson
disabled auto-merge
October 26, 2026 14:30
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.
Summary
Three Orientation Analysis filters created geometries with a physical length unit although their coordinates are not lengths:
All three now create their geometries with
IGeometry::LengthUnit::Unspecified. The numeric coordinates are not changed.IGeometry::LengthUnit unitsargument to bothCreateVertexGeometryActionconstructors, in the same style asCreateImageGeometryAction. The default is the previous Meter value, so the other callers of the action are not changed. The unit is applied inapply(), is kept byclone(), and has aunits()getter.CreateImageGeometryAction::clone()pass its unit to the copy. The copy used the default Micrometer value before.ConvertOrientationsToVertexGeometryTest(with and without fundamental-zone conversion),WritePoleFigureTest(composed image and count image), andComputeGBCDPoleFigureTest. Before the fix these reported10 == 100(Meter) and6 == 100(Micrometer).CreateVertexGeometryActionthat covers the four array handling modes, preflight and execute modes, direct and cloned application, and the default unit.Fixes #1803
Test Plan
ctest -R "ConvertOrientationsToVertexGeometry|WritePoleFigure|GBCDPoleFigure|CreateVertexGeometry|CreateImageGeometry|ImageGeom"passes (87 tests, serial run, macOS arm64 Release)