Get rid of passing directory paths and introduce data classes for these use cases - #99
Merged
Conversation
…Atlas - resolve_atlas() now captures voxel_size_um from BrainGlobeAtlas - interpolate_volume() calls resolve_atlas() internally (like batch_processor) so that atlas_volume is always in PyNutil's transposed coordinate system - test_helpers.load_atlas_from_settings wraps BrainGlobeAtlas with resolve_atlas so pipeline helpers consistently return AtlasData - Update tests to use atlas.volume.shape and atlas.voxel_size_um (AtlasData API) - Revert incorrectly-updated NIfTI fixtures (they were generated from wrong coords) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- test_return_orientation: replace removed load_atlas_data with BrainGlobeAtlas - test_build_volume_from_sections: resolve leftover conflict marker from remove-nonlinear cherry-pick Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The test previously passed return_orientation="lpi" (which was removed as part of stripping the non_linear/damage_mask opt-out). The default return_orientation is "asr", which reorients the volume and produces shape (80, 48, 69) rather than (69, 80, 48). Regenerate the fixtures to match the current default behaviour. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: PolarBean <38996929+PolarBean@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Neural-Systems-at-UIO/pynutil/sessions/80aa909f-b036-4b96-a1e5-dc0ccf9684e1 Co-authored-by: PolarBean <38996929+PolarBean@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Neural-Systems-at-UIO/pynutil/sessions/80aa909f-b036-4b96-a1e5-dc0ccf9684e1 Co-authored-by: PolarBean <38996929+PolarBean@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Neural-Systems-at-UIO/pynutil/sessions/80aa909f-b036-4b96-a1e5-dc0ccf9684e1 Co-authored-by: PolarBean <38996929+PolarBean@users.noreply.github.com>
Contributor
Done — I merged Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
PolarBean
commented
Apr 28, 2026
PolarBean
commented
Apr 28, 2026
PolarBean
commented
Apr 28, 2026
PolarBean
marked this pull request as ready for review
May 8, 2026 17:06
…ents write docstrings that are compatible with our docs with examples
…ng-improvements Revert "write docstrings that are compatible with our docs with examples"
IgorTatarnikov
approved these changes
May 27, 2026
IgorTatarnikov
left a comment
Collaborator
There was a problem hiding this comment.
Looks good! Just a few comments, none are blocking.
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.
This PR introduces some more data classes to replace instances when we would pass directory paths to functions. some examples of how this improves things are below
Segmentation Pipeline
Before
After
Volume Interpolation
Before
After
Seperating these steps also makes it easier for users to pass arrays directly to construct segmentation objects. at the moment doing this would be a bit hacky but at least possible without writing to disk.
Im hoping that long term these data classes become useful enough as a standardised way of interacting with segmentation outputs from different tools.