calculate-surface-spectrum <input> <output> [options]
calculate-surface-spectrum <input1> <input2> <output1> <output2> [options]


Performs a spectral analysis of the general graph Laplacian matrix computed from the given input surface mesh(es).

If calculate-surface-spectrum -target surface is specified, the eigenvectors are reordered and their sign flipped to match the eigenvectors of the target surface mesh.

If two input and output surface meshes are specified, a spectral analysis of the joint graph Laplacian is performed after an initial surface match. The type of initial point correspondences is defined by calculate-surface-spectrum -corr.

The implementation is based on the MATLAB code by Herve Lombaert of [1].

[1]H. Lombaert, J. Sporring, and K. Siddiqi. Diffeomorphic Spectral Matching of Cortical Surfaces. In the 23rd Image Processing in Medical Imaging (IPMI), 2013.



File name of input surface (vtkPolyData).


File name of output surface (vtkPolyData).

Command options

-target <file>

File name of dataset (vtkPolyData) whose spectral components should be used to adjust the sign and order of the eigenmodes.

-corr <string>

Type of point correspondences to use for initial correspondences: “closest point” (“CP”), “spectral match” (“SM”). (default: SM)

-corrpar <name>=<value>

Name/value pair of correspondence parameter.

-corrin <file>

Text file naming for each point in input1 the index of the corresponding point in the second dataset input2, one index per line. (default: -corr)


Replace output vertex coordinates by first three spectral coordinates.

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.


Print revision (or version) number only and exit.

-h, -help

Print help and exit.

Terminal options

-color, -nocolor

Enable/disable colored output. (default: off)

Parallelization options

-threads <n>

Use maximal <n> threads for parallel execution. (default: automatic)