Skip to content
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

TimeVaryingDiffeomorphisms in ITKPythonPackage #178

Closed
cakeinspace opened this issue Oct 27, 2021 · 6 comments
Closed

TimeVaryingDiffeomorphisms in ITKPythonPackage #178

cakeinspace opened this issue Oct 27, 2021 · 6 comments

Comments

@cakeinspace
Copy link

Hello I wanted to know if the itkpythonpackage provides bindings for the deformable registration components of itk. So far i havent found this using google search.

Thansk

@thewtex
Copy link
Member

thewtex commented Oct 27, 2021

Hi,

Yes, it does provide the deformable registration components.

A Python registration example is here:

https://itk.org/ITKExamples/src/Registration/Metricsv4/RegisterTwoPointSets/Documentation.html

This uses point sets and a affine transform, but images or b-spline or displacement field transform can also be used.

There are also a number of Python notebook deformable registration examples in itk-elastix:

https://github.com/InsightSoftwareConsortium/ITKElastix

@cakeinspace
Copy link
Author

cakeinspace commented Oct 28, 2021

hey thanks for your help. Are the time varying diffeomorphic flow registration classes also accessible. It is my understanding that there is some difference between only the displacement field transforms and displacement field transforms parameterized by flows. More specifically i would like to access all the functionality of ITKRegistrationv4 and ITKMetricv4. To implement SyN or BSplineSyN in python

@cakeinspace
Copy link
Author

Ok i found this example itk-ndreg on pypi are there any examples demonstrating its use

@cakeinspace
Copy link
Author

I looked in my envs site-packages and there seems to be an itk_registration package which contains most of the modules that i need but for some reason I cannot import it (i think its a swig error). I copied the files from the itk_registration to the itk package and although it shows up when i do a tab completion in import itk i cant import it can you tell me a quick fix so i can import those packages. they contain the functionalities i need or if you can tell me why its not working i can explore it further right now i dont know how to proceed. sorry to bug you about this

@cakeinspace
Copy link
Author

i inspected the files and PDEDeformableRegistration cant import this file
ImportError: cannot import name '_ITKSpatialObjectsPython' from 'itk' (/home/user-dnf/anaconda3/envs/stenopy/lib/python3.9/site-packages/itk/__init__.py)

@cakeinspace
Copy link
Author

I was able to install itk python wheels and found the PDEDeformable registration classes as well as the timevarying velocity field transforms. I read that adding itkSyn is work in progress i will close this

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

No branches or pull requests

2 participants