BUG: Fix SIMPL pipeline conversion bugs and Write Image naming - #1682
Merged
imikejackson merged 5 commits intoJul 27, 2026
Merged
Conversation
imikejackson
force-pushed
the
topic/simpl_to_simplnx_conversion_bugs
branch
from
July 22, 2026 22:02
18ed460 to
c7ac2cc
Compare
JDuffeyBQ
approved these changes
Jul 27, 2026
DREAM3D 6.5.49 pipelines fail to convert with "Key not found in json" errors because several FromSIMPLJson() implementations unconditionally convert keys that were added to the legacy filters after 6.5.49. * NeighborOrientationCorrelation, RequireMinNumNeighbors, ErodeDilateBadData, FillBadData: IgnoredDataArrayPaths * CAxisSegmentFeatures: RandomizeFeatureIds Skip the conversion when the key is absent so the filter's default argument value is used instead, matching the pattern already used by ReadRawBinary and RemoveFlaggedFeatures. Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Several FromSIMPLJson() implementations map legacy values onto the wrong simplnx parameters, producing converted pipelines that fail preflight or write misnamed output: * WritePoleFigure: stop mapping the CrystalStructures DataContainer onto the created Output Image Geometry; the legacy filter had no output geometry and reusing the input container name collides with the existing geometry. The "PoleFigure" default is used instead. * ComputeAvgOrientations, ComputeFeatureReferenceMisorientations, ComputeSurfaceFeatures: derive the Feature Attribute Matrix from a feature-level array path (AvgQuats/SurfaceFeatures) instead of FeatureIds, which lives in the cell attribute matrix. * ComputeAvgCAxes: derive the Feature Attribute Matrix from the AvgCAxes path and stop stuffing attribute-matrix paths into the Cell Phases and Crystal Structures array parameters. The legacy filter had no phases/structures inputs, so fill the conventional locations derived from the FeatureIds path. * CopyFeatureArrayToElementArray: leave the Created Array Suffix blank instead of appending the legacy CreatedArrayName to the input array name; the copied array keeps the input array's name. Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
The crystal-structure validation loop rejected the whole input when it encountered cells with phase 0 (unindexed) or cells excluded by the mask. Skip those cells so only phases that actually participate in the segmentation must be Hexagonal-Low/High. Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
A single-slice volume now writes exactly the user-specified file name; the _<index> suffix is only appended when multiple slices are produced. * Apply the rule in the algorithm's per-slice writer and in the preflight "Example Output File" preview * Document the single-slice behavior in the filter markdown * Add a unit test asserting the un-suffixed name (preflight preview, written file, and absence of the _000 variant) * Read single-slice test output back with ReadImageFilter since a generated file list cannot describe an un-indexed file name Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
The 'Example Output File' preflight value was assembled with
fmt::format("{}/{}...") which hard-codes a forward slash between the
parent directory and the file name. On Windows the parent path uses
backslashes, producing a mixed-separator string that failed the
single-slice unit test's comparison against
fs::absolute(outputPath).string() (and displayed inconsistently in the
GUI). Build the preview with the std::filesystem path append operator
so the separator is always native.
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
imikejackson
force-pushed
the
topic/simpl_to_simplnx_conversion_bugs
branch
from
July 27, 2026 14:17
cb0586f to
8e0824f
Compare
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
Fixes a set of conversion bugs found while importing a DREAM3D 6.5.49 pipeline, plus a Write Image naming improvement and a C-Axis segmentation validation fix.
IgnoredDataArrayPaths,RandomizeFeatureIds) inFromSIMPLJson()for NeighborOrientationCorrelation, RequireMinNumNeighbors, ErodeDilateBadData, FillBadData, and CAxisSegmentFeatures. Pre-6.6 pipelines omit these keys and failed to convert with "Key not found in json" errors; the filter default is now used instead.FromSIMPLJson():_<index>suffix when the volume produces a single slice, in both the written file name and the preflight "Example Output File" preview. Documentation and unit tests updated, including a new test covering the single-slice naming.Test Plan
ctest -R "SimplnxCore::WriteImageFilter"passes (13/13)nxrunner --convertwith zero conversion errors