-
Hi, I have been exploring MRI registration recently. After registering a Nifti format MRI image on MNI152 template, I found out that real total volumes of the image increased, which is not supposed to happen to my understanding. The real volume = total number of voxels * real volume of each voxel. Please see the code below.
Here is the output.
So clearly registration changed the image spacing, so the shape of image and unit voxel changed, but I would expect the total volume remain the same. The reason I'm asking is that I try to calculate a segmented volume after feeding the registered image into a binary segmentation model. I would basically multiple the number of positive voxels and the volume of unit pixel based on output mask. Can any of you help out? Where did I miss? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
An affine transform does not preserve volumes. It can scale the moving image to match the fixed image. A rigid transform will preserve volumes, however there will be some imprecision with discretely sampled labels after resampling into the fixed space, so they won't be identical but should be closer. |
Beta Was this translation helpful? Give feedback.
For labels in the fixed space, if you want label volume in the moving space, you can binarize the label, warp to the moving space, and then sum up the values. Something like: