Jump to content

MINC/Scripts

From Wikibooks, open books for an open world

Scripts

[edit | edit source]

These scripts can all be downloaded from packages

volrot

[edit | edit source]

volrot is will rotate a MINC volume about the centre of the volume. This script would typically be used to sort out orientation issues with a MINC volume. A typical usage to rotate a volume 90 degrees about the x axis would be as such:

  volrot -x_rotation 90 input.mnc output.mnc

nlpfit

[edit | edit source]

nlpfit performs a hierarchical nonlinear fit of one volume to another. This is done via fitting one image to the other using progressively finer nonlinear grid functions. minctracc from the mni_autoreg package is used to perform the fits. The default fitting profile consists of a 16mm, 8mm and 4mm fit. As part of the fitting the volumes are also blurred with progressively smaller FWHM kernels, this is done in order to reduce the chances of a fit a particular level falling into local minima.

The default fit profile can be changed by creating a fit config file and using the -config_file option. An example (the default fit config) is below:

@conf = (
    {'step'         => 16,
     'blur_fwhm'    => 8,
     'iterations'   => 3,
     },
   
    {'step'         => 8,
     'blur_fwhm'    => 4,
     'iterations'   => 2,
     },
   
    {'step'         => 4,
     'blur_fwhm'    => 4,
     'iterations'   => 2,
     },
   );