Modules:BRAINSDemonWarp

Module Name

MyModule

User Interface

General Information

Module Type & Category

Type: CLI

Category: Registration

Authors, Collaborators & Contact

Author: This tool was developed by Hans J. Johnson and Greg Harris.

Contributors: The development of this tool was supported by funding from grants NS050568 and NS40068 from the National Institute of Neurological Disorders and Stroke and grants MH31593, MH40856, from the National Institute of Mental Health.

Module Description

Usage

The module registers the template (moving) image onto the physical space of the target (fixed) image. The resultant deformation fields and metric values can be written to a file. The program uses the Insight Toolkit (www.ITK.org) for all the computations, and can operate on any of the image file types supported by that library.

Use Cases, Examples

The inputs to the BrainDemonsWarp program are the target image, the template image and the optional parameters. These parameters define the arguments for histogram matching and multi resolution registration. The outputs are the deformation field, output image, checkerboard image of the output and the fixed image and the x,y,z displacement vectors. If we specify debug option we can get the outputs at different stages. The filter is templated over the input image type, real image type and the output image types. We implement the algorithm by parsing the input, preprocessing them and registering the processed images.

Parsing - The images are initialized by the ValidationInputParser. This function reads in the arguments from the parameter file. It sets the histogram bins, match points, number of levels in the multi resolution registration, shrink factors and number of iterations at each levels. If the orientations of the images are different it sets the orientation of the moving image to that of the fixed image.

PreProcessing - In the next step the DemonsPreProcessor preprocesses the images by resampling the template image to target image space. The intensity mismatch problem is solved by histogram matching the images. Histogram matching is done only if the command line option -e is set. ItkHistogramMatchingImageFilter is used to perform this function. Another important step in preprocessing is skull stripping. Skull stripping is done only if the command line option -maskProcessingMode is set to BOBF. We have written an itk filter, named itkBOBFFilter for this purpose. This filter takes in an input image and a whole brain mask and outputs a Brain Only Background Filled(BOBF) image. The non-brain parts in the image are filled with the user specified background value. All computations are performed in the precision of ﬂoat data.

Registration - The resulting moving Image and the fixed image are given as inputs to the demons registrator.It uses the MultiResolutionPDEDeformableRegistration filter with NN extrapolation as interpolator and implements the demons deformable algorithm by computing the deformation field which will map a moving image onto a fixed image. It is assumed that the vector elements behave like ﬂoating point scalars. Each vector in the deformation field represent the distance between a geometric point in the input space and a point in the output space. The output image is generated by warping the input image with the deformation field using the ItkWarpImageFilter. WarpImageFilter warps an existing image with respect to a given deformation field. Typically the mapped position does not correspond to an integer pixel position in the input image. Interpolation via an image function is used to compute values at non-integer positions. We have used the LinearInterpolateImageFunction for our application. To write the output image we cast the image to the user specified output pixel type.

Deformation field smoothing sigma [--smoothDeformationFieldSigma][-s]: A gaussian smoothing value to be applied to the deformation feild at each iteration.

Pyramid Levels [--numberOfPyramidLevels][-n]: Number of image pyramid levels to use in the multi-resolution registration.

Moving Shrink Factors [--minimumFixedPyramid]: The shrink factor for the first level of the fixed image pyramid. (i.e. start at 1/16 scale, then 1/8, then 1/4, then 1/2, and finally full scale)

Moving Shrink Factors [--minimumMovingPyramid]: The shrink factor for the first level of the moving image pyramid. (i.e. start at 1/16 scale, then 1/8, then 1/4, then 1/2, and finally full scale)

the iteration count for each pyramid level [--arrayOfPyramidLevelIterations][-i]: The number of iterations for each pyramid level

Input image pre-processing options Operations to perform on the images before starting the registration.

Histogram Match [--histogramMatch][-e]: Histogram Match the input images. This is suitable for images of the same modality that may have different absolute scales, but the same overall intensity profile.

Number of histogram bins to use in histogramMatch [--numberOfHistogramBins]: The number of histogram levels

Number of Match Points [--numberOfMatchPoints]: The number of match points for histrogramMatch

Median Filter Size [--medianFilterSize]: Median filter radius in all 3 directions. When images have a lot of salt and pepper noise, this step can improve the registration.

Deformation field initialziation Options for initializing the deformation field.

Mask Processing Mode [--maskProcessingMode]: What mode to use for using the masks: NOMASK|ROIAUTO|ROI|BOBF. If ROIAUTO is choosen, then the mask is implicitly defined using a otsu forground and hole filling algorithm. Where the Region Of Interest mode uses the masks to define what parts of the image should be used for computing the deformation field. Brain Only Background Fill uses the masks to pre-process the input images by clipping and filling in the background with a predefined value.

Output Checkerboard Volume [--outputCheckerboardVolume]: Genete a checkerboard image volume between the fixedVolume and the deformed movingVolume.

Checkerboard Pattern Subdivisions [--checkerboardPatternSubdivisions]: Number of Checkerboard subdivisions in all 3 directions

Warp Normalized Images [--outputNormalized]: Flag to warp and write the normalized images to output. In normalized images the image values are fit-scaled to be between 0 and the maximum storage type value.

Development

Notes from the Developer(s)

Dependencies

Tests

Usability issues

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

More Information

Acknowledgment

The development of this tool was supported by funding from grants NS050568 and NS40068 from the National Institute of Neurological Disorders and Stroke and grants MH31593, MH40856, from the National Institute of Mental Health.