[Neuroimaging] Niftiimage Affine Rotation
kaicanoll at gmail.com
Thu Jul 11 14:03:58 EDT 2019
I would like to apply an affine transform to my image, then open the
transformed image in python to do additional processing. In most other
toolboxes, the affine transformation and the resampling are separate steps,
i.e. you can rotate an image without changing the resolution or you can
change the resolution without rotating.
Is there any way to just apply an affine transform to an image in nibabel?
On Wed, Jul 10, 2019 at 2:30 PM Kai Canoll <kaicanoll at gmail.com
>>* HI All,
*>>* We are having some problems applying an affine transform to some
*>* We are trying to apply a new transform using
*>* When we look at a slice of affine_transformed_image in Python, it
doesn't seem to change in any way. However, if we open it in FSLeyes,
it appears to be rotated according to affinetransform.
*>* However, if we resample affine_transformed_image using
*>* where vox_map contains an affine identity transform, then the
slices in python are successfully rotated.
*>>* In other words, our image does not appear to be affine
transformed in the first step. Can anyone suggest how to apply the
affine transform such that the image actually rotates without having
to do the resampling step?
Could you say more about what you mean? If you want the slices to
change, in the array, I'm afraid there's no way round it, but do
resampling. FSLeyes is just doing the resampling in the background
for you, in order to show you the slices.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Neuroimaging