From 7b85ce148859cf3fc8bb341cd358f837640cdbd5 Mon Sep 17 00:00:00 2001 From: k-dominik Date: Tue, 23 Jun 2020 09:50:19 +0200 Subject: [PATCH] Reduce number of smoothing rounds Due to a bug (https://github.com/ilastik/marching_cubes/pull/23) in the marching cubes repo, smoothing rounds were off by one. In order to retain consistent behavior we have to reduce the number of smoothing rounds. Co-Authored-By: Stuart Berg --- volumina/view3d/meshgenerator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumina/view3d/meshgenerator.py b/volumina/view3d/meshgenerator.py index 6baf5f46a..e418a0cc6 100644 --- a/volumina/view3d/meshgenerator.py +++ b/volumina/view3d/meshgenerator.py @@ -59,7 +59,7 @@ def march(volume, _): def labeling_to_mesh(labeling, labels): for label in labels: - vertices, normals, faces = march(where(labeling == label, 2, 0).astype(int).T, 4) + vertices, normals, faces = march(where(labeling == label, 2, 0).astype(int).T, 3) data = MeshData(vertices, faces) if normals is not None: data._vertexNormals = normals