Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 47e3912f authored by CERUTTI Guillaume's avatar CERUTTI Guillaume
Browse files

add fill holes parameter in segmentation surface mesh

parent f23ceb2d
1 merge request!7Manage time in 2D Views
Pipeline #878944 failed
......@@ -2,7 +2,7 @@ import numpy as np
from skimage.filters.thresholding import threshold_otsu
from dtkcore import d_int, d_inliststring, d_real
from dtkcore import d_bool, d_int, d_inliststring, d_real
import gnomon.core
from gnomon.core import gnomonAbstractMeshFromImage
......@@ -32,6 +32,8 @@ class segmentationSurfaceMesh(gnomonAbstractMeshFromImage):
self._parameters = {}
self._parameters['resampling_voxelsize'] = d_real("Resampling voxelsize", 0, 0, 1, 2, "Cubic voxelsize in which to resample the image before mesh extraction")
self._parameters['orientation'] = d_inliststring('Orientation', "up", ["up", "down"], "Whether to keep upper or lower part")
self._parameters['down_facing_threshold'] = d_real("Normal z threshold", 0, -1, 1, 2, "The z coordinate below which a normal vector is considered to face downwards")
self._parameters['fill_holes'] = d_bool("Fill holes", False, "Whether to fill holes in the segmented image to generate the surface mesh")
self._parameter_groups = {}
......@@ -56,6 +58,8 @@ class segmentationSurfaceMesh(gnomonAbstractMeshFromImage):
orientation=(1 if self['orientation']=="up" else -1),
surface_matching='cell',
padding=False,
down_facing_threshold=self['down_facing_threshold'],
fill_holes=self['fill_holes']
)
for degree in [1, 2, 3]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment