mergesurfaces¶
Synopsis¶
mergesurfaces [options]
mergesurfaces [<input>...] <output> [options]
Description¶
Merge surface meshes at segmentation label boundaries. The input surfaces must follow closely the boundary of a segment in the given image segmentation. Two surfaces are then merged at the longest common intersection boundary. When the two surfaces share no such segmentation boundary, the surfaces are not connected.
Command options¶

i
,
input
<file>...
¶ Input surfaces. These are added to the list of input surfaces to be merged after the <input> arguments.

o
,
output
<file>
¶ Output surface file. When this option is given, the <output> argument is appended to the <input> surfaces before any surface specified using
i
. Either this option or an <output> argument is required.

labels
<file>
¶ Segmentation labels image. Currently required.

labelspercentage
<value>
¶ Percentage of voxels within an input surface that must have the same label to be considered for determining boundaries between segments.

sourcearray
<name>
¶ Add point/cell data array with the specified name with onebased labels corresponding to the input point set from which an output point/cell originates from. When the first input point set has a scalar array with the specified name, the labels of this first surface are preserved, while successive labels are offset by the maximum integer value of the input data array. This is useful when successively merging surface meshes instead of with a single execution of this command. (default: none)

pointsourcearray
<name>
¶ Name of output point data
sourcearray
.

cellsourcearray
<name>
¶ Name of output cell data
sourcearray
.

join
[onoff]
,
nojoin
¶
Whether to join surfaces at intersection boundaries. When off, the output data set has unconnected components. (default: on)

tolerance
,
tol
<float>
¶ Maximum distance of an input cell from the segmentation boundary to be removed. The resulting intersection boundary edges are joined again after the removal of these cells. (default: max voxel size)

smoothboundaries
,
boundarysmoothing
[<n>]
¶ Number of intersection boundary edge smoothing iterations. (default: 3)

nosmoothboundaries
,
noboundarysmoothing
¶
Disable smoothing of boundaries, same as
smoothboundaries
0.

remeshing
,
remesh
[<n>]
¶ Enable remeshing of newly inserted triangles at intersection boundaries. The default number of remeshing iterations <n> is 3. A different value can be specified using this option or
remeshingiterations
. (default: 3)

remeshingiterations
,
remeshiterations
¶
Number of intersection triangle remeshing iterations. (default: 3)

noremeshing
,
noremesh
¶
Disable remeshing of newly inserted intersection triangles, same as
remeshing
orremeshingiterations
0.

edgelength
<min> [<max>]
¶ Edge length range for remeshing newly inserted triangles at intersection boundaries. When min and/or max edge length not specified, the range is chosen based on the mean local edge length of the input meshes at the intersection boundaries minus/plus
edgelengthsigma
times the local standard deviation of input mesh edge lengths.

minedgelength
<min>
¶ Minimum edge length for remeshing of newly inserted triangles.

maxedgelength
<min>
¶ Maximum edge length for remeshing of newly inserted triangles.

edgelengthsigma
<scale>
¶ Standard deviation scaling factor of local edge length standard deviation used to set min/max edge length range for local remeshing of newly inserted triangles at intersection boundaries. (default: 2)

smoothing
,
smooth
[<n>]
¶ Enable smoothing of merged surface points nearby intersection boundaries. When
smoothingmu
is zero or NaN, Gaussian weighting function is used for the mesh smoothing. Otherwise, a uniform weighting is used. (default: 0)

smoothingiterations
,
smoothiterations
¶
Number of intersection points smoothing iterations. (default: 0)

nosmoothing
,
nosmooth
¶
Disable smoothing of nearby intersection points, same as
smoothing
orsmoothingiterations
0.

smoothinglambda
,
smoothlambda
<float>
¶ Lambda parameter used for odd iterations of Laplacian point
smoothing
. The default value is set based on thesmoothmu
parameter. (default: abs(mu)  .01) When onlysmoothinglambda
is given,smoothingmu
is set to to the same value and a Gaussian weighting function is used.

smoothingmu
,
smoothmu
<float>
¶ Lambda parameter used for even iterations of Laplacian point
smoothing
. The default smoothing parameters avoid shrinking of the surface mesh and serve mainly to relax any small selfintersections that may have been introduced while joining the split input surfaces. (default: .75)

neighborhood
,
neighbourhood
,
radius
<int>
¶ Edge connectivity radius around intersection border cells/points used to define the local neighborhood for which to apply the remeshing and smoothing operations. See also
remeshingneighborhood
.

remeshingneighborhood
,
remeshingradius
<int>
¶ Edge connectivity radius around intersection border cells/points used to define neighborhood for which to apply the
remeshing
. (default: 3)

smoothingneighborhood
,
smoothingradius
<int>
¶ Edge connectivity radius around intersection border cells/points used to define neighborhood for which to apply the
smoothing
. (default: 2)

smoothsource
,
sourcesmoothing
[<n>]
¶ Number of iterations for which to smooth the
sourcearray
labels to form smoother boundaries between intersection borders.

dividers
[onoff]
,
nodividers
¶
Enable/disable insertion of segmentation cutting planes at mesh intersections. The
sourcearray
has unique negative labels for each such inserted divider surface patch which enable the extraction or removal of these dividers again when a genus0 surface is required again. (default: off)

normals
[onoff]
,
nonormals
¶
Enable/disable output of surface point and cell normals. (default: on)

pointnormals
[onoff]
,
nopointnormals
¶
Enable/disable output of surface point normals. (default: on)

cellnormals
[onoff]
,
nocellnormals
¶
Enable/disable output of surface cell normals. (default: on)
Standard options¶

v
,
verbose
[n]
¶ Increase/Set verbosity of output messages. (default: 0)

debug
[level]
¶ Increase/Set debug level for output of intermediate results. (default: 0)

version
[major.minor]
¶ Print version and exit or set version to emulate.

revision
¶
Print revision (or version) number only and exit.

h
,
help
¶
Print help and exit.