-
-
Notifications
You must be signed in to change notification settings - Fork 712
ENH: Add Python wrapping for ObjectToObjectMultiMetricv4 with explicit TVirtualImage #5653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@copilot specify the third template parameter TVirtualImage, based on the wrapped image types. Also, add a test per the example in the pull request comment. |
Updated in commit d6af876:
|
| import itk | ||
|
|
||
| # Test basic instantiation | ||
| multi_metric = itk.ObjectToObjectMultiMetricv4[2, 2].New() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the TVirtualImage needs to be specified here explicitly - the wrapping does not specify a default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot please add the image type to the instantiation
Co-authored-by: thewtex <[email protected]>
de52d8f to
fc7fbd3
Compare
|
@copilot fix the wrapping of |
Co-authored-by: thewtex <[email protected]>
Updated in commit ae3dca7:
|
Co-authored-by: thewtex <[email protected]>
ObjectToObjectMultiMetricv4 was not wrapped for Python, limiting multi-metric registration to third-party libraries like ANTsPy. Additionally, ImageToImageMetricv4 classes were wrapped without explicit TVirtualImage parameter specification.
Description
This PR adds Python wrapping for the
ObjectToObjectMultiMetricv4class and updates allImageToImageMetricv4derived classes to include explicit TVirtualImage parameter specification, enabling multi-metric registration workflows directly in ITK Python with consistent template parameter usage.Changes
itkObjectToObjectMultiMetricv4.wrapinModules/Registration/Metricsv4/wrapping/ImageToImageMetricv4derived classes to include explicit TVirtualImage parameter:itkImageToImageMetricv4.wrapitkMeanSquaresImageToImageMetricv4.wrapitkCorrelationImageToImageMetricv4.wrapitkDemonsImageToImageMetricv4.wrapitkANTSNeighborhoodCorrelationImageToImageMetricv4.wrapitkJointHistogramMutualInformationImageToImageMetricv4.wrapitkMattesMutualInformationImageToImageMetricv4.wrapitk::Image<float/double, dimension>)itkObjectToObjectMultiMetricv4Test.pydemonstrating usage:Usage Example
PR Checklist
Fixes #5652
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.