For the latest Slicer documentation, visit the 4.10 page.
Introduction and Acknowledgements
This work is part of the National Alliance for Medical Image Computing (NA-MIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on NA-MIC can be obtained from the NA-MIC website.
Resampling an image is a very important task in image analysis. It is especially important in the frame of image registration. This module implements DT image resampling through the use of itk Transforms. The resampling is controlled by the Output Spacing. "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.
Most frequently used for these scenarios:
- This module is especially appropriate when one needs to resample a Diffusion Tensor Image and already knows the transform to apply to it. Its principal advantages resides in the fact that one can apply any kind of transform supported by ITK (rigid, affine and non-rigid) and can choose between the most commonly used interpolators.
- It also allows changing the spacing, the orientation, the size and the origin of the image. In that case, the image will be modified in consequences.
Panels and their use
- Input/Output Defines input and output files.
- Input volume: input volume to be resampled
- Output volume: Resampled Volume
- Reference Volume (optional): Volume used to set the sampling parameters (origin, spacing, orientation and dimensions). If it is not set, the input volume will be taken for reference.
- Transform Parameters
- Transform Node contains the transform(s) to apply to the image
- Deformation Field Volume: Allows the user to transform the input image using a deformation field. The deformation field is applied last in the case other transforms are given. It should be a 3-Dimensional vector image. Vectors should be of dimension 3.
- Displacement or H- field sets the type of deformation field. An H-field contains at each voxel the position in space of the transformed point. The displacement field contains at each voxel the displacement vector to apply to this point.
- Processing Options
- Interpolation: Sampling algorithm (linear , nn (nearest neighborhoor), ws (WindowedSinc), bs (BSpline) ). The windowed sinc interpolator uses a constant boundary condition whereas the b-spline interpolator uses a mirror boundary condition.
- Tensors Correction: Applies a filter on the resampled DT Image to ensure that every tensor is positive definite symmetric. Three filters are available: set to zero the negative eigen values, take their absolute values or compute their closest positive definite symmetric matrix.
- Tensor Transform Type
- Finite Strain (FS) or \nPreservation of the Principal Direction (PPD): Chooses between 2 methods to transform the tensors: Finite Strain (FS), faster but less accurate (right image), or Preservation of the Principal Direction (PPD), more accurate (left image), to compute the affine transform  .
- Advanced Transform Parameters
- Not a Bulk Transform: The transform following the BSpline transform is not set as a bulk transform for the BSpline transform
- Space Orientation inconsistency (between transform and image): Space Orientation between transform and image is different (RAS/LPS) (warning: if the transform is a Transform Node in Slicer, do not select)
- Transforms Order: Select the order in which the transforms are read in the transform node (or file).
Input Image <- Transform0 <- Transform1 <- ... <- Transform n <- Output Image (input-to-output) Input Image <- Transform n <- Transform n-1 <- ... <- Transform0 <- Output Image (output-to-input)
- Advanced Rigid/Affine Parameters
- Rotation Center: uses a fiducial to set the center of rotation (only for rigid and affine transforms)
- Centered Transform: Set the center of the transformation to the center of the input image (only for rigid and affine transforms)
- Image Center: Image to use to center the transform (used only if "Centered Transform" is selected)
- Inverse Transformation:Inverses the transformation before applying it to the image. The transform given to the module is from the output image to the input one. If one wants to specify a transform from the input image to the output image, one should use this flag. This option can only be used if the transform is rigid or affine. Be careful: if the file containing the transform contains multiple transforms, only rigid and affine transforms will be inverted.
- Manual Output Parameters
- Spacing: Spacing along each dimension (0 means use input spacing)
- Size: Size along each dimension (0 means use input size)
- Origin: Origin of the output Image (fiducial)
- Direction Matrix (also known as space directions): 9 parameters of the direction matrix by rows (ijk to LPS if LPS transform, ijk to RAS if RAS transform)
- Advanced Resampling Parameters
- Number Of Threads: Number of thread used to compute the output image
- Default Pixel Value: Default pixel value for samples falling outside of the input region
- Windowed Sinc Interpolate Function Parameters (only relevant if one selects ws as the interpolation type)
- Window Function: Window Function \nh = Hamming \nc = Cosine \nw = Welch \nl = Lanczos \nb = Blackman.
- BSpline Interpolate Function Parameters (only relevant if the selected interpolator is bs)
- Spline Order: Spline Order (Spline order may be from 0 to 5)
- Manual Transform (Used only if no transform node set)
- Transform Matrix: 12 parameters of the affine transform matrix. The first 9 numbers represent a linear transformation matrix in column-major order (where the column index varies the fastest), the last 3 are a translation.
- Transform Type: forces the transform to be of rigid or affine type (affine is default). Transform algorithm\nrt = Rigid Transform\na = Affine Transform
- Resample Scalar/Vector/DWI Volume is the equivalent module for DWI, scalar and vector images
- The transform can be passed as an ITK Transform file using the command line, or directly as a transform node in Slicer. In the latter case, the transform can only be rigid or affine.
- Be careful when applying multiple transforms contained in one file. Pay attention to the order of the transforms in the file and if those transforms are applied serially or simultaneously (bulk).
- Warning : When using this module in Microsoft Windows, the flag -c which centers the transform might cause problems. Please use the long flag --centered_transform instead in that case.
- The Transform can be given through an ITK Transform file. An example is given below.
#Insight Transform File V1.0 # Transform 0 Transform: AffineTransform_double_3_3 Parameters: 1.73205080756880 0.5 0 -0.5 .8660254037844 0 0 0 1.5 15 32 27 FixedParameters: 40 35 20
- Be Careful : The transform file must have an empty line after the fixed parameters
- The Fixed Parameters are the coordinates of the center of rotation
- The Parameters are written in the following format:
- The first 9 numbers represent a linear transformation matrix in column-major order (where the column index varies the fastest)
- The last 3 are a translation.
- A transform file may contain multiple transforms. The transforms are all merged together before being applied to the image. Therefore the interpolation operation is performed only once per voxel which improves the quality of the output image compared to applying each transform separatly.
ITK software guide. Sections "6.9 Geometric Transformations", "8.8 Transforms" and "8.9 Interpolators".
 D.C. Alexander, C. Pierpaoli, P.J. Basser, J.C. Gee. Spatial Transformations of Diffusion Tensor Magnetic Resonance Images, IEEE Transactions on medical imaging, vol. 20, No. 11, November 2001
Information for Developers
Developers can use the C++ classes available in this module to resample Diffusion Tensor Images. The classes are based on ITK.