ENH: Add option to access index in point set registration#2385
Conversation
e9dba3d to
4bc00ac
Compare
This comment has been minimized.
This comment has been minimized.
4bc00ac to
bdf9774
Compare
dzenanz
left a comment
There was a problem hiding this comment.
PointSetToPointSetMetricv4 inherits from it, so WithIndex variant needs to be wrapped too.
This comment has been minimized.
This comment has been minimized.
|
This functionality could also be added by adding those methods to PointSetToPointSetMetricv4.h and have them by default call the versions without index. |
bdf9774 to
e490838
Compare
|
Maybe also rebase on current master, to resolve merge conflicts. |
- Add superclass to PointSetToPointSetMetricv4 to permit index based access in GetLocalNeighborhodXXX methods. - Fix python wrapping.
e490838 to
97b878c
Compare
dzenanz
left a comment
There was a problem hiding this comment.
I assume this is ready for merging?
|
LGTM @samuelgerber thanks for pushing this upstream. @ntustison does this look good to you? |
I'd like to have @ntustison , or someone else familiar with the v4 framework, input on this before merging. |
|
Hey all, thanks for the consideration. It looks fine to me but it would seem as though y'all are stretching the capabilities more than we have so I would tend to go with your judgement with respect to this pull request. Thanks for all the work. |
This changes adds the class
PointSetToPointSetMetricWithIndexv4to theMetricsv4module.This class contains the previous implementation of everything in
PointSetToPointSetMetricv4but changes thepure virtual functions such that the index in addition to the point is passed to the functions.
This avoids using the fixed points locator to find the index in subclasses that need access to it (see for example https://github.com/samuelgerber/ITKThinShellDemons/).
The pure virtual functions
GetLocalNeighborhoodXXXare changed to pass thePointIdentiferTypeindex of the point as well.The
PointSetToPointSetMetricv4inherits fromPointSetToPointSetMetricWithIndexv4and passes the functions above to the original ones, such as to remain unchanged for classes inheriting fromPointSetToPointSetMetricv4.Thus future point set to point set metrics have the choice of which method to implement by choosing to inherit from
PointSetToPointSetMetricv4orPointSetToPointSetMetricWithIndexv4.PR Checklist