Creating the init-model

While MICe-build-model creates a model-independent atlas of the images supplied, it does need an initial registration target for the lsq6 stage. The mask from this initial model is, moreover, also optionally used throughout the lsq12 and non-linear stages. This page describes the files necessary for this initial model.

The init-model contains two separate spaces - what is termed a native space and atlas space. In many cases these are the same; they come into play if the orientation of the images as reconstructed from the scanner is different than the desired final orientation. At the Mouse Imaging Centre we do have a difference in our native and atlas space. See below for example slices of a mouse brain in the two spaces:

The init-model also contains two separate sizes - small and large. Again these can be the same; they are used if the input data is sufficiently large that running MICe-build-model in a downsampled configuration is beneficial.

When you have installed all the software related to MICe-build-model, you will have a script installed called This can be used to create an initial model. The options for the program are as follows:

> -help
Summary of options:

-- General options -------------------------------------------------------------
 -verbose      Be verbose [default]
 -quiet        opposite of -verbose
 -execute      Execute commands [default]
 -dummy        opposite of -execute
 -clobber      Overwrite existing output files
 -noclobber    opposite of -clobber [default]
 -mask <mask.mnc>
               Mask for <model.mnc>. If this option is not supplied, a mask
               will be created by a simple threshold operation on
               <model.mnc>, which may not provide the desired result
 -prefix <prefix>
               Prefix for the model to be generated [default: prefix of
               supplied <model.mnc>]
 -transform <model_to_native.xfm>
               The transform between model and atlas space. If not specified,
               an identity transform is used
 -atlas-like   Target used in mincresample when using -transform
 -shrink <factor>
               Shrink factor to use for the 'small' model files [default: 1]

Usage: <model_dir> <model.mnc> creates the init-model files for use with <model_dir> is the destination directory,
<model.mnc> is the (anatomical) model to be used.

The program requires two arguments: the name of an output directory and a model MINC file. The model MINC file can be any example of the data that you want to register. There is an option to also specify a mask. If you do not have a mask, you can create a file that uses the entire field of view as mask. You can do that with the program minccalc as follows:

# "sneaky" way to create a file with all 1s, which can serve as a mask covering the entire field of view
> minccalc  -expression 'if( 1 == 1) {out = 1;}' model.mnc mask.mnc

If you want the output files of your registration to be in viewing direction that is orthogonal to the cardinal directions, have a look at Creating a symmetric target for registration








The model in native space.




Downsampled version of the model in native space. If only one size is used just symlink this file to prefix.mnc




A binary mask of the model in native space.



The transform which moves a file from native to atlas space. If native and atlas space are the same, use an identity transform.




The model in atlas space.




The model at full resolution in atlas space.




A binary mask of the model in atlas space.




Large version of the binary mask in atlas space.

All the files above need to exist - but many can be symlinks if there is no need to distinguish between large and small or native and atlas space. Also note that "prefix" can be replaced with any text, but it has to be consistent across all these files.

  • No labels