Difference between revisions of "Modules:BRAINSFit"

From Slicer Wiki
Jump to: navigation, search
Line 17: Line 17:
  
 
Category: Registration
 
Category: Registration
 +
 +
  
 
===Authors, Collaborators & Contact===
 
===Authors, Collaborators & Contact===
* Author1: Hans Johnson, University of Iowa
+
 
* Contributor1: Kent WIlliams, University of Iowa
+
Author: Hans J. Johnson, hans-johnson -at- uiowa.edu, http://wwww.psychiatry.uiowa.edu
* Contact: Hans Johnson, hans-johson at uiowa.edu
+
 
 +
Contributors: Hans Johnson(1,3,4); Kent Williams(1); Gregory Harris(1), Vincent Magnotta(1,2,3);  Andriy Fedorov(5), fedorov -at- bwh.harvard.edu (Slicer integration); (1=University of Iowa Department of Psychiatry, 2=University of Iowa Department of Radiology, 3=University of Iowa Department of Biomedical Engineering, 4=University of Iowa Department of Electrical and Computer Engineering, 5=Surgical Planning Lab, Harvard) 
 +
 
 +
 
  
 
===Module Description===
 
===Module Description===
BRAINSFit is a program for mutual information registration of brain imaging data using ITK classes. It is based on an example program included in the ITK distribution,
+
 
 +
{| style="color:green" border="1"
 +
|Program title || BRAINSFit
 +
 
 +
|-
 +
|Program version || 3.0.0
 +
 
 +
|-
 +
|Program documentation-url || http://wiki.slicer.org/slicerWiki/index.php/Modules:BRAINSFit
 +
 
 +
|-
 +
|}
  
 
Insight/Examples/Registration/ImageRegistration8.cxx
 
Insight/Examples/Registration/ImageRegistration8.cxx

Revision as of 20:56, 4 June 2010

Home < Modules:BRAINSFit

Return to Slicer 3.6 Documentation

Gallery of New Features


Module Name

BRAINSFit

User Interface

General Information

Module Type & Category

Type: CLI

Category: Registration


Authors, Collaborators & Contact

Author: Hans J. Johnson, hans-johnson -at- uiowa.edu, http://wwww.psychiatry.uiowa.edu

Contributors: Hans Johnson(1,3,4); Kent Williams(1); Gregory Harris(1), Vincent Magnotta(1,2,3); Andriy Fedorov(5), fedorov -at- bwh.harvard.edu (Slicer integration); (1=University of Iowa Department of Psychiatry, 2=University of Iowa Department of Radiology, 3=University of Iowa Department of Biomedical Engineering, 4=University of Iowa Department of Electrical and Computer Engineering, 5=Surgical Planning Lab, Harvard)


Module Description

Program title BRAINSFit
Program version 3.0.0
Program documentation-url http://wiki.slicer.org/slicerWiki/index.php/Modules:BRAINSFit

Insight/Examples/Registration/ImageRegistration8.cxx This program is the most functional example of multi-modal 3D rigid image registration provided with ITK. ImageRegistration8 is in the Examples directory, and also sec. 8.5.3 in the ITK manual. We have modified and extended this example in several ways:

  • defined a new ITK Transform class, based on itkScaleSkewVersor3DTransform which has 3 dimensions of scale but no skew aspect.
  • implemented a set of functions to convert between Versor Transforms and the general itk::AffineTransform and deferred converting from specific to more general representations to preserve transform information specificity as long as possible. Our Rigid transform is the narrowest, a Versor rotation plus separate translation.
  • Added a template class itkMultiModal3DMutualRegistrationHelper which is templated over the type of ITK transform generated, and the optimizer used.
  • Added image masks as an optional input to the Registration algorithm, limiting the volume considered during registration to voxels within the brain.
  • Added image mask generation as an optional input to the Registration algorithm when meaningful masks such as for whole brain are not available, allowing the fit to at least be focused on whole head tissue.
  • Added the ability to use one transform result, such as the Rigid transform, to initialize a more adaptive transform
  • Defined the command line parameters using tools from the Slicer [ 3] program, in order to conform to the Slicer3 Execution model.

Added the ability to write output images in any ITK-supported scalar image format.

Usage

