Getting started

Prior to running MSM you will need to have passed your data through a surface extraction and inflation pipeline such as FreeSurfer, or the HCP minimal processing pipeline. This is because, if MSM is to work for your data you must have cortical surface meshes that have been mapped to the sphere. In addition, you will require a data file for each mesh, where the data may be scalar (such as sulcal depth, curvature or myelin features) or multivariate (RSNs or fMRI task maps).

Data can be supplied as GIFTI (.func.gii or .shape.gii), ASCII (.asc) files, or as a simple text file (provided the text file has as many columns as there are mesh vertices). Surface files may be supplied as GIFTI (surf.gii) or ASCII (.asc). In general the key files required to run MSM are the:

Example of the most basic call to msm (using these inputs) or:

Where this assumes you are calling msm from the directory where the data exists. The final option (-o) is the stem of the path where you wish to output your data; we suggest ~/mydirname/L. or ~/mydirname/R as an example of how you can input left and right hemisphere results into the same directory. Case B shows an example of how, when both datasets have been resampled to a population average surface (such as the HCP's 32k FS_LR surface), it is possible to enter just the average sphere as the input mesh.

MSM Output

The most relevant outputs of MSM are:

The program also spits out a downsampled copy of the initial native mesh ~/mydirname/L.LOWRES.surf.gii and final warp ~/mydirname/L.LOWRES_transformed.surf.gii, which can be used for warping new meshes through the transformation (see section on transformation)

A Note on Post Processing HCP data

A very important point to remember if using data processed through the HCP pipeline is that the native and FS_LR surfaces are rotated relative to one another. Therefore, if you are using surfaces extracted using these surfaces it is necessary to run the preprocessing script PreSulc.sh. This will output a file ending sphere.native.rot.surf.gii which is the native mesh rotated into alignment with the FS_LR surface using an affine transformed linearly approximated from the FreeSurfer transformed mesh.

Advanced Command Line Features

==Configuration files==

In addition to the required inputs to msm, there are several useful options. The most important of these is the --conf call which allows users to supply a configuration file which modifies key parameters of the registration. For optimal running of the registration a configuration file should be supplied, the parameters of which are described in more detail below.

Another very useful feature is the --trans option. This allows users to specify the output mesh from a previous registration stage. For example, if you wished to initialise registration of some resting state network maps (RSNs) by first aligning course folding structure using sulcal maps (as performed in our NeuroImage paper), you could run registration in two stages as:

Running registration in this way, rather than simply taking the output from the sulc registration and using it as an input mesh for the RSN registration, allows distortions for the full sulc + RSN registration to be penalised during alignment.

Configuration Files

Configuration files modify all tunable parameters of the registration. For a full list of all registration parameters you can enter:

We supply a series of configuration files, each tuned to work with different (sulcal depth, myelin, and RSN) data. An example of the sulcal depth config file (allparameterssulcDRconf) is:

MSM performs registration by serially optimising the alignment over a hierarchy of resolution levels. Therefore, the comma separated lists above represent parameters per level, and the number of resolution levels run by msm can be controlled by the length of the lists specified here. Note all multiresolution parameters must have the same length lists or the programme will throw an error in the initialisation stages. There are additionally a series of fixed parameters (that need be specified only once) such as the requirement to intensity normalise the data (--IN). The configuration parameters are specified in more detail here:

Transforming Unseen Data

sub point 2