I tried to use the function
I have volumetric data in an array of size(91, 109, 91), with Float64 values in the interval [-3, 3], and I wanted to get the mesh for the isosurface corresponding to iso=1.25 (a brain).
Inspecting the array (MNI152.npy - Google Drive)
Although no array element has exact this value, I was expecting that calling
verts, triangles = Meshing.isosurface(brain_vol, MarchingCubes(iso=1.25));
to get the brain mesh (because other tools work even in this case), but plotting it I get an empty plot.
Trying with Python skimage marching_cube
verts, triangles= skimage.measure.marching_cubes_lewiner(brain_vol, 1.25)
I suspect that the algorithm used by skimage selects values at some distance from the transmitted iso-value.
Is there a keyword that must be set when calling
Meshing.isosurface() to ensure that it generate the right mesh?
triangles, but using almost the same code(Plotly JS vs plotly.py) for visualizing meshes, I get an empty plot with PlotlyJS, that works for any other mesh I tested. Here is the code to get the brain mesh:
using Meshing using NPZ brain_vol = npzread("MNI152.npy") verts, triangles = Meshing.isosurface(brain_vol, MarchingCubes(iso=1.25));