<?xml version="1.0" encoding="utf-8"?>
<executable>
  <category>Registration</category>
  <title>Affine registration</title>
  <index>3</index>
  <description>Registers two images together using an affine transform and mutual information. This module is often used to align images of different subjects or images of the same subject from different modalities.\n\nThis module can smooth images prior to registration to mitigate noise and improve convergence. Many of the registration parameters require a working knowledge of the algorith although the default parameters are sufficient for many registration tasks.\n\n</description>
  <version>0.1.0.$Revision$(alpha)</version>
  <documentation-url>http://www.slicer.org/slicerWiki/index.php/Modules:AffineRegistration-Documentation-3.6</documentation-url>
  <license></license>
  <contributor>Daniel Blezek</contributor>
<acknowledgements>
This module was developed by Daniel Blezek while at GE Research with contributions from Jim Miller.\n\nThis work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.
</acknowledgements>

 <parameters advanced="true">
    <label>Preprocessing</label>
    <description>Preprocessing of images (smoothing) before registration.</description>

    <integer>
      <name>FixedImageSmoothingFactor</name>
      <longflag>fixedsmoothingfactor</longflag>
      <description>Amount of smoothing applied to fixed image prior to registration. Default is 0 (none). Range is 0-5 (unitless). Consider smoothing the input data if there is considerable amounts of noise or the noise pattern in the fixed and moving images is very different.</description>
      <label>Smoothing level for fixed image</label>
      <default>0</default>
      <constraints>
        <minimum>0</minimum>
        <maximum>5</maximum>
        <step>1</step>
      </constraints>
    </integer>

    <integer>
      <name>MovingImageSmoothingFactor</name>
      <longflag>movingsmoothingfactor</longflag>
      <description>Amount of smoothing applied to moving image prior to registration. Default is 0 (none). Range is 0-5 (unitless). Consider smoothing the input data if there is considerable amounts of noise or the noise pattern in the fixed and moving images is very different.</description>
      <label>Smoothing level for moving image</label>
      <default>0</default>
      <constraints>
        <minimum>0</minimum>
        <maximum>5</maximum>
        <step>1</step>
      </constraints>
    </integer>
  </parameters>

  <parameters>
    <label>Registration Parameters</label>
    <description>Parameters used for registration</description>
    <integer>
      <name>HistogramBins</name>
      <flag>b</flag>
      <longflag>histogrambins</longflag>
      <description>Number of histogram bins to use for Mattes Mutual Information. Reduce the number of bins if a registration fails. If the number of bins is too large, the estimated PDFs will be a field of impulses and will inhibit reliable registration estimation.</description>
      <label>Histogram Bins</label>
      <default>30</default>
      <constraints>
        <minimum>1</minimum>
        <maximum>500</maximum>
        <step>5</step>
      </constraints>
    </integer>

    <integer>
      <name>SpatialSamples</name>
      <flag>s</flag>
      <longflag>spatialsamples</longflag>
      <description>Number of spatial samples to use in estimating Mattes Mutual Information. Larger values yield more accurate PDFs and improved registration quality.</description>
      <label>Spatial Samples</label>
      <default>10000</default>
      <constraints>
        <minimum>1000</minimum>
        <step>1000</step>
      </constraints>
    </integer>

    <integer>
      <name>Iterations</name>
      <flag>i</flag>
      <longflag>iterations</longflag>
      <description>Number of iterations</description>
      <label>Iterations</label>
      <default>2000</default>
    </integer>

    <double>
      <name>TranslationScale</name>
      <longflag>translationscale</longflag>
      <flag>t</flag>
      <description>Relative scale of translations to rotations, i.e. a value of 100 means 10mm = 1 degree. (Actual scale used is 1/(TranslationScale^2)). This parameter is used to "weight" or "standardized" the transform parameters and their effect on the registration objective function.</description>
      <label>Translation scaling</label>
      <default>100.0</default>
      <constraints>
        <minimum>10.0</minimum>
        <maximum>5000.0</maximum>
        <step>50.0</step>
      </constraints>
    </double>
  </parameters>

  <parameters>
    <label>IO</label>
    <description>Input/output parameters</description>
    <transform fileExtensions=".txt">
      <name>InitialTransform</name>
      <longflag>initialtransform</longflag>
      <description>Initial transform for aligning the fixed and moving image.  Maps positions in the fixed coordinate frame to positions in the moving coordinate frame. Optional.</description>
      <label>Initial transform</label>
      <channel>input</channel>
    </transform>
    <image>
      <name>FixedImageFileName</name>
      <label>Fixed Image</label>
      <channel>input</channel>
      <index>0</index>
      <description>Fixed image to which to register</description>
    </image>
    <image>
      <name>MovingImageFileName</name>
      <label>Moving Image</label>
      <channel>input</channel>
      <index>1</index>
      <description>Moving image</description>
    </image>
    <transform fileExtensions=".txt" reference="MovingImageFileName">
      <name>OutputTransform</name>
      <longflag>outputtransform</longflag>
      <description>Transform calculated that aligns the fixed and moving image. Maps positions in the fixed coordinate frame to the moving coordinate frame. Optional (specify an output transform or an output volume or both).</description>
      <label>Output transform</label>
      <channel>output</channel>
    </transform>
    <image>
      <name>ResampledImageFileName</name>
      <longflag>resampledmovingfilename</longflag>
      <label>Output Volume</label>
      <channel>output</channel>
      <description>Resampled moving image to the fixed image coordinate frame. Optional (specify an output transform or an output volume or both).</description>
    </image>
  </parameters>

</executable>
