This repository has been archived by the owner on Jan 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Make sure metadata is attached to loaded napari Layers #38
Merged
Conversation
This file contains 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
Preview page for your plugin is ready here: |
dstansby
force-pushed
the
brainreg-metadata
branch
from
June 27, 2022 09:54
f67d380
to
e44a051
Compare
Codecov Report
@@ Coverage Diff @@
## master #38 +/- ##
==========================================
+ Coverage 59.25% 68.09% +8.83%
==========================================
Files 5 5
Lines 189 210 +21
==========================================
+ Hits 112 143 +31
+ Misses 77 67 -10
Continue to review full report at Codecov.
|
dstansby
force-pushed
the
brainreg-metadata
branch
from
June 27, 2022 15:03
a7e5aea
to
af19744
Compare
paddyroddy
approved these changes
Jun 29, 2022
labels = viewer.layers[1] | ||
assert isinstance(labels, napari.layers.Labels) | ||
assert labels.name == "example_mouse_100um" | ||
for key in ["orientation", "atlas"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tuple
marginally faster here
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
This updates the way layers are added to make sure the
brainreg
metadata is stored in the layers. This is done by using the following code to add the layers:Why is this PR needed?
A widget that takes brainreg output as input (e.g. brainglobe/cellfinder-napari#117) needs access to this metadata.
How has this PR been tested?
I've extended the current test to check for the right layers being added, and that metadata is stored on the labels layer.
Is this a breaking change?
No
Does this PR require an update to the documentation?
If any features have changed, or have been added. Please explain how the documentation has been updated (and link to the associated PR). See here for details.
Checklist: