Skip to content

Commit 3153baa

Browse files
authored
suggesting zero padding files when writing (#5597)
* suggesting zero padding files when writing * updating documentation with correct filenames
1 parent c856827 commit 3153baa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

doc/tutorials/content/cluster_extraction.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ You will see something similar to::
171171
PointCloud representing the Cluster: 290 data points.
172172
PointCloud representing the Cluster: 120 data points.
173173

174-
You can also look at your outputs cloud_cluster_0.pcd, cloud_cluster_1.pcd,
175-
cloud_cluster_2.pcd, cloud_cluster_3.pcd and cloud_cluster_4.pcd::
174+
You can also look at your outputs cloud_cluster_0000.pcd, cloud_cluster_0001.pcd,
175+
cloud_cluster_0002.pcd, cloud_cluster_0003.pcd and cloud_cluster_0004.pcd::
176176

177-
$ ./pcl_viewer cloud_cluster_0.pcd cloud_cluster_1.pcd cloud_cluster_2.pcd cloud_cluster_3.pcd cloud_cluster_4.pcd
177+
$ ./pcl_viewer cloud_cluster_0000.pcd cloud_cluster_0001.pcd cloud_cluster_0002.pcd cloud_cluster_0003.pcd cloud_cluster_0004.pcd
178178

179179
You are now able to see the different clusters in one viewer. You should see
180180
something similar to this:

doc/tutorials/content/sources/cluster_extraction/cluster_extraction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ main ()
9494

9595
std::cout << "PointCloud representing the Cluster: " << cloud_cluster->size () << " data points." << std::endl;
9696
std::stringstream ss;
97-
ss << "cloud_cluster_" << j << ".pcd";
98-
writer.write<pcl::PointXYZ> (ss.str (), *cloud_cluster, false); //*
97+
ss << std::setw(4) << std::setfill('0') << j;
98+
writer.write<pcl::PointXYZ> ("cloud_cluster_" + ss.str () + ".pcd", *cloud_cluster, false); //*
9999
j++;
100100
}
101101

0 commit comments

Comments
 (0)