Support custom axis names in GEFF node property I/O - #7
Merged
Conversation
If we try to open a GEFF file, e.g. generated with pycellin, the position props names are not neceaarily x, y, z, t. The names are defined in the 'axes' properties, which we need to read. - Add getAxisNameByType() and getAxisNamesByType() methods to GeffMetadata - Modify GeffNode.readFromN5() to read coordinates from dynamic axis paths - Modify GeffNode.writeToN5() to write coordinates to dynamic axis paths - Add test for custom axis names (frame, cell_x, cell_y instead of t, x, y, z) - Maintain backward compatibility with standard axis names Fixes issue where GEFF files with non-standard axis names (e.g., 'frame' instead of 't', 'cell_x' instead of 'x') could not be read. Did this in part with Claude
Document that node property paths for time and spatial coordinates are
resolved from the axis names declared in GeffMetadata rather than being
hardcoded to "t", "x", "y", "z".
- Add "Custom axis names" feature bullet explaining the fallback behaviour
- Update GeffNode description to mention axis-aware I/O
- Add getAxisNameByType() / getAxisNamesByType() to GeffMetadata description
- Annotate the Data Format file-tree to show paths as <t>/<x>/<y>/<z>
with a note that names come from the axes array in metadata
- Add usage example showing round-trip with custom axis names
("frame", "cell_x", "cell_y")
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
t,x,y,z) arenow resolved from the axis names declared in
GeffMetadatarather than beinghardcoded. A GEFF file whose axes are named
frame,cell_x,cell_ywill beread and written correctly without any special handling by the caller.
t,x,y,z) when no axes are definedin metadata, preserving full backward compatibility.
zis neither read nor written.GeffMetadata:getAxisNameByType(String type)– name of the first axis matching the given typegetAxisNamesByType(String type)– names of all axes matching the given type, in declaration orderusage example showing a round-trip with non-standard axis names.
Tests completed
mvn test), including a new round-trip test(
testCustomAxisNames) covering write and read with axes namedframe,cell_x,cell_y.cd cross-language-tests && uv run run_tests.py).