Replies: 2 comments 2 replies
-
What about using ANTsPy? |
Beta Was this translation helpful? Give feedback.
1 reply
-
You can look at |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
i wanted to use ANTs to perform non-linear registration and compute the transformation matrices that I will later reutilize in Python.
Specifically, I have image I that I want to register to template T, and, as a result, I get the deformed image D, and the files Warp and InverseWarp (note that this non-linear registration is applied after rigid+affine). This is how I do it:
antsRegistration --dimensionality 3 --output [matrix_3d_nonlinear_,registered_nonlinear_3D.nii.gz] --float 1 --interpolation Linear --transform SyN[0.1,3,0] --metric CC[$template3d,$brain3d,1,4] --convergence [100x70x50x20,1e-6,10] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox
and it works like a charm. My question is, how can I re-utilize the Warp file (e.g., in Python) to transform I into D? My images are 128x128x128, and the resulting Warp file is 128x128x128x1x3. I initially thought I could convert the Warp file into voxel-wise transformation matrices, but this didn't work, probably because the content of the Warp file is something else. I also couldn't find in the documentation what are exactly the values of the Warp file (obtained via SyN). Any idea?
Beta Was this translation helpful? Give feedback.
All reactions