Difference between revisions of "Modules:RegisterImages-Documentation-3.4"
m (Text replacement - "\[http:\/\/www\.slicer\.org\/slicerWiki\/index\.php\/([^ ]+) ([^]]+)]" to "$2") |
|||
(30 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
[[Documentation-3.4|Return to Slicer 3.4 Documentation]] | [[Documentation-3.4|Return to Slicer 3.4 Documentation]] | ||
− | + | ||
− | === | + | [[Announcements:Slicer3.4#Highlights|Gallery of New Features]] |
− | + | ===Register Images=== | |
{| | {| | ||
− | |[[Image:RegisterImagesOverview.png|thumb|280px|Before]] | + | |[[Image:RegisterImagesOverview.png|thumb|280px|Before <br> Two [[Modules:Color-Documentation-3.4#Module_Description|LUTs]] are used to display the two volumes]] |
− | |[[Image: | + | |[[Image:RegisterImageRunning.png|thumb|280px|During <br> Note that both cores run at full capacity]] |
− | |[[Image: | + | |- |
+ | |[[Image:B-spline-reg.png|thumb|280px|After <br> Fixed data set with red, moving with blue LUT.]] | ||
+ | |[[Image:B-spline-reg-detail.png|thumb|280px|After <br> Moving versus Resampled <br> Demonstration of the extent of deformation<br>grid spacing = 60 pixels, 4 core machine, <br>9GB memory footprint, roughly 1.5 hours<br>volume=512x512x472]] | ||
|} | |} | ||
Line 19: | Line 21: | ||
===Authors, Collaborators & Contact=== | ===Authors, Collaborators & Contact=== | ||
* Author1: Stephen Aylward, Kitware | * Author1: Stephen Aylward, Kitware | ||
+ | * Author2: Casey Goodlett, Kitware | ||
* Contributor1: Ron Kikinis (copying documentation) | * Contributor1: Ron Kikinis (copying documentation) | ||
− | * Contact: | + | * Contact: Casey Goodlett, Kitware |
===Module Description=== | ===Module Description=== | ||
Line 42: | Line 45: | ||
== Usage == | == Usage == | ||
+ | * If you have a large data set or little memory, [[Modules:RegisterImages-Documentation-3.4#Advaned_Registration_Parameters_Tab|select the minimize memory option]] | ||
+ | * If you are planning to use the b-spline registration, be sure to read the [[Modules:RegisterImages-Documentation-3.4#Advanced_BSpline_Parameters|discussion of parameter setting]] in the section below. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
===Quick Tour of Features and Use=== | ===Quick Tour of Features and Use=== | ||
Line 58: | Line 58: | ||
* In some cases (e.g. unusual acquisition conditions and/or highly inconsistent acquisition protocols) you will need to change the default parameters. | * In some cases (e.g. unusual acquisition conditions and/or highly inconsistent acquisition protocols) you will need to change the default parameters. | ||
* In other situations, you may wish to tweak parameters to achieve your application-specific speed-vs-accuracy trade-off | * In other situations, you may wish to tweak parameters to achieve your application-specific speed-vs-accuracy trade-off | ||
− | === | + | |
− | + | See also [http://www.na-mic.org/Wiki/index.php/ITK_Registration_Optimization this page on the NA-MIC wiki about parameter tuning for this module]. | |
− | + | ||
+ | ===Overview=== | ||
+ | * Step 1: Loaded transform | ||
** You may load a pre-computed transform to initialize the registration. | ** You may load a pre-computed transform to initialize the registration. | ||
** If one is loaded, it is immediately applied (i.e., the moving image is resampled) | ** If one is loaded, it is immediately applied (i.e., the moving image is resampled) | ||
Line 87: | Line 89: | ||
*** PipelineBSpline | *** PipelineBSpline | ||
**** computes a rigid transform (initialized using the results from the initial registration), uses those results to initialize and compute an affine transform, and then applies it to the loaded registrations, THEN computes and applies a BSpline transform | **** computes a rigid transform (initialized using the results from the initial registration), uses those results to initialize and compute an affine transform, and then applies it to the loaded registrations, THEN computes and applies a BSpline transform | ||
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Detailed Information== | ==Detailed Information== | ||
Line 104: | Line 96: | ||
=== IO Tab === | === IO Tab === | ||
{| | {| | ||
− | |* Set the fixed and moving images using images in the scene | + | | |
+ | * Set the fixed and moving images using images in the scene | ||
* Optionally set the ResampleImage to store the output image | * Optionally set the ResampleImage to store the output image | ||
** If not set, registration won't conduct the final resampling, saving computation time | ** If not set, registration won't conduct the final resampling, saving computation time | ||
|[[Image:RegisterImagesIO.png|thumb|380px| IO panel <br> Resample image is the resampled moving image.]] | |[[Image:RegisterImagesIO.png|thumb|380px| IO panel <br> Resample image is the resampled moving image.]] | ||
|} | |} | ||
− | |||
− | |||
=== Registration Parameters Tab === | === Registration Parameters Tab === | ||
{| | {| | ||
− | |* Load Transform | + | | |
+ | * Load Transform | ||
** provide the Loaded Transform for the loaded phase of registration | ** provide the Loaded Transform for the loaded phase of registration | ||
* Save Transform | * Save Transform | ||
Line 135: | Line 127: | ||
*** "Expected Scale" is for scaling during affine registration | *** "Expected Scale" is for scaling during affine registration | ||
*** "Expected Skew" is for skew for affine registration | *** "Expected Skew" is for skew for affine registration | ||
− | |[[Image:RegisterImagesGlobalParameters.png|thumb|380px| Global Parameters<br> This panel controls what will happen | + | |[[Image:RegisterImagesGlobalParameters.png|thumb|380px| Global Parameters<br> This panel controls what will happen overall.]] |
|} | |} | ||
+ | |||
=== Advaned Registration Parameters Tab === | === Advaned Registration Parameters Tab === | ||
{| | {| | ||
Line 161: | Line 154: | ||
=== Registration Testing Parameters === | === Registration Testing Parameters === | ||
+ | |||
+ | |||
+ | <big>'''The testing section exposes functionality for development and compilation. It should not be used in regular operation of Slicer.'''</big> | ||
{| | {| | ||
| | | | ||
Line 210: | Line 206: | ||
** Don't think about grid size - instead think about the level of detail that needs to be resolved (see discussion on sampling ratio). | ** Don't think about grid size - instead think about the level of detail that needs to be resolved (see discussion on sampling ratio). | ||
** When in doubt, turn on MinimizeMemory | ** When in doubt, turn on MinimizeMemory | ||
− | |[[Image: | + | |[[Image:RegisterImagesAdvancedBSplineParameters.png|thumb|380px|Advanced Parameters for B-Spline registration]] |
|} | |} | ||
+ | |||
+ | ==Use Cases== | ||
+ | === Example 2: Affine Registration === | ||
+ | |||
+ | * Task: | ||
+ | ** Affine registration of head MRI from two different subjects | ||
+ | * Data: | ||
+ | ** Using cases UNC-Healthy-Normal002 (fixed) and UNC-Healthy-Normal004 (moving) | ||
+ | ** Data provided by Dr. Bullitt at UNC. | ||
+ | ** Data is available from Kitware's MIDAS archive at http://hdl.handle.net/1926/542 | ||
+ | ** Data can be automatically downloaded into ${RegisterImages_BINARY_DIR}/Testing/Data directory by enabling the CMake variable "BUILD_REGISTER_IMAGES_REAL_WORLD_TESTING" | ||
+ | *** Warning this also enables additional tests that can take 4+ hours to complete. | ||
+ | *** To see the code for automatically downloading from MIDAS (via svn), see Slicer3/Applications/CLI/RegisterImagesModule/Applications/CMakeLists.txt | ||
+ | |||
+ | === Example 3: BSpline Registration === | ||
+ | |||
+ | * Task: | ||
+ | ** BSpline registration of head MRI from two different subjects | ||
+ | * Data: | ||
+ | ** Using cases UNC-Healthy-Normal002 (fixed) and UNC-Healthy-Normal004 (moving) | ||
+ | ** Data provided by Dr. Bullitt at UNC. | ||
+ | ** Data is available from Kitware's MIDAS archive at http://hdl.handle.net/1926/542 | ||
+ | ** Data can be automatically downloaded into ${RegisterImages_BINARY_DIR}/Testing/Data directory by enabling the CMake variable "BUILD_REGISTER_IMAGES_REAL_WORLD_TESTING" | ||
+ | *** Warning this also enables additional tests that can take 4+ hours to complete. | ||
+ | *** To see the code for automatically downloading from MIDAS (via svn), see Slicer3/Applications/CLI/RegisterImagesModule/Applications/CMakeLists.txt | ||
== Development == | == Development == | ||
Line 217: | Line 238: | ||
===Dependencies=== | ===Dependencies=== | ||
− | + | This module makes use of GenerateCLP, MRMLIO and ITK. | |
+ | * GenerateCLP is used to defined the command-line options. GenerateCLP is distributed with Slicer (/Libs/GenerateCLP). | ||
+ | * MRMLIO is used to replace reading/writing images in ITK to instead passing pointers to shared memory. MRMLIO is distributed with Slicer (/Libs/MRMLIO). | ||
+ | * ITK is used to provide the algorithms. ITK must be compiled with the CMake variables USE_REVIEW, USE_TRANSFORM_IO, and USE_OPTIMIZED_REGISTRATION_METHODS enabled. These options are automatically enabled when ITK is build using Slicer's getBuildTest.tcl script. | ||
===Known bugs=== | ===Known bugs=== | ||
− | + | * Module may fail (and not report a useful error to the console - check the log files) if insufficient memory is available. If so, please consider enabling the MinimizeMemory option in the Advanced Options tab. | |
− | |||
+ | Follow this [http://na-mic.org/Mantis/main_page.php link] to the Slicer3 bug tracker. | ||
===Usability issues=== | ===Usability issues=== | ||
Line 233: | Line 257: | ||
Customize following [http://viewvc.slicer.org/viewcvs.cgi/ links] for your module. | Customize following [http://viewvc.slicer.org/viewcvs.cgi/ links] for your module. | ||
− | [http://www.na-mic.org/Slicer/Documentation/Slicer3/html/ Links] to documentation generated by doxygen. | + | [http://www.na-mic.org/Slicer/Documentation/Slicer3-doc/html/ Links] to documentation generated by doxygen. |
− | |||
== More Information == | == More Information == | ||
Line 244: | Line 267: | ||
Publications related to this module go here. Links to pdfs would be useful. | Publications related to this module go here. Links to pdfs would be useful. | ||
*[[Media:Rigid registration of aligned images-03-2009.txt|some email about initialization]] | *[[Media:Rigid registration of aligned images-03-2009.txt|some email about initialization]] | ||
+ | *[http://www.na-mic.org/Wiki/index.php/ITK_Registration_Optimization ITK Registration optimization] | ||
+ | *[[Slicer3:LinearRegistrationUseCases|Slicer2 vs Slicer3 registration validation]] | ||
+ | *[http://www.batchmake.org/Wiki/Batchmake_slicer Using BatchMake with Slicer RegisterImages module] | ||
+ | |||
+ | ===Wishlist=== | ||
+ | *custom gui for creation of matched fiducials for fiducial based initialization | ||
+ | *using Slicer transforms for initialization | ||
+ | *output results of rigid, affine, b-spline either as transforms or as resampled volumes | ||
+ | *include moving filename into default names of results | ||
+ | *display fixed and moving results in compareview with proper LUTs (different colors for fixed and result, apply w/l from moving to results volume | ||
+ | *use in combination with VOI | ||
+ | *more detailed explanation of how to set parameters | ||
+ | *increase number of example solutions |
Latest revision as of 02:34, 27 November 2019
Home < Modules:RegisterImages-Documentation-3.4Return to Slicer 3.4 Documentation
Contents
Register Images
General Information
Module Type & Category
Type: CLI Module calling ITK functions
Category: Registration
Authors, Collaborators & Contact
- Author1: Stephen Aylward, Kitware
- Author2: Casey Goodlett, Kitware
- Contributor1: Ron Kikinis (copying documentation)
- Contact: Casey Goodlett, Kitware
Module Description
This Module is an integrated framework providing access to ITK registration technologies. Algorithms can be run in single mode or pipelined. Depending on the size of the data sets, a significant amount of memory is needed. There is an option to trade off speed for memory. Most of the code is parallelized and will take advantage of multicore capabilities, if available.
Major Features
The major features of the module include:
- Default parameters register many full-head and skull-stripped MRI: rigid, affine, and BSpline
- Offers a complete, pipeline-based registration solution
- Load and apply existing transforms
- Compute rigid, affine, and bspline transforms in sequence with a single command
- Intuitive parameters
- Instead of setting obscure "scales" for parameters, you set global values for "Expected Offset", "Expected Rotation", ... to indicate how much mis-registration is anticipated in the data being registered
- MinimizeMemory option provides a way to compute bspline registrations using a dense set of control points and a large number of samples on "normal" computers (albeit computation time increases)
- SampleFromOverlap option allows images of vastly different sizes to be registered
- Helps to avoid (but does not completely eliminate) the annoying ITK exception, "too many samples falls outside of the image"
- Incorporates testing
- Specify a baseline image, and modules will perform the requested registration, compare its results with the baseline image, and return success/failure
- Based on an extensible and re-usable class structure.
Usage
- If you have a large data set or little memory, select the minimize memory option
- If you are planning to use the b-spline registration, be sure to read the discussion of parameter setting in the section below.
Quick Tour of Features and Use
See here for more information.
Main Registration Panel
Parameter Choices
- The default parameters should work for a wide range of cases
- In some cases (e.g. unusual acquisition conditions and/or highly inconsistent acquisition protocols) you will need to change the default parameters.
- In other situations, you may wish to tweak parameters to achieve your application-specific speed-vs-accuracy trade-off
See also this page on the NA-MIC wiki about parameter tuning for this module.
Overview
- Step 1: Loaded transform
- You may load a pre-computed transform to initialize the registration.
- If one is loaded, it is immediately applied (i.e., the moving image is resampled)
- Step 2: Initial registration
- Options are:
- None (sets the center of rotation to the center of the moving image)
- Landmark (uses N-pairs of landmarks (passed as vectors) and a least-squared error metric to register the images using a rigid transform
- Image Centers (shifts the images to align their centers)
- Centers of Mass (shifts the images to align their centers of mass)
- Second Moments (shifts and rotates the images to align the 1st and 2nd moments)
- Options are:
- Step 3: Registration
- Options are:
- None (applies the loaded transforms)
- Initial
- computes and applies the initial transform to the loaded registrations)
- Rigid
- computes a rigid transform and then applies it to the loaded registrations
- Affine
- computes an affine transform and then applies it to the loaded registrations
- BSpline
- computes a bspline transform and then applies it to the loaded registrations
- PipelineRigid
- computes a rigid transform (initialized using the results from the initial registration) and then applies it to the loaded registrations
- PipelineAffine
- computes a rigid transform (initialized using the results from the initial registration), uses those results to initialize and compute an affine transform, and then applies it to the loaded registrations
- PipelineBSpline
- computes a rigid transform (initialized using the results from the initial registration), uses those results to initialize and compute an affine transform, and then applies it to the loaded registrations, THEN computes and applies a BSpline transform
- Options are:
Detailed Information
IO Tab
|
Registration Parameters Tab
|
Advaned Registration Parameters Tab
* Verbosity level
|
Registration Testing Parameters
The testing section exposes functionality for development and compilation. It should not be used in regular operation of Slicer.
|
Advanced Initial Registration Parameters
|
Advanaced Rigid and Affine Parameters
|
Advanced BSpline Parameters
|
Use Cases
Example 2: Affine Registration
- Task:
- Affine registration of head MRI from two different subjects
- Data:
- Using cases UNC-Healthy-Normal002 (fixed) and UNC-Healthy-Normal004 (moving)
- Data provided by Dr. Bullitt at UNC.
- Data is available from Kitware's MIDAS archive at http://hdl.handle.net/1926/542
- Data can be automatically downloaded into ${RegisterImages_BINARY_DIR}/Testing/Data directory by enabling the CMake variable "BUILD_REGISTER_IMAGES_REAL_WORLD_TESTING"
- Warning this also enables additional tests that can take 4+ hours to complete.
- To see the code for automatically downloading from MIDAS (via svn), see Slicer3/Applications/CLI/RegisterImagesModule/Applications/CMakeLists.txt
Example 3: BSpline Registration
- Task:
- BSpline registration of head MRI from two different subjects
- Data:
- Using cases UNC-Healthy-Normal002 (fixed) and UNC-Healthy-Normal004 (moving)
- Data provided by Dr. Bullitt at UNC.
- Data is available from Kitware's MIDAS archive at http://hdl.handle.net/1926/542
- Data can be automatically downloaded into ${RegisterImages_BINARY_DIR}/Testing/Data directory by enabling the CMake variable "BUILD_REGISTER_IMAGES_REAL_WORLD_TESTING"
- Warning this also enables additional tests that can take 4+ hours to complete.
- To see the code for automatically downloading from MIDAS (via svn), see Slicer3/Applications/CLI/RegisterImagesModule/Applications/CMakeLists.txt
Development
Dependencies
This module makes use of GenerateCLP, MRMLIO and ITK.
- GenerateCLP is used to defined the command-line options. GenerateCLP is distributed with Slicer (/Libs/GenerateCLP).
- MRMLIO is used to replace reading/writing images in ITK to instead passing pointers to shared memory. MRMLIO is distributed with Slicer (/Libs/MRMLIO).
- ITK is used to provide the algorithms. ITK must be compiled with the CMake variables USE_REVIEW, USE_TRANSFORM_IO, and USE_OPTIMIZED_REGISTRATION_METHODS enabled. These options are automatically enabled when ITK is build using Slicer's getBuildTest.tcl script.
Known bugs
- Module may fail (and not report a useful error to the console - check the log files) if insufficient memory is available. If so, please consider enabling the MinimizeMemory option in the Advanced Options tab.
Follow this link to 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
Customize following links for your module.
Links to documentation generated by doxygen.
More Information
Acknowledgment
Include funding and other support here.
References
Publications related to this module go here. Links to pdfs would be useful.
- some email about initialization
- ITK Registration optimization
- Slicer2 vs Slicer3 registration validation
- Using BatchMake with Slicer RegisterImages module
Wishlist
- custom gui for creation of matched fiducials for fiducial based initialization
- using Slicer transforms for initialization
- output results of rigid, affine, b-spline either as transforms or as resampled volumes
- include moving filename into default names of results
- display fixed and moving results in compareview with proper LUTs (different colors for fixed and result, apply w/l from moving to results volume
- use in combination with VOI
- more detailed explanation of how to set parameters
- increase number of example solutions