Child pages
  • nlin-protocol
Skip to end of metadata
Go to start of metadata

When using the MICe-build-model.pl registration software, after the rigid body (-lsq6) and affine (-lsq12) registrations, it is possible to perform non linear registrations (-nlin). This can be done using one of two registration packages: ANTS (specify: -nlin-registration-method mincANTS, article: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2276735/) and ANIMAL (specify: -nlin-registration-method minctracc, article: http://onlinelibrary.wiley.com/doi/10.1002/hbm.460030304/abstract). Below you will find information about how to specify parameters for these two non linear registration methods.

Advanced Normalization ToolS (mincANTS)

By default 3 non linear stages are run with parameters being set which work well for MRI mouse brain data with a resolution of 56 microns. Using the -nlin-protocol flag, you can specify a file which overrides the default setting. The following parameters can be specified (these are all to set flag for mincANTS):

option

required

purpose

example values

memory

no, default=2

specify the amount of GB of memory required for the stage

2,3,4,...

timeno, default=120

specify the maximum amount of minutes this stage will run for (used only when running on the SciNet cluster, or when your scheduling system requires you to provide a timeframe for your jobs

30,60, 360,...

use_mask

no, default=1

specify whether or not to use a mask to limit the region of interest for the registration

0 or 1

generation

yes

indicates which non linear stage this is

1,2,3,4,...

similarity_model

yes

specify a semicolon separated list of similarity models for mincANTS (see mincANTS -help). Each similarity model needs:

1) method (CC,MI,PR,MSQ)
2) weight
3) radius/#histogramBins for MI
4) how much to blur the input files with:
-- none, means no blur
-- 0.12_blur, means a fwhm at 0.12mm on the image intensities
-- 0.12_dxyz, means a fwhm at 0.12mm on the image gradient magnitudes

"CC,1,3,none"

"CC,1,3,none;CC,1,3,0.056_dxyz"

"MI,1,3,none;CC,1,3,0.140_dxyz"

transformation_model

yes

specify the transformation model. Takes two parts:

1) Model (Diff,Elast,Exp,SyN)
2) gradient step length

"SyN,0.4"

"Elast,0.3"

regularization

yes

specify the parameters of th regularization:

1) method (Gauss,DMFFD)
2) gradient field sigma
3) deformation field sigma

"Gauss,5,1"

"Gauss,2,1"

iterations

yes

specify the number of iterations for non linear optimization

20, 8, 6,...

 

Full default mincANTS protocol (for 56 micron data)

(
{memory => 1.75,
time => 60*4,
use_mask => 0,
generation => 1,
similarity_model => "CC,1,3,none;CC,1,3,0.056_dxyz",
transformation_model => "SyN,0.5",
regularization => "Gauss,5,1",
iterations => "100x100x100x0"},

{memory => 4.5,
time => 60*6,
use_mask => 1,
generation => 2,
similarity_model => "CC,1,3,none;CC,1,3,0.056_dxyz",
transformation_model => "SyN,0.4",
regularization => "Gauss,5,1",
iterations => "100x100x100x20"},

{memory => 4.5,
time => 60*8,
use_mask => 1,
generation => 3,
similarity_model => "CC,1,3,none;CC,1,3,0.056_dxyz",,
transformation_model => "SyN,0.4",
regularization => "Gauss,5,1",
iterations => "100x100x100x50"},
);

ANIMAL (minctracc)

By default 6 non linear stages are run with parameters being set which work well for MRI mouse brain data with a resolution of 30-60 microns. Using the -nlin-protocol flag, you can specify a file which overrides the default setting. The following parameters can be specified (these are all to set flag for minctracc):

option

required

purpose

example values

generation

yes

indicates which non linear stage this is

1,2,3,4,...

iterations

yes

specify the number of iterations for non linear optimization

20, 8, 6,...

kernel

yes

specify the blurring kernel to be used for the target and source

0.3, 0.24, 0.1,...

memory

no, default=2

specify the amount of GB of memory required for the stage

2,3,4,...

optimization

no, default="-use_simplex"

specify what optimization to use for the non linear stages

"-use_simplex" (more to come...)

simplex

yes

specify the radius of the simplex volume

5, 4, 3, 2,...

step

yes

specify the step size along x,y and z

0.7, 0.5, 0.12,...

use_gradient

yes

specify whether or not to use the gradient of the blur as a second non linear stage

0 or 1

w_rotation

no, default="0.0174533,0.0174533,0.0174533"

specify the optimization weight of rotations around x, y, z

(any three float numbers, seperated by commas and between quotes)

w_scales

no, default="0.02,0.02,0.02"

specify the optimization weight of scaling along x, y, z

(any three float numbers, seperated by commas and between quotes)

w_shear

no, default="0.02,0.02,0.02"

specify the optimization weight of shears a,b and c

(any three float numbers, seperated by commas and between quotes)

w_translations

no, default="0.4,0.4,0.4"

specify the optimization weight of translations in x, y, z

(any three float numbers, seperated by commas and between quotes)

Example and usage of the -nlin-protocol flag

In this example the standard 6 non linear stages are replaced by two stages only:

MICe-build-model.pl ... -nlin-protocol 2nlin-protocol.pl ...

Where the file 2nlin-protocol.pl contains the following:

# This is a comment, the entire protocol is enclosed by parentheses
# followed by a semicolon
(
   # Nlin stages are seperated by a block of parameters
   # between curly brackets a comma
   { memory => 2,
     generation => 1,
     kernel => 0.3,
     iterations => 40,
     w_translations => "1,1,1",
     simplex => 20,
     use_gradient => 1,
     step => 0.4, 
   },
   # The second nlin stage starts here. Note that
   # not all the non required parameters have been
   # specified, and that all key/value pairs are
   # separated by a comma
   { memory => 4,
     generation => 2,
     kernel => 0.15,
     iterations => 20,
     simplex => 20,
     use_gradient => 0,
     w_shear => "0.03,0.03,0.03",
     step => 0.2,
   },
);

Full default minctracc protocol (for 60 micron data)

(
 { memory => 2,
 generation => 1,
 kernel => 0.3,
 iterations => 20,
 simplex => 5,
 ncpus => 1,
 use_gradient => 1,
 optimization => "-use_simplex",
 step => 0.7,
 },
 
 { memory => 2,
 generation => 2,
 kernel => 0.2,
 iterations => 6,
 simplex => 2,
 ncpus => 1,
 use_gradient => 1,
 optimization => "-use_simplex",
 step => 0.6,
 },
 
 { memory => 2,
 generation => 3,
 kernel => 0.2,
 iterations => 8,
 simplex => 2,
 ncpus => 1,
 use_gradient => 1,
 optimization => "-use_simplex",
 step => 0.5,
 },
 
 { memory => 2,
 generation => 4,
 kernel => 0.2,
 iterations => 8,
 simplex => 2,
 ncpus => 1,
 use_gradient => 1,
 optimization => "-use_simplex",
 step => 0.24,
 },
 
 { memory => 2,
 generation => 5,
 kernel => 0.1,
 iterations => 8,
 simplex => 2,
 ncpus => 1,
 use_gradient => 1,
 optimization => "-use_simplex",
 step => 0.12 
 },
 { memory => 5.25,
 generation => 6,
 kernel => 0.06,
 iterations => 8,
 simplex => 2,
 ncpus => 1,
 use_gradient => 1,
 optimization => "-use_simplex",
 step => 0.06
 },
);
  • No labels