The BRAINSFit distribution contains a directory named TestData, which contains two example images. The first, test.nii.gz is a NIfTI format image volume, which is used the input for the CTest-managed regression test program. The program makexfrmedImage.cxx, included in the BRAINSFit distribution was used to generate test2.nii.gz, by scaling, rotating and translating test.nii.gz. You can see representative Sagittal slices of test.nii.gz (in this case, the fixed image, test2.nii.gz (the moving image), and the two images ’checkerboarded’ together to the right. To register test2.nii.gz to test.nii.gz, you can use the following command:

BRAINSFit --fixedVolume test.nii.gz \
--movingVolume test2.nii.gz \
--outputVolume registered.nii.gz \
--transformType Affine

A representative slice of the registered results image registered.nii.gz is to the right. You can see from the Checkerboard of the Fixed and Registered images that the fit is quite good with Affine transform-based registration. The blurring of the registered images is a consequence of the initial scaling used in generating the moving image from the fixed image, compounded by the interpolation necessitated by the transform operation.

You can see the differences in results if you re-run BRAINSFit using Rigid, ScaleVersor3D, or ScaleSkewVersor3D as the ----transformType parameter. In this case, the authors judged Affine the best method for registering these particular two images; in the BRAINS2 automated processing pipeline, Rigid usually works well for registering research scans.

Quick Tour of Features and Use

A list panels in the interface, their features, what they mean, and how to use them. For instance:

  • Input Parameters
    • Fixed Image Volume: The fixed image for registration by mutual information optimization.
    • MovingImage Volume: The moving image for registration by mutual information optimization.
    • Registration Class: Specifies one of the five supported transform types. The valid types are, (R)Rigid, (R+S)ScaleVersor3D, (R+S+S)ScaleSkewVersor 3D, (A)Affine, (BS)BSpline, (O)ther. Note that registration proceeds from the lowest parameter dimension upto the parameter type choosen. Selecting BS for registrationClass has the same effect as setting transformType to "Rigid,ScaleVersor3D,ScaleSkewVersor3D,Affine,BSpline". Set to (O)ther when using the more flexible Transform Type flag under Registration Parameters settings.
  • Output Settings (At least one must be specified)
    • SlicerBSplineTransform: (optional) Filename to which save the estimated transform. NOTE: You must set at least one output object (either a deformed image or a transform. NOTE: USE THIS ONLY IF THE FINAL TRANSFORM IS BSpline
    • Slicer Linear Transform: (optional) Filename to which save the estimated transform. NOTE: You must set at least one output object (either a deformed image or a transform. NOTE: USE THIS ONLY IF THE FINAL TRANSFORM IS ---NOT--- BSpline
  • Transform Initialization Parameters
    • Initialize Transform Mode: Determine how to initialize the transform center. GeometryOn on assumes that the center of the voxel lattice of the images represent similar structures. MomentsOn assumes that the center of mass of the images represent similar structures. CenterOfHead attempts to use the top of head and shape of neck to drive a center of mass estimate. Off assumes that the physical space of the images are close, and that centering in terms of the image Origins is a good starting point. This flag is mutually exclusive with the initialTransform flag. (default: Off)
    • Initial Tranform: Filename of transform used to initialize the registration.
  • Registration Parameters
    • Transform Type: One of the four rigid ITK 3D transform types -- or BSpline -- to use in parameter optimization descent. BRAINSFit always optimizes mutual information, but the kind of descent varies with the transform type. The valid types are, Rigid, ScaleVersor3D, ScaleSkewVersor3D, Affine, and BSpline. Specifiying more than one in a comma separated list will initialize the next stage with the previous results. (default: Rigid)
    • Number Of Iterations: The maximum number of iterations to try before failing to converge. Use an explicit limit like 500 or 1000 to manage risk of divergence. (default: 1500)
    • Number Of Samples: The number of voxels sampled for mutual information computation. Increase this for a slower, more careful fit. You can also limit the sampling focus with ROI masks and ROIAUTO mask generation. (default: 100000)
    • Minimum Step Size: Each step in the optimization takes steps at least this big. When none are possible, registration is complete. (default: 0.005)
    • Tranform Scale: How much to scale up changes in position compared to unit rotational changes in radians -- decrease this to put more rotation in the search pattern. (default: 1000)
    • Re-proportion Scale: ScaleVersor3D 'Scale' compensation factor. Increase this to put more rescaling in a ScaleVersor3D or ScaleSkewVersor3D search pattern. 1.0 works well with a translationScale of 1000.
    • Skew Scale: ScaleSkewVersor3D Skew compensation factor. Increase this to put more skew in a ScaleSkewVersor3D search pattern. 1.0 works well with a translationScale of 1000.
    • Number Of Grid Subdivisions: The number of subdivisions of the BSpline Grid to be centered on the image space. Each dimension must have at least 3 subdivisions for the BSpline to be correctly computed.
    • Maximum B-SPline Displacement: Sets the maximum allowed displacements in image physical coordinates for BSpline control grid along each axis. A value of 0.0 indicates that the problem should be unbounded. NOTE: This only constrains the BSpline portion, and does not limit the displacement from the associated bulk transform. This can lead to a substantial reduction in computation time in the BSpline optimizer.
  • Control of Mask Processing
    • Mask Processing Mode:What mode to use for using the masks. If ROIAUTO is choosen, then the mask is implicitly defined using a otsu forground and hole filling algorithm. The Region Of Interest mode (choose ROI) uses the masks to define what parts of the image should be used for computing the transform.
    • Output Fixed Mask: Computed mask for Fixed Image (ROIAUTO Mode only)
    • Output Movming Mask: Computed mask for Moving Image (ROIAUTO Mode only)
    • Input Fixed Mask: Fixed Image Mask (ROI only)
    • Input Moving Mask: Moving Image Mask (ROI Only)
User Interface
    • Infererior Cut Off From Center: the cut-off below the image centers, in millimeters, (default: 1000)

Development

Notes from the Developer(s)

Dependencies

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

Tests

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

Acknowledgment

Include funding and other support here.

References

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