CIMAS
CIMAS copied to clipboard
Replace "surface_smooth" by "mirtk smooth-surface"
You can use the smooth-surface command of MIRTK to perform Laplacian smoothing of surface node positions (or scalar data...).
It appears that
os.system("surface_smooth {0} {0} 500 -relaxation 0.01".format(mesh_fit))
can be replaced by
os.system("mirtk smooth-surface {0} {0} -iterations 500 -lambda 0.01 -combinatorial -exclnode".format(mesh_fit))
(or -distance option instead of -combinatorial to use Laplacian weights inversely proportional to the distance of adjacent nodes). The option -inclnode
or -exclnode
can be used to specify whether the node that is smoothed itself should contribute to the average or not, respectively.