<?xml version="1.0" encoding="UTF-8"?>
<executable>
  <category>Filtering</category>
  <category>Diffusion.Utilities</category>
  <title>Resample Scalar/Vector/DWI Volume</title>
  <description><![CDATA[This module implements image and vector-image resampling through  the use of itk Transforms. It can also handle diffusion weighted MRI image resampling. "Resampling" is performed in space coordinates, not pixel/grid coordinates. It is quite important to ensure that image spacing is properly set on the images involved. The interpolator is required since the mapping from one space to the other will often require evaluation of the intensity of the image at non-grid positions. \n\nWarning: To resample DWMR Images, use nrrd input and output files. \n\nWarning: Do not use to resample Diffusion Tensor Images, tensors would  not be reoriented]]></description>
  <version>0.1</version>
  <documentation-url>https://slicer.readthedocs.io/en/latest/user_guide/modules/resamplescalarvectordwivolume.html</documentation-url>
  <license/>
  <contributor>Francois Budin (UNC)</contributor>
  <acknowledgements><![CDATA[This 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. Information on the National Centers for Biomedical Computing can be obtained from http://nihroadmap.nih.gov/bioinformatics]]></acknowledgements>
  <parameters>
    <label>Input/Output</label>
    <description><![CDATA[Input/output parameters]]></description>
    <image type="any">
      <name>inputVolume</name>
      <label>Input Volume</label>
      <channel>input</channel>
      <index>0</index>
      <description><![CDATA[Input Volume to be resampled]]></description>
    </image>
    <image type="any" reference="inputVolume">
      <name>outputVolume</name>
      <label>Output Volume</label>
      <channel>output</channel>
      <index>1</index>
      <description><![CDATA[Resampled Volume]]></description>
    </image>
    <image type="any">
      <name>referenceVolume</name>
      <label>Reference Volume (To Set Output Parameters)</label>
      <channel>input</channel>
      <flag>-R</flag>
      <longflag>--Reference</longflag>
      <description><![CDATA[Reference Volume (spacing,size,orientation,origin)]]></description>
      <default/>
    </image>
  </parameters>
  <parameters>
    <label>Transform Parameters</label>
    <description><![CDATA[Parameters used to transform the input image into the output image]]></description>
    <transform fileExtensions=".h5">
      <name>transformationFile</name>
      <label>Transform Node</label>
      <flag>-f</flag>
      <longflag>--transformationFile</longflag>
      <default/>
      <channel>input</channel>
    </transform>
    <image type="vector">
      <name>deffield</name>
      <label>Deformation Field Volume</label>
      <channel>input</channel>
      <flag>-H</flag>
      <longflag>--defField</longflag>
      <description><![CDATA[File containing the deformation field (3D vector image containing vectors with 3 components)]]></description>
      <default/>
    </image>
    <string-enumeration>
      <name>typeOfField</name>
      <longflag>--hfieldtype</longflag>
      <description><![CDATA[Set if the deformation field is an h-Field]]></description>
      <label>Displacement or H-Field</label>
      <element>displacement</element>
      <element>h-Field</element>
      <default>h-Field</default>
    </string-enumeration>
  </parameters>
  <parameters>
    <label>Interpolation Type</label>
    <string-enumeration>
      <name>interpolationType</name>
      <flag>-i</flag>
      <longflag>--interpolation</longflag>
      <description><![CDATA[Sampling algorithm (linear or nn (nearest neighbor), ws (WindowedSinc), bs (BSpline) )]]></description>
      <label>Interpolation</label>
      <element>linear</element>
      <element>nn</element>
      <element>ws</element>
      <element>bs</element>
      <default>linear</default>
    </string-enumeration>
  </parameters>
  <parameters advanced="true">
    <label>Advanced Transform Parameters</label>
    <description><![CDATA[Those parameters should normally not be modified]]></description>
    <string-enumeration>
      <name>transformsOrder</name>
      <longflag>--transform_order</longflag>
      <description><![CDATA[Select in what order the transforms are read]]></description>
      <label>Transforms Order</label>
      <element>input-to-output</element>
      <element>output-to-input</element>
      <default>output-to-input</default>
    </string-enumeration>
    <boolean>
      <name>notbulk</name>
      <longflag>--notbulk</longflag>
      <description><![CDATA[The transform following the BSpline transform is not set as a bulk transform for the BSpline transform]]></description>
      <label>Not a Bulk Transform</label>
      <default>false</default>
    </boolean>
    <boolean>
      <name>space</name>
      <longflag>--spaceChange</longflag>
      <description><![CDATA[Space Orientation between transform and image is different (RAS/LPS) (warning: if the transform is a Transform Node in Slicer3, do not select)]]></description>
      <label>Space Orientation inconsistency (between transform and image)</label>
      <default>false</default>
    </boolean>
  </parameters>
  <parameters advanced="true">
    <label>Rigid/Affine Parameters</label>
    <point multiple="false" coordinateSystem="lps">
      <name>rotationPoint</name>
      <flag>-r</flag>
      <longflag>--rotation_point</longflag>
      <description><![CDATA[Rotation Point in case of rotation around a point (otherwise useless)]]></description>
      <label>Rotation Point</label>
      <default>0,0,0</default>
    </point>
    <boolean>
      <name>centeredTransform</name>
      <flag>-c</flag>
      <longflag>--centered_transform</longflag>
      <description><![CDATA[Set the center of the transformation to the center of the input image]]></description>
      <label>Centered Transform</label>
      <default>false</default>
    </boolean>
    <string-enumeration>
      <name>imageCenter</name>
      <longflag>--image_center</longflag>
      <description><![CDATA[Image to use to center the transform (used only if "Centered Transform" is selected)]]></description>
      <label>Image Center</label>
      <element>input</element>
      <element>output</element>
      <default>input</default>
    </string-enumeration>
    <boolean>
      <name>inverseITKTransformation</name>
      <flag>-b</flag>
      <longflag>--Inverse_ITK_Transformation</longflag>
      <description><![CDATA[Inverse the transformation before applying it from output image to input image]]></description>
      <label>Inverse ITK Transformation</label>
      <default>false</default>
    </boolean>
  </parameters>
  <parameters advanced="true">
    <label>Manual Output Parameters</label>
    <description><![CDATA[Parameters of the output image]]></description>
    <double-vector>
      <name>outputImageSpacing</name>
      <flag>-s</flag>
      <longflag>--spacing</longflag>
      <description><![CDATA[Spacing along each dimension (0 means use input spacing)]]></description>
      <label>Spacing</label>
      <default>0,0,0</default>
    </double-vector>
    <double-vector>
      <name>outputImageSize</name>
      <flag>-z</flag>
      <longflag>--size</longflag>
      <description><![CDATA[Size along each dimension (0 means use input size)]]></description>
      <label>Size</label>
      <default>0,0,0</default>
    </double-vector>
    <point multiple="false" coordinateSystem="lps">
      <name>outputImageOrigin</name>
      <flag>-O</flag>
      <longflag>--origin</longflag>
      <description><![CDATA[Origin of the output Image]]></description>
      <label>Origin</label>
      <default/>
    </point>
    <double-vector>
      <name>directionMatrix</name>
      <flag>-d</flag>
      <longflag>--direction_matrix</longflag>
      <description><![CDATA[9 parameters of the direction matrix by rows (ijk to LPS if LPS transform, ijk to RAS if RAS transform)]]></description>
      <label>Direction Matrix</label>
      <default>0,0,0,0,0,0,0,0,0</default>
    </double-vector>
  </parameters>
  <parameters advanced="true">
    <label>Advanced Resampling Parameters</label>
    <description><![CDATA[Parameters used for resampling]]></description>
    <integer>
      <name>numberOfThread</name>
      <flag>-n</flag>
      <longflag>--number_of_thread</longflag>
      <description><![CDATA[Number of thread used to compute the output image]]></description>
      <label>Number Of Thread</label>
      <default>0</default>
    </integer>
    <double>
      <name>defaultPixelValue</name>
      <flag>-p</flag>
      <longflag>--default_pixel_value</longflag>
      <description><![CDATA[Default pixel value for samples falling outside of the input region]]></description>
      <label>Default Pixel Value</label>
      <default>0</default>
    </double>
  </parameters>
  <parameters advanced="true">
    <label>Windowed Sinc Interpolate Function Parameters</label>
    <description><![CDATA[Parameters used for the Windowed Sinc interpolation]]></description>
    <string-enumeration>
      <name>windowFunction</name>
      <flag>-W</flag>
      <longflag>--window_function</longflag>
      <description><![CDATA[Window Function \nh = Hamming \nc = Cosine \nw = Welch \nl = Lanczos \nb = Blackman]]></description>
      <label>Window Function</label>
      <element>h</element>
      <element>c</element>
      <element>w</element>
      <element>l</element>
      <element>b</element>
      <default>c</default>
    </string-enumeration>
  </parameters>
  <parameters advanced="true">
    <label>BSpline Interpolate Function Parameters</label>
    <description><![CDATA[Parameters used for the BSpline interpolation]]></description>
    <integer>
      <name>splineOrder</name>
      <flag>-o</flag>
      <longflag>--spline_order</longflag>
      <description><![CDATA[Spline Order]]></description>
      <label>Spline Order</label>
      <default>3</default>
    </integer>
  </parameters>
  <parameters advanced="true">
    <label>Manual Transform (Only used if no transform node set)</label>
    <double-vector>
      <name>transformMatrix</name>
      <flag>-m</flag>
      <longflag>--transform_matrix</longflag>
      <description><![CDATA[12 parameters of the transform matrix by rows ( --last 3 being translation-- )]]></description>
      <label>Transform Matrix</label>
      <default>1,0,0,0,1,0,0,0,1,0,0,0</default>
    </double-vector>
    <string-enumeration>
      <name>transformType</name>
      <flag>-t</flag>
      <longflag>--transform</longflag>
      <description><![CDATA[Transform algorithm\nrt = Rigid Transform\na = Affine Transform]]></description>
      <label>Transform</label>
      <element>rt</element>
      <element>a</element>
      <default>a</default>
    </string-enumeration>
  </parameters>
</executable>
