Customizing the registration command¶
This page provides recommendations for how to adjust the registration commands if the default parameters are insufficient for your specific data and pipeline.
Because choosing the right configuration for your data can be overwhelming, feel free to visit the SCT forum where you can ask for clarification and guidance.
-param argument is used to specify the transformations that are applied at each step of the registration process. The easiest way to use
-param is to start with the default values, and adjust one parameter at a time.
# Default values for '-param'. (Note: Normally, this would be written as one line, but a line break was added for readability.) -param step=1,type=imseg,algo=centermassrot,metric=MeanSquares,iter=10,smooth=0,gradStep=0.5,slicewise=0,smoothWarpXY=2,pca_eigenratio_th=1.6: step=2,type=seg,algo=bsplinesyn,metric=MeanSquares,iter=3,smooth=1,gradStep=0.5,slicewise=0,smoothWarpXY=2,pca_eigenratio_th=1.6
Step 1 and step 2 can be modified, and additional steps can be added. In general, we recommend that you start with coarse-adjustment steps, then apply finer adjustments with each successive step.
This parameter determines the type of nonrigid deformation to apply to the spinal cord at each step.
Axial (X-Y) translation.
Axial (X-Y) translation + rotation about the Z axis.
Axial (X-Y) translation + rotation about the Z axis + axial (X-Y) scaling.
B-Spline regularized form of SyN provided by ANTs.
Slice-by-slice axial (X-Y) translation, regularized along the Z axis. This can be used as both an initial alignment of a segmented cord centerline, or to align the centers of two images that are already close.
An alignment of the center of mass of the segmented cord with the center of mass of the template. Similar to
algo=slicereg, but also includes rotation, to account for a turned cord due to e.g. compression on one side of the cord.
This transformation involves a multi-step scaling operation with a much greater degree of freedom, so it is useful for highly compressed cords.
This parameter controls the type of data used for registration.
Use the input anatomical image.
Use a separate segmentation image. Choose this if your image data contains distortions or artifacts, but you are confident in your segmentation. (For example, if you have manually corrected the segmentation.)
Use both the input image and a segmentation. Only for use with
This parameter determines which similarity metric is used to match the vertebral levels between the anatomical image and the template.
Cross-correlation. Intensity-based comparison with a small amount of normalization. It is quite accurate, but takes longer to process compared to other approaches.
Mutual information. Entropy-based comparison. This method is faster overall, but requires large images to perform well. Cannot be used with
Intensity-based comparison. Can only be used on images with the same intensity range. Should be used with
This parameter controls whether or not transformations should be computed on a slice-by-slice basis:
Apply deformations on a slice-by-slice basis.
Regularize transformations across the Z axis.
-ref lets you select the destination for registration: either the template (default) or the subject’s native space.
The subject will be registered to the template space, causing the anatomical image to be straightened. This method should be used by default.
With this setting, the template will be registered to the subject space (which does not require straightening). Use this approach if your image is acquired axially with highly anisotropic resolution (e.g. 0.7x0.7x5mm), because the straightening step can produce through-plane interpolation errors for thick slices.
This argument is used to specify disc labels, rather than vertebral body labels. Vertebral body labels work well if you are only interested in a relatively small region (e.g. C2 —> C7). However, there are two main cases where you would want to instead use
- Large field of view
If your volume spans a large superior-inferior length (e.g., C2 —> L1), the linear scaling between your subject and the template might produce inaccurate vertebral level matching between C2 and L1. In that case, you might prefer to rely on all intervertebral discs for a more accurate registration.
- Tiny field of view
Conversely, if you have a very small field of view (e.g., covering only C3/C4), you can create a unique label at disc C3/C4 (value=4) and use
-ldiscfor registration. In that case, a single translation (no scaling) will be performed between the template and the subject.
If more than 2 labels are provided,
-ldisc is not compatible with
-ref subject. For more information, please see the help: sct_register_to_template -h