Difference between revisions of "Projects:SlicerFAQ:RegistrationAdjust"

From NAMIC Wiki
Jump to: navigation, search
(Created page with '*back to Slicer FAQ = Two Images are far apart and do not overlap at all when viewed in Slicer = *'''Problem:''' when you place one image in the backgro…')
 
Line 1: Line 1:
 
*[[Projects:SlicerFAQ|back to Slicer FAQ]]
 
*[[Projects:SlicerFAQ|back to Slicer FAQ]]
  
= Two Images are far apart and do not overlap at all when viewed in Slicer =
+
= Can I manually adjust or correct a registration?  =
*'''Problem:''' when you place one image in the background and another in the foreground, the one in the foreground will not be visible (entirely) when switching bak & forth
+
*'''Problem:''' obtained registration is insufficient
 +
*'''Explanation:'' The automated registration algorithms (except for  fiducial and surface registration) in Slicer operate on image intensity and try to move images so that similar image content is aligned. This is influenced by many factors such as image contrast, resolution, voxel anisotropy, artifacts such as motion or intensity inhomogeneity, pathology etc, the initial misalignment and the parameters selected for the registration.
 +
*'''Fix:''' you can adjust/correct an obtained registration manually, within limits. As outlined below. Your first try however should be to obtain a better automated registration by changing some of the input and/parameters and then re-run.
 +
**'''Rerun Automated Registration''':
 +
***most helpful to determine the secondary approach is to know why the first one was likely to fail. Below a list of possible reasons and the remedy:
 +
***too much initial misalignment: particularly rotation can be difficult for automated registration to capture. If the two images have strong rotational misalignment, consider A) one of the initialization options (e.g. BRAINSFIT or [http://www.slicer.org/slicerWiki/index.php/Modules:RegisterImages-Documentation-3.6 Expert Automated]), B) a manual initial alignment using the ''Transforms'' module and then use this as initialization input
 +
***insufficient detail: consider increasing the number of sample points used for the registration, depending on time/speed constraints, increase to 5-10% of image size.
 +
***insufficient contrast: consider adjusting the ''Histogram Bins'' (where avail.) to tune the algorithm to weigh small intensity variations more or less heavily
 +
***strong anisotropy: if one or both of the images have strong voxel anisotropy of ratios 5 or more, rotational alignment may become increasingly difficult for an automated method. Consider increasing the sample points and reducing the ''Histogram Bins''.  In extreme cases you may need to switch to a manual or fiducial-based approach
 +
***distracting image content: pathology, strong edges, clipped FOV with image content at the border of the image can easily dominate the cost function driving the registration algorithm. '''Masking''' is a powerful remedy for this problem: create a mask (binary labelmap/segmentation) that excludes the distracting parts and includes only those areas of the image where matching content exists. This requires one of the modules that supports masking input, such as: [http://www.slicer.org/slicerWiki/index.php/Modules:BRAINSFit BRAINSFit], [http://www.slicer.org/slicerWiki/index.php/Modules:RegisterImages-Documentation-3.6 ExpertAutomated], [http://www.slicer.org/slicerWiki/index.php/Modules:RegisterImagesMultiRes-Documentation-3.6 Multi Resolution]. Next best thing to use with modules that do not support masking is to mask the image manually and create a temporary masked image where the excluded content is set to 0 intensity; the ''Mask Volume'' module performs this task
 +
***too many/too few DOF: the degrees of freedom (DOF) determine how much motion is allowed for the image to be registered. Too few DOF results in suboptimal alignment; too many DOF can result in overfitting or the algorithm getting stuck in local extrema, or a bad fit with some local detail matched but the rest misaligned.  Consider a stepwise approach where the DOF are gradually increased. [http://www.slicer.org/slicerWiki/index.php/Modules:BRAINSFit BRAINSfit] and [http://www.slicer.org/slicerWiki/index.php/Modules:RegisterImages-Documentation-3.6 Expert Automated] provide such pipelines; or you can nest the transforms manually. A multi-resolution approach can also greatly benefit difficult registration challenges: this scheme runs multiple registrations at increasing amounts of image detail. The [http://www.slicer.org/slicerWiki/index.php/Modules:RegisterImagesMultiRes-Documentation-3.6 Robust Multiresolution module] performs this task.
 +
 
 +
***inapropriate algorithm: there are many different
 +
**'Manual Adjustment'': If the transform is linear, i.e. a rigid or affine transform, you can access the rigid components (translation and rotation) of that transform via the [http://www.slicer.org/slicerWiki/index.php/Modules:Transforms-Documentation-3.6 Transforms module].
 +
#In the ''Data'' module, drag the image volume inside the registration transform node
 +
#Select the views so that the volume is displayed in the slice views
 +
#Go to the [http://www.slicer.org/slicerWiki/index.php/Modules:Transforms-Documentation-3.6 Transforms module] and adjust the translation and rotation sliders to adjust the current position. To get a finer degree of control, enter smaller numbers for the translation limits and enter rotation angles numerically in increments of a few degrees at a time
  
*'''Explanation:'''Slicer chooses the field of view (FOV) for the display based on the image selected for the background. The FOV will therefore be centered around what is defined in that image's origin. If two images have origins that differ significantly, they cannot be viewed well simultaneously.
 
*'''Fix:''' recenter one or both images as follows:
 
 
:1
 
:1

Revision as of 19:53, 11 November 2010

Home < Projects:SlicerFAQ:RegistrationAdjust

Can I manually adjust or correct a registration?

  • Problem: obtained registration is insufficient
  • 'Explanation: The automated registration algorithms (except for fiducial and surface registration) in Slicer operate on image intensity and try to move images so that similar image content is aligned. This is influenced by many factors such as image contrast, resolution, voxel anisotropy, artifacts such as motion or intensity inhomogeneity, pathology etc, the initial misalignment and the parameters selected for the registration.
  • Fix: you can adjust/correct an obtained registration manually, within limits. As outlined below. Your first try however should be to obtain a better automated registration by changing some of the input and/parameters and then re-run.
    • Rerun Automated Registration:
      • most helpful to determine the secondary approach is to know why the first one was likely to fail. Below a list of possible reasons and the remedy:
      • too much initial misalignment: particularly rotation can be difficult for automated registration to capture. If the two images have strong rotational misalignment, consider A) one of the initialization options (e.g. BRAINSFIT or Expert Automated), B) a manual initial alignment using the Transforms module and then use this as initialization input
      • insufficient detail: consider increasing the number of sample points used for the registration, depending on time/speed constraints, increase to 5-10% of image size.
      • insufficient contrast: consider adjusting the Histogram Bins (where avail.) to tune the algorithm to weigh small intensity variations more or less heavily
      • strong anisotropy: if one or both of the images have strong voxel anisotropy of ratios 5 or more, rotational alignment may become increasingly difficult for an automated method. Consider increasing the sample points and reducing the Histogram Bins. In extreme cases you may need to switch to a manual or fiducial-based approach
      • distracting image content: pathology, strong edges, clipped FOV with image content at the border of the image can easily dominate the cost function driving the registration algorithm. Masking is a powerful remedy for this problem: create a mask (binary labelmap/segmentation) that excludes the distracting parts and includes only those areas of the image where matching content exists. This requires one of the modules that supports masking input, such as: BRAINSFit, ExpertAutomated, Multi Resolution. Next best thing to use with modules that do not support masking is to mask the image manually and create a temporary masked image where the excluded content is set to 0 intensity; the Mask Volume module performs this task
      • too many/too few DOF: the degrees of freedom (DOF) determine how much motion is allowed for the image to be registered. Too few DOF results in suboptimal alignment; too many DOF can result in overfitting or the algorithm getting stuck in local extrema, or a bad fit with some local detail matched but the rest misaligned. Consider a stepwise approach where the DOF are gradually increased. BRAINSfit and Expert Automated provide such pipelines; or you can nest the transforms manually. A multi-resolution approach can also greatly benefit difficult registration challenges: this scheme runs multiple registrations at increasing amounts of image detail. The Robust Multiresolution module performs this task.
      • inapropriate algorithm: there are many different
    • 'Manual Adjustment: If the transform is linear, i.e. a rigid or affine transform, you can access the rigid components (translation and rotation) of that transform via the Transforms module.
  1. In the Data module, drag the image volume inside the registration transform node
  2. Select the views so that the volume is displayed in the slice views
  3. Go to the Transforms module and adjust the translation and rotation sliders to adjust the current position. To get a finer degree of control, enter smaller numbers for the translation limits and enter rotation angles numerically in increments of a few degrees at a time
1