Skip to content

Commit

Permalink
Merge pull request PointCloudLibrary#222 from dimatura/copypointcloudfix
Browse files Browse the repository at this point in the history
Update row_step when using copyPointCloud on PCLPointCloud2
  • Loading branch information
jspricke committed Aug 23, 2013
2 parents 4b7ab13 + fbd8f14 commit 1513345
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/src/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ pcl::copyPointCloud (
cloud_out.fields = cloud_in.fields;
cloud_out.is_bigendian = cloud_in.is_bigendian;
cloud_out.point_step = cloud_in.point_step;
cloud_out.row_step = cloud_in.row_step;
cloud_out.row_step = cloud_in.point_step * static_cast<uint32_t> (indices.size ());
cloud_out.is_dense = cloud_in.is_dense;

cloud_out.data.resize (cloud_out.width * cloud_out.height * cloud_out.point_step);
Expand All @@ -448,7 +448,7 @@ pcl::copyPointCloud (
cloud_out.fields = cloud_in.fields;
cloud_out.is_bigendian = cloud_in.is_bigendian;
cloud_out.point_step = cloud_in.point_step;
cloud_out.row_step = cloud_in.row_step;
cloud_out.row_step = cloud_in.point_step * static_cast<uint32_t> (indices.size ());
cloud_out.is_dense = cloud_in.is_dense;

cloud_out.data.resize (cloud_out.width * cloud_out.height * cloud_out.point_step);
Expand Down

0 comments on commit 1513345

Please sign in to comment.