Skip to content

Refactor voxel grid label#4870

Draft
tin1254 wants to merge 89 commits into
PointCloudLibrary:masterfrom
tin1254:refactor_voxel_grid_label
Draft

Refactor voxel grid label#4870
tin1254 wants to merge 89 commits into
PointCloudLibrary:masterfrom
tin1254:refactor_voxel_grid_label

Conversation

@tin1254
Copy link
Copy Markdown
Contributor

@tin1254 tin1254 commented Jul 30, 2021

Based on #4829

Description

Refactor VoxelGridLabel such that it inherits from VoxelGrid

Goal

Reduce the boilerplate code in other grid based filters

tin1254 and others added 21 commits July 7, 2021 21:55
* Implement GridFilter for the common members

* Implement TransformFilter for the abstracted filtering logic
* Showcase the bare bone structure of GridStruct

* Test the functions of GridStruct required in applyFilter

* Test different type of grid
* Move applyFilter to protected

* Remove passing GridFilter pointer to GridStruct as can be done with static cast
* Remove confusing comment in applyFilter

* Add line endings

* Fix typo
* Declare new variables for testing instead of using variables from base class
* Move hashPoint, move checkIfOverflow and rename to checkHashRange
* TransformFilter holds GridStruct instead of inheriting it

* Update unit tests
* Add in GridFilterBase and TransformFilter
* Remove the first multiplication as divb_mul_[0] is always 1

* Add test for 2D grid

* Move outside as free functions

* Use static_cast and floor in hashing and checking
* Fix class name in warning

* Remove redundant casting in getGridStruct

* Improve documentation of GridStruct in TransformFilter
* allow ADL

Co-authored-by: Kunal Tyagi <tyagi.kunal@live.com>
* Pass TransformFilter point to constructor of GridStruct instead of setUp
* Rename function name to distinguish 2D and 3D
@kunaltyagi
Copy link
Copy Markdown
Member

Can we have a PR on your fork where we can see the differences between this and 4829?

@tin1254 tin1254 force-pushed the refactor_voxel_grid_label branch from c07ab3e to 27e729c Compare August 1, 2021 15:15
@tin1254
Copy link
Copy Markdown
Contributor Author

tin1254 commented Aug 8, 2021

Can we have a PR on your fork where we can see the differences between this and 4829?

tin1254#1

@tin1254 tin1254 force-pushed the refactor_voxel_grid_label branch from 27e729c to a73e202 Compare August 8, 2021 16:01
tin1254 added 2 commits August 8, 2021 18:13
* Check with EXPECT_TRUE/FALSE instead of EXPECT_EQ/NE
@tin1254 tin1254 force-pushed the refactor_voxel_grid_label branch 2 times, most recently from 5d04855 to af5bc45 Compare August 20, 2021 18:03
* Replace point check with existing marcos

* Remove setUp check with different point types

* Template equivalency check with point types
* Fix error on MSVC and Mac clang
@tin1254 tin1254 force-pushed the refactor_voxel_grid_label branch 3 times, most recently from 2caf75e to a10655d Compare August 22, 2021 00:14
@tin1254 tin1254 force-pushed the refactor_voxel_grid_label branch 2 times, most recently from 4196cc9 to a143329 Compare August 23, 2021 00:31
@tin1254 tin1254 force-pushed the refactor_voxel_grid_label branch from a143329 to b9171f5 Compare September 6, 2021 17:47
@tin1254 tin1254 force-pushed the refactor_voxel_grid_label branch from b9171f5 to 195e6f6 Compare September 6, 2021 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants