Open s1kcode opened 11 months ago
I push a new version that should be able to make this area and volume calculations using nii and dcm files.
Easy convert to nii:
import numpy as np
import nibabel as nib
# Create a 3D array
data = np.random.rand(100, 100, 100)
# Create a NIfTI image
img = nib.Nifti1Image(data, np.eye(4))
# Save the image
nib.save(img, 'output.nii')
Let me know if it works for you.
I got (100,100,100) array data. Can this code convert it to be isosurface or stl obj?