From Slicer Wiki
Revision as of 19:39, 17 May 2010 by Hjmjohnson (talk | contribs)
Jump to: navigation, search
Home < Modules:BRAINSResample

Return to Slicer 3.6 Documentation

Gallery of New Features

Module Name


User Interface

General Information

Module Type & Category

Type: CLI

Category: Registration

Authors, Collaborators & Contact

  • Author1: Hans Johnson, University of Iowa
  • Contributor1: Kent WIlliams, University of Iowa
  • Contact: Hans Johnson, hans-johson at

Module Description

BRAINSResample is a program whose purpose is to resample image volumes to a new resolution, optionally applying a transformation.


BRAINSResample collects together three common image processing tasks that all involve resampling an image volume: Resampling to a new resolution and spacing, applying a transformation (using an ITK transform IO mechanisms) and Warping (using a vector image deformation field).

Quick Tour of Features and Use

  • Input Image Files
    • Image To Warp: Input Image to transform/warp
    • Reference Image: Defines the output space into which Image will be warped
    • Deformation Field: Vector volume defining voxel transformation
  • Warping Parameters
    • Warp By Transform: Filename of BRAINSFit Transfrom file to use in place of deformation field
    • Pixel Type: Specifies pixel type for input & output image. "binary" pixel type uses a modified algorithm whereby the image is read as unsigned char voxels, a signed distance map is created, te signed distance map is resampled, and the thresholded image is written to disk.
    • Interpolation Mode: Specifies which interpolator is used.
    • Invert Linear Transform: Perform transform inversion in ITK physical space before applying linear transform to the image.
  • Result File
    • Output Image: the input image, transformed/warped and then resampled into the reference image space.
User Interface


Notes from the Developer(s)


BRAINSFit depends on Slicer3 (for the SlicerExecutionModel support) and ITK.


TODO: Link to BRAINS3 and/or Slicer3 dashboard tests.

Known bugs

Links to known bugs in the Slicer3 bug tracker

Usability issues

Follow this link to the Slicer3 bug tracker. Please select the usability issue category when browsing or contributing.

<!== ===Source code & documentation===

Links to the module's source code:

Source code:

Doxygen documentation:

More Information

List of all parameters

  --outputVolume <std::string>
    Resulting deformed image
  --useTransformMode <std::string>
    This defunct parameter is no longer in service.  Now ApplyWarp infers
    the transform type from the contents of the .mat file.
  --defaultValue <float>
    Default voxel value (default: 0)
    Perform transform inversion in itk physical space before applying the
    linear transform to the image. (default: 0)
  --interpolationMode <NearestNeighbor|Linear|BSpline|WindowedSinc>
    Type of interpolation used (default: Linear)
  --pixelType <uchar|short|ushort|int|uint|float|binary>
    Specifies the pixel type for the input/output images.  The 'binary'
    pixel type uses a modified algorithm whereby the image is read in as
    unsigned char, a signed distance map is created, signed distance map
    is resampled, and then a thresholded image of type unsigned char is
    written to disk. (default: uchar)
  --warpTransform <std::string>
    Filename for the BRAINSFit transform used in place of the deformation
  --deformationVolume <std::string>
    Deformation Field
  --referenceVolume <std::string>
    Reference image defining the output space
  --inputVolume <std::string>
    Image To Warp


Include funding and other support here.


Publications related to this module go here. Links to pdfs would be useful. -->