Skip to content
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

Segmentation Image shows no label on hover if logged with extra dimension #3824

Closed
jleibs opened this issue Oct 12, 2023 · 0 comments · Fixed by #4368
Closed

Segmentation Image shows no label on hover if logged with extra dimension #3824

jleibs opened this issue Oct 12, 2023 · 0 comments · Fixed by #4368
Labels
🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself
Milestone

Comments

@jleibs
Copy link
Member

jleibs commented Oct 12, 2023

The extra dimension should be ignored.

Repro

This works:

import numpy as np
import rerun as rr

# Create a segmentation image
image = np.zeros((8, 12), dtype=np.uint8)
image[0:4, 0:6] = 1
image[4:8, 6:12] = 2

rr.init("rerun_example_segmentation_image", spawn=True)

# Assign a label and color to each class
rr.log("/", rr.AnnotationContext([(1, "red", (255, 0, 0)), (2, "green", (0, 255, 0))]), timeless=True)

rr.log("image", rr.SegmentationImage(image))

image

This fails:

import numpy as np
import rerun as rr

# Create a segmentation image
image = np.zeros((8, 12, 1), dtype=np.uint8)  # <----- NOTE THE EXTRA DIMENSION
image[0:4, 0:6] = 1
image[4:8, 6:12] = 2

rr.init("rerun_example_segmentation_image", spawn=True)

# Assign a label and color to each class
rr.log("/", rr.AnnotationContext([(1, "red", (255, 0, 0)), (2, "green", (0, 255, 0))]), timeless=True)

rr.log("image", rr.SegmentationImage(image))

image

@jleibs jleibs added 🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself labels Oct 12, 2023
@jleibs jleibs added this to the 0.9.1 milestone Oct 12, 2023
jleibs added a commit that referenced this issue Nov 29, 2023
…4368)

### What
- Resolves: #3824

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [app.rerun.io](https://app.rerun.io/pr/4368) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4368)
- [Docs
preview](https://rerun.io/preview/dadad7fa99befa4d8b16919d8c9582868d1ccb86/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/dadad7fa99befa4d8b16919d8c9582868d1ccb86/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
teh-cmc pushed a commit that referenced this issue Nov 30, 2023
…4368)

### What
- Resolves: #3824

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [app.rerun.io](https://app.rerun.io/pr/4368) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4368)
- [Docs
preview](https://rerun.io/preview/dadad7fa99befa4d8b16919d8c9582868d1ccb86/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/dadad7fa99befa4d8b16919d8c9582868d1ccb86/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
emilk added a commit that referenced this issue Jan 23, 2024
### What
This is so we can test things out before the next release, and also get
in some new egui features for the plot aggregator and drag-and-drop.

* Closes #4716
* Closes #4794

### TODO
* [x] Fix hovering ListItems in blueprint panel

### wgpu changelog
https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md#v0190-2024-01-17

### relevant egui changelog (so far)

#### eframe
* Keep `ViewportInfo::maximized` and `minimized` up-to-date on Windows
[#3831](emilk/egui#3831) (thanks
[@rustbasic](https://github.com/rustbasic)!)
* Update wgpu to 0.19 [#3824](emilk/egui#3824)
* Fix: handle `IconData::default()` without crashing
[#3842](emilk/egui#3842)

#### egui_extras
* Fix unwraps in SVG scaling
[#3826](emilk/egui#3826) (thanks
[@amPerl](https://github.com/amPerl)!)
* Update to ehttp 0.4 [#3834](emilk/egui#3834)

#### egui_plot
* Make `egui_plot::PlotMemory` public
[#3871](emilk/egui#3871)

#### egui
* Selectable text in Labels
[#3814](emilk/egui#3814)
* `ComboBox`: add builder method for height
[#3001](emilk/egui#3001) (thanks
[@hinto-janai](https://github.com/hinto-janai)!)
* Add keys `?`, `/`, `|`
[#3820](emilk/egui#3820)
* Fix clickable widgets blocking scrolling on touch screens
[#3815](emilk/egui#3815) (thanks
[@lucasmerlin](https://github.com/lucasmerlin)!)
* Fix `stable_dt` [#3832](emilk/egui#3832)
* Bug Fix : `Response::is_pointer_button_down_on` is now false the frame
the button is released [#3833](emilk/egui#3833)
(thanks [@rustbasic](https://github.com/rustbasic)!)
* Use runtime knowledge of OS for OS-specific text editing
[#3840](emilk/egui#3840)
* Refactor: move text selection logic to own module
[#3843](emilk/egui#3843)
* Fix: dragging to above/below a `TextEdit` or `Label` will select text
to begin/end [#3858](emilk/egui#3858)
* Add `Response::contains_pointer`
[#3859](emilk/egui#3859)
* Always set `response.hovered` to false when dragging another widget
[#3860](emilk/egui#3860)
* Add `Align2::anchor_size`
[#3863](emilk/egui#3863)
* Add `Context::debug_text`
[#3864](emilk/egui#3864)

#### epaint
* Add `Align2::anchor_size`
[#3863](emilk/egui#3863)

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/4885/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/4885/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/4885/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4885)
- [Docs
preview](https://rerun.io/preview/eb1bce846c3adb29b99d04018b002475994ad213/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/eb1bce846c3adb29b99d04018b002475994ad213/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants