updated regions to region
@@ -46,7 +46,7 @@ def region_volumes(regions, mode='marching_cubes'):
if mode == 'marching_cubes':
vols[i] = mesh_volume(region)
elif mode.startswith('voxel'):
- vols[i] = regions.sum()
+ vols[i] = region.sum()
return vols
