Repository navigation
Conversation
Collaborator
|
Hi @Henrik-KM, thanks for the interest in ngio. I'm closing this along with #293–#296, for the same reason: the linked issues don't have an agreed solution yet, and the new-API ones in particular need a design discussion before a PR can be reviewed. If you'd like to contribute, please propose the approach on the issue first, and open a PR once there's agreement on the direction. |
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.
Fixes #238.
Expose
pixel_to_worldandworld_to_pixelfromngio.common. The converter'ssafe_to_worldnormalizes scalar starts and lengths using an axis's pixel size, so both functions can be used directly without constructing aRoiorDimensionsobject. Downstream call siteThe helpers use the same implementation as
RoiSlice. The docstrings specify the strict 0.01-pixel snapping tolerance, behavior at and beyond the tolerance, and Python's ties-to-even rounding. Flooring the start and ceiling the exclusive stop still happen when forming array slices.All 335 tests in the ROI, iterator, ROI pipeline, and Dask I/O test modules passed. I also ran the downstream
safe_to_worldfunction with the new imports for pixel and world inputs. Pre-commit hooks and thengio.commontype check passed.A broader local Windows run stopped at
test_the_reported_geometry_round_trips[whole-array]. That test passed in the focused run above and in isolation on unchanged upstream. Limited disk space prevented a full local run.Implemented and tested with OpenAI Codex.
Checklist before merging
CHANGELOG.md