Skip to content

ENH: Ingest ITKFPFH into Modules/Registration#6360

Merged
hjmjohnson merged 51 commits into
InsightSoftwareConsortium:mainfrom
hjmjohnson:ingest-FPFH
Jun 1, 2026
Merged

ENH: Ingest ITKFPFH into Modules/Registration#6360
hjmjohnson merged 51 commits into
InsightSoftwareConsortium:mainfrom
hjmjohnson:ingest-FPFH

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

@hjmjohnson hjmjohnson commented May 27, 2026

Ingests the ITKFPFH remote module (Fast Point Feature Histograms) into the ITK source tree at Modules/Registration/FPFH/, preserving upstream git blame and merge topology. Part of the remote-module consolidation tracked in #6160.

This module computes FPFH point-cloud descriptors and pairs with the recently ingested RANSAC module (#6275) for point-set registration.

Built and tested locally (macOS, Release): all FPFH tests pass — FpfhKWStyleTest, FpfhInDoxygenGroup, the new PointFeature.BasicObjectMethods GoogleTest, and the data-driven itkPointFeatureTest.

Note: ghostflow-check-main is red because the preserved upstream history contains a root commit, a WIP:-prefixed commit, and trailing whitespace in the historical raw .vtk. This is the expected interaction for a topology-preserving ingest and needs a maintainer waiver (see the comment below). All other checks are green.

Ingest details
  • Upstream: https://github.com/InsightSoftwareConsortium/ITKFPFH.git
  • Produced with the v4 ingestion pipeline (ingest-module-v4.sh): whitelist filter-repo + per-commit clang-format/black + commit-prefix sanitization. Upstream merge topology preserved (6 merges).
  • Dependencies are all in-tree: ITKCommon, ITKRegistrationCommon, ITKTestKernel, ITKMetaIO, ITKIOMeshBase. Module is EXCLUDE_FROM_DEFAULT and enabled in the pixi CI configure task.
  • Test input WSB_subsampled.vtk was uploaded to ITKTestingData (Add FPFH WSB_subsampled.vtk test input data ITKTestingData#62) and is referenced via a .cid ExternalData content link rather than shipped as a raw binary.
Fixes applied on top of the faithful import (one topic commit each)
  • DOC: corrected the placeholder class brief; replaced the placeholder module description.
  • STYLE: <cmath> + std::floor (was C math.h + unqualified floor); static_cast for C-style casts; dropped redundant itk:: qualifiers inside namespace itk; removed a redundant neighbor-count clamp and fixed a misleading comment.
  • BUG: widened histogram index to size_t and the parallel-array index to itk::SizeValueType to avoid overflow on very large point sets; used double (not float) for the FPFH neighbor-distance divisor to match the SPFH path.
  • BUG: fixed a transposed feature-buffer read in the test (bin-major storage vs point-major read).
  • ENH: removed an orphaned, unreferenced test baseline; the data-driven test now asserts feature size and finite, non-negative weights (was print-only); converted the object-methods exercise to a GoogleTest (it previously never ran, since the registered test always supplied the data argument).

PranjalSahu and others added 30 commits July 11, 2022 01:16
ENH: Removing distances till docker images are not updated
WIP: Removing not required dependencies
…acro

Added two new macro's, intended to replace the old 'itkTypeMacro' and
'itkTypeMacroNoParent'.

The main aim is to be clearer about what those macro's do: add a virtual
'GetNameOfClass()' member function and override it. Unlike 'itkTypeMacro',
'itkOverrideGetNameOfClassMacro' does not have a 'superclass' parameter, as it
was not used anyway.

Note that originally 'itkTypeMacro' did not use its 'superclass' parameter
either, looking at commit 699b66c, Will
Schroeder, June 27, 2001:
https://github.com/InsightSoftwareConsortium/ITK/blob/699b66cb04d410e555656828e8892107add38ccb/Code/Common/itkMacro.h#L331-L337
The test previously only printed results. Verify the feature container
is non-null, holds 33 bins per point, and contains only finite,
non-negative histogram weights so regressions are actually caught.
Replace the raw WSB_subsampled.vtk point cloud committed in-tree with
a .cid content link (uploaded to ITKTestingData); test data is fetched
via ExternalData instead of shipping a binary in the source tree.
Remove Modules/Remote/FPFH.remote.cmake now that the module lives at
Modules/Registration/FPFH, and enable Module_Fpfh in the pixi CI
configure task so the in-tree module is built and tested.
@github-actions github-actions Bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Enhancement Improvement of existing methods or implementation area:Python wrapping Python bindings for a class type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Registration Issues affecting the Registration module area:Remotes Issues affecting the Remote module labels May 27, 2026
@hjmjohnson hjmjohnson marked this pull request as ready for review May 27, 2026 21:23
@hjmjohnson hjmjohnson requested a review from PranjalSahu May 27, 2026 21:23
@greptile-apps

This comment was marked as resolved.

Comment thread Modules/Registration/FPFH/include/itkPointFeature.hxx Outdated
Comment thread Modules/Registration/FPFH/include/itkPointFeature.hxx Outdated
Comment thread Modules/Registration/FPFH/include/itkPointFeature.hxx Outdated
Comment thread Modules/Registration/FPFH/include/itkPointFeature.hxx Outdated
Comment thread Modules/Registration/FPFH/itk-module.cmake Outdated
@hjmjohnson hjmjohnson marked this pull request as draft May 27, 2026 21:49
ComputeFPFHFeature stored squared neighbor distances as float while
ComputeSPFHFeature used double; the narrowed float was then the divisor
in the weighted SPFH accumulation, perturbing the normalized histogram
weights. Use double in both for a consistent descriptor.
Replace C-style casts with static_cast and remove itk:: prefixes on
names already in scope within namespace itk (CrossProduct, Math::pi,
SizeValueType, MultiThreaderBase, Vector, PointsLocator,
VectorContainer), per ITK code-review conventions.
FindClosestNPoints already caps results at the requested count, so
the std::min clamp was a no-op and the neighbors were never sorted;
correct the misleading comment and use the filtered count directly.
@hjmjohnson
Copy link
Copy Markdown
Member Author

ghostflow-check-main is red due to the preserved upstream history, not the ingested content — this is the expected/known interaction for a topology-preserving remote-module ingest (the same situation as the MeshToPolyData ingest, which was ghostflow-waived). All other checks (ARMBUILD, CDash, ITK.Linux, Pixi-Cxx, pre-commit, Greptile) are green.

ghostflow findings (all in pre-ITK upstream commits)
  • A root commit (92fed42) — unavoidable when merging unrelated upstream history with --allow-unrelated-histories.
  • A WIP:-prefixed upstream commit (27fa911) that predates ITK's commit-prefix convention.
  • Trailing whitespace in the historical raw WSB_subsampled.vtk (4e0b3f7). The tip no longer ships that file — it is an ExternalData .cid content link (ITKTestingData#62) — but the historical commit still carries it.

These cannot be resolved without either squashing (which drops the upstream merge topology and git blame, against the project's ingestion strategy) or rewriting all upstream history. Requesting a maintainer ghostflow waiver, consistent with prior module ingests.

@hjmjohnson hjmjohnson marked this pull request as ready for review May 28, 2026 14:23
Copy link
Copy Markdown
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good.

Comment thread Modules/Registration/FPFH/CMakeLists.txt Outdated
In-tree ITK_SOURCE_DIR is always defined; only the itk_module_impl()
branch is reachable.
Copy link
Copy Markdown
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but it would be good if Pranjal reviewed too.

Copy link
Copy Markdown
Contributor

@PranjalSahu PranjalSahu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@dzenanz
Copy link
Copy Markdown
Member

dzenanz commented Jun 1, 2026

Maybe edit cow.vtk out of git history? And only keep cow.vtk.cid.

@dzenanz
Copy link
Copy Markdown
Member

dzenanz commented Jun 1, 2026

(spotted via ghostflow warnings)

@hjmjohnson hjmjohnson merged commit 06172c1 into InsightSoftwareConsortium:main Jun 1, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Python wrapping Python bindings for a class area:Registration Issues affecting the Registration module area:Remotes Issues affecting the Remote module type:Enhancement Improvement of existing methods or implementation type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants