Skip to content
Shakes edited this page Apr 11, 2016 · 5 revisions

SMILI Model/Surface Processing Application (milxModelApp)

This command-line application allows one to process models/surfaces in bulk with simple arguments. Examples of some processing is highlighted below. See also the developer blog post about surface processing.

Duplicate/copy contents:

milxModelApp --duplicate shoulder_L/sh_L_000.vtk -o output/sh_L_000.vtk 
milxModelApp --duplicate shoulder_L/*.vtk -p output/

Convert from VTK format to VTP format:

milxModelApp -c shoulder_L/sh_L_000.vtk -o output/sh_L_000.vtp
milxModelApp -c shoulder_L/*.vtk -p output/ --outputformat vtp

Concatenate two meshes into one:

milxModelApp Atlas_MRI_surface_R_ace.vtk Atlas_MRI_surface_R_fem.vtk --cat -o Atlas_MRI_surface_R_combined.vtk

Scale the mesh:

milxModelApp shoulder_L/sh_L_000.vtk -o output/scaled_000.vtk --scale 0.5
milxModelApp shoulder_L/*.vtk -p output/scaled_ --scale 0.5

Smooth/denoise meshes using windowed sinc algorithm:

milxModelApp shoulder_L/sh_L_000.vtk -o output/smooth_sh_L_000.vtk --smooth 20
milxModelApp shoulder_L/*.vtk -p output/smooth_ --smooth 20

Laplacian Smooth/denoise meshes:

milxModelApp shoulder_L/sh_L_000.vtk -o output/smoothL_sh_L_000.vtk --laplacian 50
milxModelApp shoulder_L/*.vtk -p output/smoothL_ --laplacian 50

Decimate (reduce number of points of) a mesh by a factor:

milxModelApp shoulder_L/sh_L_000.vtk -o output/dec_sh_L_000.vtk --decimate 0.5
milxModelApp shoulder_L/*.vtk -p output/dec_ --decimate 0.5

Flipping surfaces along axes (0-x, 1-y, 2-z):

milxModelApp -f 0 Atlas_MRI_surface_R_fem.vtk -o Atlas_MRI_surface_R_fem_flipped.vtk
milxModelApp -f 0 Atlas_MRI_surface_R_fem.vtk Atlas_MRI_surface_R_ace.vtk -p output/flipped_ --outputformat vtp

Split surfaces based on knowledge of known components of that surface

milxModelApp --split combined_new_weights.vtk --component Atlas_MRI_surface_R_ace.vtk --component Atlas_MRI_surface_R_fem.vtk -p split_ 

Copy scalars from atlas mesh to other meshes in directory and output to another directory with same names

milxModelApp --scalarcopy focus_atlases/focus_bladder_atlas.vtk results/bladder/asm_bladder_*.vtk -p results_scalars/bladder/

Clip meshes in directory keeping only parts with value of 1 and output to another directory with same names

milxModelApp --clip 1 results_scalars/bladder/asm_bladder_*.vtk -p results_clipped/bladder/

Compute scalars stats (mean, variance etc. per point) of meshes in directory and output single mesh (of first mesh) with stats as arrays in mesh

milxModelApp --scalarstats Hausdorff/bladder/bladder__*.vtk -o bladder_stats.vtk

Clone this wiki locally