Answers for "calculate volume of mask"

0

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)
Posted by: Guest on September-14-2021

Python Answers by Framework

Browse Popular Code Answers by Language