-
Notifications
You must be signed in to change notification settings - Fork 597
Add dataloader for encoded depth image (to allow log_from_file & dragdrop)
#12287
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
Conversation
|
Web viewer built successfully.
View image diff on kitdiff. Note: This comment is updated whenever you push a commit. |
1ea9b7e to
8b238a3
Compare
Allows drag & drop for encoded depth images `rvl` files into the Viewer.
8b238a3 to
0c926fd
Compare
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.
Pull request overview
This PR adds support for loading encoded depth images (particularly RVL format files) through drag-and-drop and log_from_file functionality in the Viewer.
Key changes:
- Added a new extension module
encoded_depth_image_extwith file loading utilities for encoded depth images - Implemented dataloader logic to handle depth image file extensions (
.rvland.png) - Extended supported file extensions to include depth image formats
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
crates/store/re_sdk_types/src/archetypes/mod.rs |
Registers the new encoded_depth_image_ext module |
crates/store/re_sdk_types/src/archetypes/encoded_depth_image_ext.rs |
Implements file loading methods for EncodedDepthImage archetype |
crates/store/re_data_loader/src/loader_archetype.rs |
Adds load_depth_image function and integrates it into the loader pipeline |
crates/store/re_data_loader/src/lib.rs |
Defines and exports SUPPORTED_DEPTH_IMAGE_EXTENSIONS constant |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "pbm", "pgm", "png", "ppm", "tga", "tif", "tiff", "webp", | ||
| ]; | ||
|
|
||
| pub const SUPPORTED_DEPTH_IMAGE_EXTENSIONS: &[&str] = &["rvl", "png"]; |
Copilot
AI
Dec 19, 2025
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.
The extension png appears in both SUPPORTED_IMAGE_EXTENSIONS and SUPPORTED_DEPTH_IMAGE_EXTENSIONS. This duplication could lead to ambiguity in file handling logic. Consider documenting why PNG is listed in both arrays or ensure the loader has clear precedence rules when a file extension matches multiple categories.
| let rows = [{ | ||
| let mut arch = re_sdk_types::archetypes::EncodedDepthImage::from_file_contents(contents); | ||
|
|
||
| if let Ok(format) = image::ImageFormat::from_path(filepath) { |
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.
If it's a .png depth image, we should only accept it here if it contains a exactly 1 channel. RGB pngs should be handled by EncodedImage
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.
good point. Practically we won't get here because pngs are first handled by the image handler. Maybe we should stick to that explicitly, i.e. adding only rvl to the depth image extensions and then here also only handling rvl
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.
Yea that sounds reasonable to me.
note that .rvl is not really an official file extension, and in the current state we only support the ROS specific format. So do we need this?
Related
png&rvldepth images via newEncodedDepthImagearchetype + integration with viewer andre_mcap#11877What
Allows drag & drop for encoded depth images
rvlfiles into the Viewer.