Difference between revisions of "Registration:Resampling"
Line 20: | Line 20: | ||
*The [[Modules:ResampleVolumeBatch-Documentation-3.4|'''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 [[Modules:ResampleVolumeBatch-Documentation-3.4|'''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 [[Modules:CastImage-Documentation-3.6|'''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 [[Modules:CastImage-Documentation-3.6|'''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 [[Modules:DiffusionTensorEstimation-Documentation-3.6|'''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 [[Modules:DiffusionTensorEstimation-Documentation-3.6|'''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 [[Modules:Model_Into_Label_Volume_Documentation-3.6|'''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 [[Modules:Model_Into_Label_Volume_Documentation-3.6|'''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 [[Modules:OrientImages-Documentation-3.6|'''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 [[Modules:OrientImages-Documentation-3.6|'''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 [[Modules:Volumes-Documentation-3.6|'''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 [[Modules:ResampleVolume-Documentation-3.6|Resample Scalar Volume]] module described above. | |
− | |||
= Resampling via a spatial transform = | = Resampling via a spatial transform = | ||
*The [[Modules:ResampleScalarVectorDWIVolume-Documentation-3.6|'''Resample ResampleScalarVectorDWIVolume''']] Module sends both scalar and vector images through a transform. Several interpolation options. | *The [[Modules:ResampleScalarVectorDWIVolume-Documentation-3.6|'''Resample ResampleScalarVectorDWIVolume''']] 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 [[Modules:Data-Documentation-3.6|'''Data''' Module]] can also be used to resample an image or fiducial set through a '''linear''' transform. | *The ''Harden Transforms'' function (context menu via the right mouse button) in the [[Modules:Data-Documentation-3.6|'''Data''' Module]] can also be used to resample an image or fiducial set through a '''linear''' transform. | ||
+ | *The main registration modules ( [[Modules:AffineRegistration-Documentation-3.4|''Affine Registration'']], [[Modules:RegisterImages-Documentation-3.4|Expert Pipeline Registration]], [[Modules:DeformableB-SplineRegistration-Documentation-3.4|'''Deformable B-Spline Registration''']], [[Modules:RegisterImagesMultiRes-Documentation-3.6|''Multires Affine Registration'']], [[Modules:DemonsRegistration-Documentation-3.5|''Demons Non-rigid Registration'' ]] , [[Modules:PythonSurfaceICPRegistration-Documentation-3.4|'''Surface Registration''' ]], | ||
+ | |||
+ | modules all 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 output size or voxel size), select the registration module's option use the dedicated module desrcribed above. | ||
+ | Module performs automated registration of surfaces (not images). This is useful if image data directly is unreliable, but surfaces can be produced from segmentations that provide good information about desired alignment. | ||
+ | *'''fiducials:''' The [[Modules:FiducialRegistration |'''Fiducial Alignment''']] Module can align images based on pairs of manually selected fiducial points (rigid and affine). Two sets of fiducials (fiducial lists) are required, forming matching pairs to be aligned. See ''Fiducials'' module below. | ||
+ | |||
+ | = <small><small>looking for</small></small> Brain [[Image:Registration_HLogo_Brain.png| 70px]] = | ||
+ | *The [[Modules:RealignVolume-Documentation-3.4|'''ACPC Transform''']] Module is used to orient '''brain''' images along predefined anatomical landmarks: (manually defined) fiducials for the inter-hemispheral midline, anterior- and posterior commissure are used to align an image such that these landmarks become vertical and horizontal, respectively. | ||
+ | *BrainsDemon | ||
+ | *BrainsMush | ||
+ | *BrainsFit | ||
+ | *The [http://na-mic.org/Wiki/index.php/2010_Winter_Project_Week_HAMMER '''HAMMER'''] Module performs elastic (non-rigid) alignment of '''brain''' images of different individuals based on tissue class segmentation and intensity (experimental stage). | ||
+ | * | ||
+ | |||
+ | |||
+ | |||
= Resampling Vector- and Tensor-Data = | = Resampling Vector- and Tensor-Data = |
Revision as of 16:39, 3 May 2010
Home < Registration:ResamplingContents
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. |
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 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 ResampleScalarVectorDWIVolume 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 main registration modules ( Affine Registration, Expert Pipeline Registration, Deformable B-Spline Registration, Multires Affine Registration, Demons Non-rigid Registration , Surface Registration ,
modules all 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 output size or voxel size), select the registration module's option use the dedicated module desrcribed above.
Module performs automated registration of surfaces (not images). This is useful if image data directly is unreliable, but surfaces can be produced from segmentations that provide good information about desired alignment.
- fiducials: The Fiducial Alignment Module can align images based on pairs of manually selected fiducial points (rigid and affine). Two sets of fiducials (fiducial lists) are required, forming matching pairs to be aligned. See Fiducials module below.
looking for Brain
- The ACPC Transform Module is used to orient brain images along predefined anatomical landmarks: (manually defined) fiducials for the inter-hemispheral midline, anterior- and posterior commissure are used to align an image such that these landmarks become vertical and horizontal, respectively.
- BrainsDemon
- BrainsMush
- BrainsFit
- The HAMMER Module performs elastic (non-rigid) alignment of brain images of different individuals based on tissue class segmentation and intensity (experimental stage).
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