In PCL, there are a variety of filters, many of which contain similar filtering logic in at least part of their code. In the early years, the filters were created by different developers, a unified code design did not emerge organically. As a result, there are many boilerplate snippets throughout the filter module. Further enhancements to the filters, such as parallelizing loops, are challenging due to the necessary boilerplate code requiring changes to all the equivalent code across multiple classes without breaking them.

We found some instances of the boilerplate codes in the voxel filters: ApproximateVoxelGrid, VoxelGrid, GridMinimum, VoxelGridLabel, UniformSampling (and also in the binary removal filters)

Our goal was to investigate a unified code design that eliminates redundancy by refactoring similar code pieces across multiple filters without breaking the present API, while simultaneously attempting to simplify implementation and increase runtime speed.



Tin Chon Chan


  • mvieth
  • kunaltyagi
  • Haritha