# \[itk-python\] Wrap ITK MatchCardinalityImageToImageMetric

**URL:** https://discourse.itk.org/t/itk-python-wrap-itk-matchcardinalityimagetoimagemetric/3208
**Category:** Engineering
**Tags:** python
**Created:** [June 19, 2020, 2:27am UTC](https://discourse.itk.org/t/itk-python-wrap-itk-matchcardinalityimagetoimagemetric/3208 "2020-06-19T02:27:21Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [June 19, 2020, 12:34pm UTC](https://discourse.itk.org/t/itk-python-wrap-itk-matchcardinalityimagetoimagemetric/3208/2 "2020-06-19T12:34:49Z")

</div>

Hello Baptiste,

> [@bdepalle](#):
>
> I have looked into cookiecutter but I am not sure how to proceed from there and how to make it work with the itk package I installed with pip.

Yes, in general, if you create a new class, Python packages can easily be [generated and uploaded to PyPI](https://itkpythonpackage.readthedocs.io/en/master/Build_ITK_Module_Python_packages.html) by starting from the [ITKModuleTemplate cookie-cutter](https://github.com/InsightSoftwareConsortium/ITKModuleTemplate).

> [@bdepalle](#):
>
> Form what I gathered form other function, I wrote a .wrap file and uploaded is to GitHub ([ITKMatchCardinalityImageToImageMetric/itkMatchCardinalityImageToImageMetric.wrap at master · bdepalle/ITKMatchCardinalityImageToImageMetric · GitHub](https://github.com/bdepalle/ITKMatchCardinalityImageToImageMetric/blob/master/itkMatchCardinalityImageToImageMetric.wrap)).

This repository may be private (I cannot access the file), but since this class is [already in ITK](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.h), you can contribute the wrapping configuration to [its module wrapping directory](https://github.com/InsightSoftwareConsortium/ITK/tree/master/Modules/Registration/Common/wrapping). For more information on how to contribute a file, see our [CONTRIBUTING.md](https://github.com/InsightSoftwareConsortium/ITK/blob/master/CONTRIBUTING.md).

After it is merged, the [ITKPythonPackage ITK version is updated nightly](https://github.com/InsightSoftwareConsortium/ITKPythonPackage/commits/master), so you can build [pre-release binaries](https://itkpythonpackage.readthedocs.io/en/master/Build_ITK_Python_packages.html) until the next release.

Thanks for contributing to ITK!

Matt

---

_[View the full topic](https://discourse.itk.org/t/itk-python-wrap-itk-matchcardinalityimagetoimagemetric/3208)._
