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

Add from_gray16 for DepthImage #8213

Merged
merged 5 commits into from
Nov 26, 2024
Merged

Add from_gray16 for DepthImage #8213

merged 5 commits into from
Nov 26, 2024

Conversation

fawdlstty
Copy link
Contributor

Depth image are usually stored in a 16-bit gray format. This pr is used to simplify this step

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for opening this pull request.

Because this is your first time contributing to this repository, make sure you've read our Contributor Guide and Code of Conduct.

@Wumpf Wumpf self-requested a review November 25, 2024 09:05
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for contributing! Looks good to me, but would be nice to make use of that in something that is tested from CI.
Doesn't need to be fancy, just compare outcome of from_gray16 with using try_from. You could for instance the snippet from depth_image_simple and check that it constructs the depth image the same way when built with from_gray16 or from_data_type_and_bytes. Test can as a separate test function to crates/store/re_types/tests/types/depth_image.rs

crates/store/re_types/src/archetypes/depth_image_ext.rs Outdated Show resolved Hide resolved
@fawdlstty fawdlstty requested a review from Wumpf November 25, 2024 15:25
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thanks again!

@Wumpf Wumpf changed the title Add from_gray16 for DepthImage Add from_gray16 for DepthImage Nov 25, 2024
@Wumpf Wumpf merged commit 94d545b into rerun-io:main Nov 26, 2024
32 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants