Skip to content

Commit 073fdd6

Browse files
authored
Update to Rerun 0.18.0 (#13)
1 parent f052b25 commit 073fdd6

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ endif()
1010

1111
# Rerun:
1212
include(FetchContent)
13-
FetchContent_Declare(rerun_sdk URL https://github.com/rerun-io/rerun/releases/download/0.17.0/rerun_cpp_sdk.zip)
13+
FetchContent_Declare(rerun_sdk URL https://github.com/rerun-io/rerun/releases/download/0.18.0/rerun_cpp_sdk.zip)
1414
FetchContent_MakeAvailable(rerun_sdk)
1515

1616
# VRS:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ If you choose not to use pixi, you will need to install a few things yourself be
2929
The Rerun C++ SDK works by connecting to an awaiting Rerun Viewer over TCP.
3030

3131
If you need to install the viewer, follow the [installation guide](https://www.rerun.io/docs/getting-started/installing-viewer). Two of the more common ways to install the Rerun Viewer are:
32-
* Via cargo: `cargo install rerun-cli@0.17.0`
33-
* Via pip: `pip install rerun-sdk==0.17.0`
32+
* Via cargo: `cargo install rerun-cli@0.18.0`
33+
* Via pip: `pip install rerun-sdk==0.18.0`
3434

3535
After you have installed it, you should be able to type `rerun` in your terminal to start the viewer.
3636

src/frame_player.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,18 @@ namespace rerun_vrs {
7979
// NOTE Rerun assumes row major ordering for Images (i.e., TensorData) without any stride.
8080
// Right now we don't check this properly, and just assume that there is no extra padding
8181
// per pixel and / or per row.
82+
auto channels = frame->getSpec().getChannelCountPerPixel();
83+
auto color_model = channels == 1 ? rerun::ColorModel::L
84+
: channels == 3 ? rerun::ColorModel::RGB
85+
: rerun::ColorModel::RGBA;
86+
8287
_rec->log(
8388
_entity_path,
8489
rerun::Image(
85-
{frame->getHeight(),
86-
frame->getWidth(),
87-
frame->getSpec().getChannelCountPerPixel()},
88-
frame->getBuffer()
90+
frame->getBuffer(),
91+
{frame->getWidth(), frame->getHeight()},
92+
color_model,
93+
rerun::datatypes::ChannelDatatype::U8
8994
)
9095
);
9196
} else {

0 commit comments

Comments
 (0)