STL-Volume-Model-Calculator icon indicating copy to clipboard operation
STL-Volume-Model-Calculator copied to clipboard

Can this calculator convert volume data to stl or isosurface mesh?

Open s1kcode opened this issue 1 year ago • 1 comments

I got (100,100,100) array data. Can this code convert it to be isosurface or stl obj?

s1kcode avatar Dec 13 '23 20:12 s1kcode

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.

mcanet avatar Dec 24 '23 02:12 mcanet