MATLAB Answers

2one
0

Affine transformation of 3d image volume (new pixel dimensions)?

Asked by 2one
on 21 Jun 2017
I am using this script (affine.m) to transform a 3d image volume
[new_img new_M] = affine(old_img, old_M, [new_elem_size]);
The original image volume (old_img) is of size 409 x 389 x 162 (where I know the pix-->millimeter conversion for x, y and z).
My transformation matrix,
`old_M` =
0.0337 0.0958 -0.9616 -2.5360
0.3706 0.0107 0.1012 -150.2009
0.0201 -0.3571 -0.2550 -231.0513
0 0 0 1.0000
All other input were default (left blank).
The output image volume (new_img) qualitatively looks correct but the size is now: 206 x 172 x 189 and I am not sure how to work out the new pix-->millimeter conversion or if I can assume it is the same as the input image volume?
new_elem_size was blank so default (=1) which the script help says:
new_elem_size (optional) - size of voxel along x y z direction for a transformed 3D volume, or size of pixel along x y for a transformed 2D image. We assume x for the 1st dimension y for the 2nd dimension, and z for the 3rd dimension. 'new_elem_size' is 1 if it is default or empty.
I need to know how to convert voxels to millimeters in new_img but have limited experience with these kind of transformations.

  0 Comments

Sign in to comment.

0 Answers