Closed yqliu9240 closed 4 years ago
This is always complicated, see if this helps:
to bring A to B: warp forward -> affine forward
to bring B to A: affine inverse -> warp inverse
(the arrows indicate what is moving towards what is fixed)
Subject <-- Penn --> Ch2 MNI
# these transforms come from a registration of
# Penn template (moving) to Ch2 MNI template (fixed)
penn2mni.warp.fwd = "templateToCh2_1Warp.nii.gz"
penn2mni.warp.inv = "templateToCh2_1InverseWarp.nii.gz"
penn2mni.affine = "templateToCh2_0GenericAffine.mat"
# these transforms come from LINDA registering the
# Penn template (moving) to the subject T1w (fixed)
penn2native.warp.fwd = "*_1Warp.nii.gz"
penn2native.warp.inv = "*_1InverseWarp.nii.gz"
penn2native.affine = "*_0GenericAffine.mat"
# when concatenating registrations the last one goes first
# In this case Penn-->MNI is first (forward) and Penn-->Subject second (inverse)
matrices = c(penn2mni.warp.fwd,
penn2mni.affine,
penn2native.affine,
penn2native.warp.inv
)
whichtoinvert = c(0,
0,
1,
0
)
# In this case Penn-->Subject is first (forward) and Penn-->MNI second (inverse)
matrices = c(penn2native.warp.fwd,
penn2native.affine,
penn2mni.affine,
penn2mni.warp.inv
)
whichtoinvert = c(0,
0,
1,
0
)
You may want to double-check all works as expected, I don't use these frequently myself.
This worked, thank you so much!
Hello,
I have a question of how to transform ROIs from MNI space to the patient's T1 space, using LINDA output. I have successfully transformed a lesioned brain to MNI using LINDA. Now I want to reverse the transformation. I know when transforming from T1 to MNI, I use these four matrices: matrices = c(warpmni, affmni, affpenn, warppenn), inverting the affpenn. When doing the opposite, what would be the order of the 4 matrices, and which ones to invert?
Thanks!