-
Notifications
You must be signed in to change notification settings - Fork 22
Add feature histogram widget #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
haesleinhuepf
wants to merge
12
commits into
matplotlib:main
from
haesleinhuepf:add_feature_histograms
Closed
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
b290a2c
add FeatureHistogramWidget
haesleinhuepf 7269487
add example
haesleinhuepf 210a35a
added test
haesleinhuepf bff4529
Merge branch 'main' into add_feature_histograms
dstansby 8c3bba6
Remove minimum size
dstansby 7d01cef
Run pre-commit
dstansby 80f6d5a
Fix some typing
dstansby c2d6099
Remove clear
dstansby 52b0ad0
Fix __init__ signature
dstansby 46d9d18
Remove notebook
dstansby f7e57f8
Fixup test
dstansby 15d65d5
Update docs
dstansby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Run pre-commit
- Loading branch information
commit 7d01ceff0ceaeb0036431d415f303607b64d2dbc
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
from napari_matplotlib import FeatureHistogramWidget | ||
import numpy as np | ||
|
||
from napari_matplotlib import FeatureHistogramWidget | ||
|
||
|
||
def test_example_q_widget(make_napari_viewer): | ||
# Smoke test adding a histogram widget | ||
viewer = make_napari_viewer() | ||
|
||
image = np.asarray([[0, 1], [2, 1]]) | ||
labels = image.astype(int) | ||
|
||
|
||
viewer.add_image(image) | ||
|
||
labels_layer = viewer.add_labels(labels) | ||
|
||
labels_layer.features = { | ||
'labels': [1, 2], | ||
'area': [2, 1], | ||
'aspect_ratio': [2, 1] | ||
"labels": [1, 2], | ||
"area": [2, 1], | ||
"aspect_ratio": [2, 1], | ||
} | ||
|
||
FeatureHistogramWidget(viewer) |
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.
Uh oh!
There was an error while loading. Please reload this page.