volume : (M, N, P) array
Input data volume to find isosurfaces. Will internally be
converted to float32 if necessary.
level : float, optional
Contour value to search for isosurfaces in volume. If not
given or None, the average of the min and max of vol is used.
spacing : length-3 tuple of floats, optional
Voxel spacing in spatial dimensions corresponding to numpy array
indexing dimensions (M, N, P) as in volume.
gradient_direction : string, optional
Controls if the mesh was generated from an isosurface with gradient
descent toward objects of interest (the default), or the opposite,
considering the left-hand rule.
The two options are:
descent : Object was greater than exterior
ascent : Exterior was greater than object
step_size : int, optional
Step size in voxels. Default 1. Larger steps yield faster but
coarser results. The result will always be topologically correct
though.
allow_degenerate : bool, optional
Whether to allow degenerate (i.e. zero-area) triangles in the
end-result. Default True. If False, degenerate triangles are
removed, at the cost of making the algorithm slower.
method: {'lewiner', 'lorensen'}, optional
Whether the method of Lewiner et al. or Lorensen et al. will be used.
mask : (M, N, P) array, optional
Boolean array. The marching cube algorithm will be computed only on
True elements. This will save computational time when interfaces
are located within certain region of the volume M, N, P-e.g. the top
half of the cube-and also allow to compute finite surfaces-i.e. open
surfaces that do not end at the border of the cube.
β adjust three.js camera
parameters that may be related to file size: level, spacing, step_size.
File sizes for each step_size:
step_size
file size (MB)
10
1.07
9
1.42
8
1.85
7
2.62
6
3.75
5
5.74
4
9.61
3
18.38
2
42.88
1
176.62
Images from each step
left => right, top => bottom, 1~10
ex) when step is 10 => wireframe view
ex) when step is 2 => wireframe view
π Conclusion
To adjust both the screen rendering quality and file size, appears that either step 2 or 3, would be suitable (depending on the situation)
230622 - Fixing issues: Adjust clipping plane & Adjust Converting step size
π Works μμ λ΄μ©
[three.js] Adjust clipping plane (for fix rendering distance)
[trimesh] Adjust Converting step size (for fix converted file size)
[three.js] Adjust clipping plane (for fix rendering distance) π
β problem : clipping plane
β adjust three.js camera
[trimesh] Adjust Converting step size (for fix converted file size) π
β problem : converted ply file is too large for push to github
step_size
parameter ofmarching_cubes()
fromtrimesh
Parameters
volume : (M, N, P) array Input data volume to find isosurfaces. Will internally be converted to float32 if necessary. level : float, optional Contour value to search for isosurfaces in
volume
. If not given or None, the average of the min and max of vol is used. spacing : length-3 tuple of floats, optional Voxel spacing in spatial dimensions corresponding to numpy array indexing dimensions (M, N, P) as involume
. gradient_direction : string, optional Controls if the mesh was generated from an isosurface with gradient descent toward objects of interest (the default), or the opposite, considering the left-hand rule. The two options are:β adjust three.js camera
level
,spacing
,step_size
.File sizes for each step_size:
Images from each step
ex) when step is 10 => wireframe view
ex) when step is 2 => wireframe view
π Conclusion
To adjust both the screen rendering quality and file size, appears that either step 2 or 3, would be suitable (depending on the situation)