Difference between revisions of "Modules:BRAINSFit"
Hjmjohnson (talk | contribs) |
Hjmjohnson (talk | contribs) |
||
Line 74: | Line 74: | ||
{| | {| | ||
| | | | ||
− | * | + | *Input Parameters |
**Fixed Image Volume: The fixed image for registration by mutual information optimization. | **Fixed Image Volume: The fixed image for registration by mutual information optimization. | ||
**MovingImage Volume: The moving 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. |
− | *Transform | + | |
+ | *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) | **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. | **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 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) | **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) | ||
Line 91: | Line 97: | ||
**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. | **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. | **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 | *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. | **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. | ||
Line 99: | Line 106: | ||
|[[Image:BRAINSFitUI.png|thumb|280px|User Interface]] | |[[Image:BRAINSFitUI.png|thumb|280px|User Interface]] | ||
|} | |} | ||
+ | |||
+ | ** Infererior Cut Off From Center: the cut-off below the image centers, in millimeters, (default: 1000) | ||
== Development == | == Development == |
Revision as of 19:31, 4 June 2010
Home < Modules:BRAINSFitReturn to Slicer 3.6 Documentation
Module Name
BRAINSFit
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 uiowa.edu
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,
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.
- Extensive testing as part of the BRAINS2 application suite, determined reasonable defaults for registration algorithm parameters. http://testing.psychiatry.uiowa.edu/CDash/
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:
|
- 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.