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

Visualize images in selection view #6891

Closed
emilk opened this issue Jul 15, 2024 · 3 comments · Fixed by #7156
Closed

Visualize images in selection view #6891

emilk opened this issue Jul 15, 2024 · 3 comments · Fixed by #7156
Assignees
Labels
🧑‍🎨 Design Requires UX/UI designer input enhancement New feature or request 🦟 regression A thing that used to work in an earlier release ui concerns graphical user interface

Comments

@emilk
Copy link
Member

emilk commented Jul 15, 2024

Blocked on

We currently visualize TensorData in the selection view, but #6844 we plan on splitting these into multiple components, which each on their own is not enough to paint the image.

So how do create a UI for an archetype?

For instance, ImageEncoded is a Blob and a MediaType, and only if we have both can we show it as an image.

Spatial View solution

One solution is to instantiate a miniature SpatialView in the selection panel for compatible archetypes.

This would also allow us to show e.g. an arrow when you select an entity with the Arrow2DIndicator, for instance.

@emilk emilk added enhancement New feature or request ui concerns graphical user interface labels Jul 15, 2024
@Wumpf Wumpf added the 🧑‍🎨 Design Requires UX/UI designer input label Jul 15, 2024
@emilk emilk added this to the 0.18 - Chunks and MHz scalars milestone Jul 18, 2024
@emilk
Copy link
Member Author

emilk commented Jul 18, 2024

I've added some #[allow(dead_code)] // TODO(#6891) in the code rather than deleting it

@emilk
Copy link
Member Author

emilk commented Aug 5, 2024

We should be able to visualize images again pretty easily by adding a special-case for the component ImageFormat once that lands:

It will still be a snow-flake, and a more general solution would be nice

@emilk
Copy link
Member Author

emilk commented Aug 5, 2024

  • When selecting the full entity of the image, we should show the image in the UI.
  • When selecting the component ImageBuffer, should we show the image in the UI?

For now, it's fine if a selected SegmentationImage is shown in gray-scale, if that makes things easier.

@emilk emilk added 🦟 regression A thing that used to work in an earlier release blocked can't make progress right now labels Aug 5, 2024
@emilk emilk self-assigned this Aug 8, 2024
@emilk emilk removed the blocked can't make progress right now label Aug 8, 2024
emilk added a commit that referenced this issue Aug 10, 2024
### What
* Part of #6891

The UI for a `Blob` now shows the size and guessed MIME  type of it.

There is a button to save it to disk (or download, on web).
The file extension is guessed from the guessed MIME type.

If it is an image, it will be shown.

### Single-row

![image](https://github.com/user-attachments/assets/31cf43fe-93ee-4e37-a555-cde2e5e87c01)

### Tooltip

![image](https://github.com/user-attachments/assets/483df57d-b5a6-4f5d-945b-8c365dff6f0a)

### Selection panel

![image](https://github.com/user-attachments/assets/546ec4ed-d6ae-4ae1-be55-2a3daeed9516)


### 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 examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7128?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7128?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
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!
* [x] If have noted any breaking changes to the log API in
`CHANGELOG.md` and the migration guide

- [PR Build Summary](https://build.rerun.io/pr/7128)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
emilk added a commit that referenced this issue Aug 12, 2024
…7147)

### What
* Part of #6891
* Fixes #5127

When you select an entity that contains an `Image`, `DepthImage` or
`SegmentationImage`, a preview of it will be show.

Coming later: button to copy and save/download the image.

#### Toolip

![image](https://github.com/user-attachments/assets/e3b5bb67-3e66-462b-b908-54e707197983)


#### Selection panel

![image](https://github.com/user-attachments/assets/fc01796a-7c9d-428a-ba71-33f575fe444d)




### 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 examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7147?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7147?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
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!
* [x] If have noted any breaking changes to the log API in
`CHANGELOG.md` and the migration guide

- [PR Build Summary](https://build.rerun.io/pr/7147)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
@emilk emilk closed this as completed in c25de89 Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍🎨 Design Requires UX/UI designer input enhancement New feature or request 🦟 regression A thing that used to work in an earlier release ui concerns graphical user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants