Skip to content

FILT: Add EDAX EBSD pattern file reader - #1731

Open
imikejackson wants to merge 1 commit into
BlueQuartzSoftware:developfrom
imikejackson:filt/up1_reader
Open

FILT: Add EDAX EBSD pattern file reader#1731
imikejackson wants to merge 1 commit into
BlueQuartzSoftware:developfrom
imikejackson:filt/up1_reader

Conversation

@imikejackson

Copy link
Copy Markdown
Contributor

Summary

Adds an OrientationAnalysis filter that imports EDAX .up1 and .up2 EBSD
pattern stacks into SIMPLNX DataArrays. A format-neutral reader interface and
extension-based factory isolate the UP implementation so additional EBSD
pattern formats can be added later. Version 1 and packed version 3 headers,
AttributeMatrix-aware output shapes, bounded sequential reads, validation,
documentation, and V&V artifacts are included. 17 files changed, +1757 / -2
lines.

================================================================================

  1. Extensible EBSD pattern reader
    ================================================================================

src/Plugins/OrientationAnalysis/src/OrientationAnalysis/utilities/
IEbsdPatternFileReader.hpp — normalized reader contract and metadata
EbsdPatternFileReaderFactory.cpp — case-insensitive extension dispatch
EdaxUpPatternFileReader.cpp — EDAX UP header and payload implementation
EbsdPatternFileUtilities.cpp — checked arithmetic and endian utilities

The EDAX reader parses serialized fields individually as little-endian values,
including the unaligned version 3 fields. Checked 64-bit arithmetic protects
pattern strides and payload offsets. The reader supports version 1 and version
3 headers, warns when a future version uses the version 3 layout, diagnoses
likely .up1/.up2 extension mismatches, and skips declared extra patterns
while importing the complete scan grid.

Payload reads use bounded chunks, report progress, and check cancellation
between chunks. In-memory stores use contiguous copies after decoding. Other
store implementations use forward-sequential writes without concurrent access.

================================================================================
2. Filter and DataStructure integration

src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/
ReadEbsdPatternFileFilter.cpp — parameters and preflight policy
Algorithms/ReadEbsdPatternFile.cpp — execution-time coordination

The filter derives output type and component shape from the file. .up1
creates uint8 data and .up2 creates uint16 data. Each tuple contains one
pattern with component shape {patternHeight, patternWidth}.

Outputs created inside an existing AttributeMatrix inherit its tuple shape and
must match its total tuple count. Version 3 files created outside an
AttributeMatrix use the stored row and column counts. Version 1 files default
to a flat pattern count and optionally accept validated user-supplied rows and
columns.

================================================================================
3. Validation, tests, and documentation

src/Plugins/OrientationAnalysis/test/ReadEbsdPatternFileTest.cpp
— independent analytical byte fixtures and behavior checks
src/Plugins/OrientationAnalysis/docs/ReadEbsdPatternFileFilter.md
— user-facing format, shape, and limitation guidance
src/Plugins/OrientationAnalysis/vv/ReadEbsdPatternFileFilter.md
— Class 1 and Class 4 V&V dashboard

Fourteen Catch2 tests construct little-endian files independently of the
production reader. They verify exact pixel values, both header versions, both
pixel widths, manual and AttributeMatrix tuple shapes, extra-pattern handling,
future-version warnings, malformed files, both extension-mismatch directions,
case-insensitive extensions, and cancellation.

Test plan

  • Full all target builds with AppleClang in Release configuration
  • All 14 ReadEbsdPatternFile and reader tests pass
  • Full sequential ctest run passes: 1,753 tests, 0 failures
  • Repository-root clang-format checks pass
  • Real version 1 calibration file imports 25 patterns at 480 x 480 pixels
  • Real version 3 file parses 854,854 patterns at 60 x 60 pixels
  • CI passes on supported macOS, Linux, and Windows configurations
  • DREAM3D-NX OOC build verifies the non-contiguous store path

* Add an extension-based reader hierarchy for UP header versions 1 and 3
* Create AttributeMatrix-aware output arrays with chunked payload imports
* Add analytical tests, user documentation, and V&V draft artifacts

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant