Registration:Resampling

From Slicer Wiki
Jump to: navigation, search
Home < Registration:Resampling


Resampling in 3D Slicer

Several distinct tools are available within 3D Slicer for resampling image data to change orientation, resolution or field of view. The organization below is intended to help you choose the best module for your task

Note that there are also many related functions that change aspects of the image without requiring a resampling, e.g. changing the aspect ratio or slice view orientation. They are listed in a separate category below.
If you find something amiss, please let us know so we can amend (meier at bwh.harvard.edu).

Slicer Registration Case Library: Call for Example Datasets

Consider adding your case to the library: If your resampling task is related to a registration problem, we can (for 2010-2011) offer you direct consulting: If we can add your (anonymized) case to the Library, we will assist you with registering/resampling by processing your case and providing step-by-step instructions and best-practice tips. See here for details.

What we mean by Resampling

Resampling builds a new dataset (image, surface, fiducials etc.) from an existing one, but with a different orientation, resolution, field of view or aspect ratio. For example the last step in registering two images consists of two main steps: finding the transform and resampling according to this transform. So the last step in registration will be to resample the moving data according to a spatial transform function, and thereby generate a new and aligned image. Or changing the voxel size to something larger or smaller involves resampling. See Wikipedia for a more detailed definition.
Interpolation is the process of estimating the value of the data based on surrounding values. This is necessary because spatial realignment is unlikely to be in exact multiples of voxel sizes. Please pay attention to selecting the proper interpolation method for your data-type. For more detail on interpolation we recommend this Wikipedia article.


Resampling Decision Matrix


Resampling decision matrix, use to find the appropriate resampling tool given your input-data and desired functionality. Note that some modules listed, although performing functions related to resampling, do not produce an output volume.

Resampling in Place: Change Resolution or Field of View

  • The Crop Volume module lets you clip away the image data outside an interactively defined 3D box. Such cropping is very useful to focus automated processing (e.g. registration, segmentation) onto a region of interest or reduce memory usage and speed up performance. The cropping includes a resampling that allows to change the resolution (spacing) of the result image at the same time.
  • The Resample Scalar Volume module changes resolution (spacing) of an image, allowing several interpolation options for different data types. This is the method of choice if you wish to increase or decrease the number of voxels per mm or make the voxel size isotropic. You need to specify the desired voxel size in mm. If you do not know the current voxel size of your image, go to the Info tab in the Volumes module.
  • The Resample Scalar Volume Batch Make module is the batch version of the above Resample Scalar Volume module. Use this if you have many image files that need to have their resolution changed/adjusted. The new resampled images will be written back out to a specified directory.
  • The Cast Image module lets you change the underlying datatype of your image, e.g. change from floating point to an integer or vice versa. This will not perform an interpolation, since the number of image voxels stays the same, but may be necessary to prepare the image for some modules or to reduce the image (file) size. For example an image stored as float will need twice as much disk space than one stored as short and four times as much as a char.
  • The Diffusion Tensor Estimation module will produce a new tensor image from raw diffusion (DWI) MRI. The new volume will be in the same orientation and resolution as the input DWI. There are three estimation methods available: least squares, weigthed least squares and non-linear estimation.
  • The Model Into Label Volume module will do the inverse of the Model Maker and generate a binary 3D labelmap image with non-zero values at the location of the surface. This will let you bring the information from surface models back into an implicit image format. You set the resampling options, i.e. the resolution of the result via a reference image. Note that it will not fill a closed model, but produce points at the surface only.
  • The Orient Images module will sample the image data along a specified orientation scheme, such as axial/sagittal/coronal planes or RAS or LPI etc. Note that the slices are not interpolated, they are just reordered and/or permuted. The resulting volume will cover the original volume. Because the display is in physical space, you will not see an effect of this resampling in the viewer.
  • The Volumes module lets you adjust the physical voxel size of an image (Info Tab), but will not generate a new volume. The changes will take effect immediately and you should see adjustments in your slice views. To obtain a new resampled volume, use the Resample Scalar Volume module described above.

Resampling via a spatial transform

  • The Resample Scalar/Vector/DWI Volume Module sends both scalar and vector images through a transform. Several interpolation options.
  • The Harden Transforms function (context menu via the right mouse button) in the Data Module can also be used to resample an image or fiducial set through a linear transform.
  • The AC-PC Transform module lets you realign your brain image along the anterior-posterior commissure and interhemispheral midline. You (manually) select fiducials to define these points. An output transform is generated that you can then apply to the image using the resampling tools described here.
  • The main registration modules ( Affine Registration, Expert Pipeline Registration, Deformable B-Spline Registration, Multires Affine Registration, Surface Registration, Fiducial Alignment etc. modules all contain a resampling option, i.e. they offer to produce a direct result volume, which includes a resampling step. In most cases the interpolation is linear. If you wish for more control over how the resampling is performed (e.g. select a different interpolator or output size or voxel size), select the registration module's option to generate an output/saved transform and then use one of the dedicated resampling modules described here to generate the new volume. The exception are modules which do not (yet) offer a transform output (e.g. Fast Nonrigid BSpline); for those you must use the module-specific resampling options to generate a result image.

Resampling Vector- and Tensor-Data

  • The Resample ResampleScalarVectorDWIVolume Module is the method of choice to realign vector or tensor data, such as DTI along a given transform. It supports both linear and nonlinear transforms as well as deformation fields. Note that simply sending each component of the vector or tensor through the transform separately would yield an incorrect result. This module will transform the vector/tensor data correctly.
  • The Resample DTI Volume module is designed specifically for moving diffusion tensor MRI data. It supports both linear and nonlinear transforms as well as deformation fields. Note that simply sending each component of the DTI tensor through the transform separately would yield an incorrect result. This module will transform the vector/tensor data correctly.

Resampling Surface- and Model-Data

  • The Model Transform Module reorients your surface model based on a transform. It creates a new model which is a transformed version of the input polygonal model