Home

Awesome

meshgeometry

Mesh geometry tools. Several commands can be chained together, with the same operation appearing many times in the same command line. They are processed sequentially.

Compiling: bash compile.sh

In Linux, you may need to install the freeglut3 and libmesa libraries first: apt-get update apt install freeglut3-dev apt install mesa-common-dev

I/O commandsDescription
-iformat format_nameForce input format (needs to precede imesh)
-oformat format_nameForce output format (needs to precede omesh)
-i filenameInput file (also accepts -imesh)
-o filenameOutput file (also accepts -omesh)
-odata filenameOutput data
Geometry measurementDescription
-absgiCompute absolute gyrification index
-areaSurface area
-checkOrientationCheck that normals point outside
-centreMove the mesh's barycentre to the origin
-eulerPrint Euler characteristic
-foldLengthCompute total fold length
-sizeDisplay mesh dimensions
-trisDisplay number of triangles
-vertsDisplay number of vertices
-volumeCompute mesh volume
-curvCompute curvature
-depthCompute sulcal depth
-areaMapCompute surface area per vertex
-icurv number_of_iterationsIntegrated curvature (warning: icurv changes the geometry of the mesh)
-isolatedVertsCount the number of isolated vertices in the mesh
Geometry modificationDescription
-add filenameAdd mesh at filename to the current mesh
-average n_meshes path1 path2 ... pathnCompute an average of n_meshes all of the same topology
-barycentricProjection reference_meshPrint barycentric coordinates for each vertex in reference_mesh
-fixFlipDetect flipped triangles and fix them
-fixSmallDetect triangles with an angle >160
-flipFlip normals degrees and fix them
-laplaceSmooth lambda number_of_iterationsLaplace smoothing
-level level_valueAdds new vertices (and triangles) to the edges that cross level_value in the vertex data (f.ex., mean curvature)
-normalisePlace all vertices at distance 1 from the origin
-randverts number_of_verticesGenerate homogeneously distributedrandom vertices over the mesh
-relax filenameRelax current mesh to mesh at filename (both meshes have the same topology)
-resample smooth_mesh reference_meshResample the mesh to match the vertices and the topology of the argument mesh
-removeIsolatedVertsRemoves isolated vertices in the mesh (if present)
-rotate x y zRotate with angles x, y and z (in degrees)
-scale scale_valueMultiply each vertex by 'scale'
-sortTrianglesSort the triangles in the mesh file along the x axis
-stereographicStereographic projection
-subdivideSubdivide the mesh with one iteration of Kobbelt's sqrt(3) algorithm
-taubinSmooth lambda mu number_of_iterationsTaubin Smoothing
-translate x y zTranslate mesh by x, y, and z.
-lissencephalicSmooth valleys and hills, not the coast
-normalMesh normal vectors
Data measurementDescription
-countClusters valueCount clusters in texture data
-maxMaximum data value
-meanMean data value
-minMinimum data value
Data modificationDescription
-addValAdd value data
-subValSubtract value from data
-multValMultiply data time value
-divValDivide data by value
-clip min maxClip data values to the interval [min,max]\n\
-smoothData lambda number_of_iterationsLaplace smoothing of data, lambda=0 -> no smoothing, lambda=1 -> each vertex value to neighbour's average
-threshold value 0:down/1:upThreshold texture data
OtherDescription
-drawSurface colourmap pathdraw surface in tiff format, colormap is 'grey' or 'rainbow'
-vVerbose mode
-hHelp

Meshgeometry can read and write several formats, based on the file extension:

ExtensionDescription
.orig, .pial, .white, .inflated, .sphere, .regFreesurfer meshes
.curv, .sulc, .sratioFreesurfer data
.meshBrainVisa mesh
.txtRT's mesh plain text format
.floatRaw float data
.txt1RT's data format
.binn-e-r-v-o-u-s system web binary mesh
.wrl, .obj, .ply, .stl, .smesh, .off, .vtk, .giiOther mesh formats