help > RE: VOI in mm cube?
Apr 9, 2021  12:04 PM | Chris Rorden
RE: VOI in mm cube?
The distance between voxels centers in the row, column and slice directions is stored as pixdim[1], pixdim[2], pixdim[3] in the NIfTI header. Just make sure the image specifies NIFTI_UNITS_MM
I am surprised that you list negative values, as usually these are absolute values. Not sure which tool described these. You can also determine the voxel size from the s-form or q-form, where negative values would create a negative determinant (e.g. an image that is mirrored with respect to canonical space).

Your formula looks fine, though I would use absolute values for volume. 

If you have a lot of images, you would be better off writing a Matlab or Python script. MRIcroGL can save images as either .nii, .nii.gz or .voi format - in reality the .voi format is just a .nii.gz (with the extension telling the software to treat it as a discrete rather than continuous image). A script like this one
could easily be modified to report volumes for hundreds of images with whatever precision you prefer.

Threaded View

alexpcg10 Apr 8, 2021
alexpcg10 Apr 11, 2021
Chris Rorden Apr 11, 2021
Chris Rorden Apr 8, 2021
alexpcg10 Apr 9, 2021
RE: VOI in mm cube?
Chris Rorden Apr 9, 2021