Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

calculate volume of mask

import nibabel as nb
import numpy as np
img = nb.load("path/to/img.nii")
num_vox = np.sum(img.get_data() > 0)
Source by neurostars.org #
 
PREVIOUS NEXT
Tagged: #calculate #volume #mask
ADD COMMENT
Topic
Name
5+7 =