Is there an option to save data as ASCII instead of binary?
Thanks!
Is there an option to save data as ASCII instead of binary?
Thanks!
You can get the voxel data as numpy array and write that to a text file. But it would terribly inefficient, van be 10-100x slower read/write than binary.
Thanks, professor Lassoan. Is there any python code for numpy to read a stl file in 3d slicer?
You can load STL file using slicer.util.loadModel()
and then get point coordinates or scalar values as numpy array by calling slicer.util.arrayFromModelPoints()
and slicer.util.arrayFromModelPointData()
.