Child pages
  • MiceBuildModelInitModel
Skip to end of metadata
Go to start of metadata

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.

MICe-make-init-model.pl

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

> MICe-make-init-model.pl -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: MICe-make-init-model.pl <model_dir> <model.mnc>

MICe-make-init-model.pl creates the init-model files for use with
MICe-build-model.pl. <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

Filename

Space

Size

Description

prefix.mnc

native

large

The model in native space.

prefix-small.mnc

native

small

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

prefix-small_mask.mnc

native

small

A binary mask of the model in native space.

prefix_to_standard.xfm

  

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

prefix-atlas.mnc

atlas

small

The model in atlas space.

prefix-atlas-large.mnc

atlas

large

The model at full resolution in atlas space.

prefix-atlas_mask.mnc

atlas

small

A binary mask of the model in atlas space.

prefix-atlas-large_mask.mnc

atlas

large

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