Closed anamazingclown closed 5 days ago
In ANTs, you can use antsApplyTransforms
. Look at the second option
-o, --output warpedOutputFileName
[warpedOutputFileName or compositeDisplacementField,<printOutCompositeWarpFile=0>]
Linear[genericAffineTransformFile,<calculateInverse=0>]
One can either output the warped image or, if the boolean is set, one can print
out the displacement field based on the composite transform and the reference
image. A third option is to compose all affine transforms and (if boolean is
set) calculate its inverse which is then written to an ITK file.
Thank you for your response. However, if I am using warped_img = ants.apply_transforms(fixed=f_img, moving=m_img, transformlist=mmtf['fwdtransforms'], interpolator="linear"), how can I get the affine matrix?
This is an ANTsPy question. Please close this issue here and open one over at that repo with your question.
ok Thank you very much for your help. I apologize for bothering you again
Thank you very much for your work. I have a question and hope you can answer it? I want to obtain the displacement field from an affine transformation. How can I get a 2D flow from mmtf['fwdtransforms'] so that I can use it as a input to a Spatial Transformer, such as the one in VoxelMorph?
I am looking forward to receiving your answer,Thanks!