Apply 2D Affine transformation to a 3D image

Hello,
How can I apply the result of 2D affine registration to a 3D image? For now, I just consider a 3D image as a series of 2D images and apply the transformation to each of them, which is not efficient. I appreciate your thoughts on this.

Regards,

Create a 3D affine transform, and set relevant parameters which you get from 2D one. Namely, 2x2 top left matrix, and x and y translations.

1 Like

Hello @Moha_data,

See here.

2 Likes

If you do the resampling in 3D the interpolation will be done in 3D which may not be what you are looking for.

You could create a 2D resample filter, and utilize the SliceBySliceImageFilter to perform the operation on each slice.

1 Like