@@ -116,11 +116,7 @@ void log_image(
116116 cv::Mat img = cv_bridge::toCvCopy (msg)->image ;
117117 rec.log (
118118 entity_path,
119- rerun::DepthImage (
120- img_data_as_collection<uint16_t >(img),
121- {static_cast <size_t >(img.rows ), static_cast <size_t >(img.cols )}
122- )
123- .with_meter (1000 )
119+ rerun::DepthImage (rerun::TensorBuffer::u16 (img), width_height (img)).with_meter (1000 )
124120 );
125121 } else if (msg->encoding == " 32FC1" ) {
126122 cv::Mat img = cv_bridge::toCvCopy (msg)->image ;
@@ -132,15 +128,14 @@ void log_image(
132128 }
133129 rec.log (
134130 entity_path,
135- rerun::DepthImage (
136- img_data_as_collection<float >(img),
137- {static_cast <size_t >(img.rows ), static_cast <size_t >(img.cols )}
138- )
139- .with_meter (1.0 )
131+ rerun::DepthImage (img_data_as_collection<float >(img), width_height (img)).with_meter (1.0 )
140132 );
141133 } else {
142134 cv::Mat img = cv_bridge::toCvCopy (msg, " rgb8" )->image ;
143- rec.log (entity_path, rerun::Image::from_rgb24 (img_data_as_collection<uint8_t >(img), width_height (img)));
135+ rec.log (
136+ entity_path,
137+ rerun::Image::from_rgb24 (img_data_as_collection<uint8_t >(img), width_height (img))
138+ );
144139 }
145140}
146141
@@ -156,7 +151,11 @@ void log_pose_stamped(
156151 rec.log (
157152 entity_path,
158153 rerun::Transform3D (
159- rerun::components::Translation3D (msg->pose .position .x , msg->pose .position .y , msg->pose .position .z ),
154+ rerun::components::Translation3D (
155+ msg->pose .position .x ,
156+ msg->pose .position .y ,
157+ msg->pose .position .z
158+ ),
160159 rerun::Quaternion::from_wxyz (
161160 msg->pose .orientation .w ,
162161 msg->pose .orientation .x ,
0 commit comments