• Pipeline - Refers to the entire process of aligning a number of files, this includes all directories and files that are being created.

Setting up the registration environment (at MICe only)

When you are at the Mouse Imaging Centre, you should set your shell environment to one of the quarantines. Here is how you can do this, and why you should do this.

How to run MICe-build-model

MICe-build-model is run by executing a single script called, not surprisingly, MICe-build-model. There's a large set of options which control how MICe-build-model runs; anyone wanting all the gory choices should take a look at: -help

Described in the rest of this page are the most common options and general usage patterns.

Setting up

At its most basic MICe-build-model needs just two or more input MINC files, the name of the pipeline, and it's ready to go. In most situations, however, an initial model used for rigid body alignment and masking of areas of interest is highly recommended. See creating initial models for how to create one of these models if you don't already have it.

General settings

During a registration process there are hundreds of processes being executed, many of which can be run in parallel. For this reason, the MICe-build-model script gives you the option to run the pipeline on one machine, but also to use a sun grid engine (sge) in order to exploit the parallel nature of the registration process.






run the processes (jobs) sequentially on your machine (default).



use the sun grid engine (SGE) to run the processes.

Step #1 - 6 Parameter Registration

The first part of running MICe-build-model is the rigid body alignment. There are a few choices to be made here: whether or not to use an initial model (and if so, which one), and which strategy to employ for bringing the images into the same space. The choice of initial model is specified by:





empty directory

Use this option when you do not have an initial model. The directory specified will be created if it does not exist already. Make sure to specify an absolute (not relative) path.


basename of initial model

Use this option when you have an initial model. See examples below for how to specify the initial model.


prefix for pipeline folders

A registration pipeline will create a number of directories. This option is used to give a distinguishing name to that set of folders. For instance if you have a set of MRI brains images from a project called sonic-hedgehog, you could use mri-brains-sonic-hedgehog for the -pipeline-name option.

For example, to run without an initial model using four mice you'd use the following command: -pipeline-name simple_pipeline -no-lsq6-large-rotations -bootstrap-model /path/to/new/directory/ mouse1.mnc mouse2.mnc mouse3.mnc mouse4.mnc

The mouse1.mnc ... mouse4.mnc would, of course, be replaced by the actual filenames of your images. The -pipeline-name option takes a string giving the name of the pipeline, which will be used when creating the necessary output directories and files. It'll create the pipeline in the directory from which you launched the command; if you want the data to be written elsewhere, an optional -pipeline-base /path/to/output can be specified.

Using an initial model would result in the equivalent command being: -pipeline-name simple_pipeline -init-model /path/to/init/model/basename mouse1.mnc mouse2.mnc mouse3.mnc mouse4.mnc

When you are at MICe

There is a default argument for the -init-model option that you can use when you are at MICe and want to register a set of brain-in-the-box images. This means that you do not have to specify this option yourself in that case.

After the choice of whether to use an initial model you are now faced with three options for how to perform the linear registration:






This is the default - it uses a fairly time consuming process, but allows for the largest variance in rotations between the input images. Recommended for the scanning of fixed samples in particular, where ensuring equivalent positioning across scans is difficult or impossible.



Much faster, but more likely to incorrectly handle images with large rotations. Recommended for in-vivo brain scans or similar acquisitions where the initial positioning of the animals is fairly consistent.



An add-on option for -no-lsq6-large-rotations, it assumes that the position in world space between all the scans is similar. If it is not similar (i.e. data from different scanners, etc.) then a centre of gravity estimation needs to be performed first, which is done with ...



... does not assume equivalent position in world space, and performs centre of gravity estimation first. This is the default. Remember that these two options are ignored when -lsq6-large-rotations is in use


e.g. 1.0_blur, 0.5_blur, 0.3_blur

Comma separated list of kernels (default depends on other -lsq6 choices). Altering the choice of kernels can sometimes improve registration.



Performs a registration accuracy test on the pipeline. Locates brain images that are 2, 3, and 4 standard deviations away from the average brain in terms of intensities and number of deformations.This information is useful in determining the cause of failure when registration cannot be completed.

Two illustrate this usage with three examples, we use the following invocation for specimen scanning: -pipeline-name specimens -init-model /specimen/model/basename \
  mouse1.mnc mouse2.mnc mouse3.mnc mouse4.mnc

Whereas for in-vivo brain scans from our scanner, where we scan multiple mice in the same bore and thus have different world coordinates for each of them, we'd use: -pipeline-name in-vivo1 -init-model /invivo/model/basename \
  -no-lsq6-large-rotations \
  mouse1.mnc mouse2.mnc mouse3.mnc mouse4.mnc

And for in-vivo brain scans from most other sites where world coordinates ought to be similar the invocation would be: -pipeline-name in-vivo2 -init-model /invivo/model/basename \
  -no-lsq6-large-rotations -lsq6-identity \
  mouse1.mnc mouse2.mnc mouse3.mnc mouse4.mnc

Step #2 - 12 Parameter Pairwise Registration

After the rigid body alignment, a full affine alignment stage can be run, where each file is aligned to each of the other file using 12 parameters (3 translations, 3 rotations, 3 scales, and 3 shears). In the end, an average affine transformation is created from the individual pairwise registrations. This stage is run by adding the -lsq12 flag to the parameters to

In the case of the bootstrap mode, this is how to continue: -pipeline-name simple_pipeline -no-lsq6-large-rotations -bootstrap-model /path/to/new/directory/ mouse1.mnc mouse2.mnc mouse3.mnc mouse4.mnc -lsq12

and when using the initial mode: -pipeline-name simple_pipeline -init-model /path/to/init/model/basename mouse1.mnc mouse2.mnc mouse3.mnc mouse4.mnc -lsq12

Step #3 - Non-linear Registration






Run only the first two non-linear fitting steps. This is much faster than running all of the steps. If errors arise while running the first two, corrections may be made before proceeding, thereby saving the user a significant amount of time. 



Create volumes for analysis of deformation fields. Jacobians, scaled jacobians, and magnitudes are deposited into folders.



Less stiffness allows greater flexibility when performing deformations of brain images. Specify stiffness as a number; the default is 0.98.



Specify similarity as a number; the default is 0.8.



This is the amount by which the deformation is underestimated. Specify weight as a number; the default is 0.8.



File containing the nonlinear fitting protocol; see n-lin-protocol.

  • No labels