Image Resampling¶
This algorithm resamples an image either with respect to another image or with respect to a specific dimension/spacing.
Input¶
The first input is the set of images which will be resampled. The optional second input is the reference image with respect to which the first input will be resampled.
Output¶
The resampled dataset if the parameter Create new
is set to true. Otherwise the input image is modified in-place.
Description¶
The algorithm has two different behaviours, depending on whether it has been created with one or two datasets.
- If a reference image has been selected (i.e. there are two inputs), the algorithm resamples the first image in the same configuration as the reference (same dimensions, spacing and matrices).
- Otherwise, the algorithm will resample the image with the same matrix but different dimensions and spacing, depending on the resampling mode. The user can specify the new dimensions of the image (either in target values or in percentage of the current ones) or its new spacing. Note that in the latter case, the spatial extent of the image might be not divisible by the target spacing; the parameter
Preserve Spatial Extent
allows to specify whether either the spatial extent or the target spacing should be adjusted.
Other parameters let you change the behaviour of the resampling:
Interpolation Mode
: The interpolation used during image resampling can be either based on nearest neighbor (faster but with artifacts) or linear interpolation.Reduction Mode
: In contrast to the interpolation mode, which affects how the value of the input image at a given (potentially fractional) coordinate is extracted, this determines what happens when multiple input pixels/voxels contribute to the value of a single output pixel/voxel. In Lookup mode, the value of the closest input pixel/voxel is used as-is. Alternatively, the Minimum, Maximum or Average value of the neighboring pixel/voxels can be used.Keep Zero Values
: This parameter should be used when parts of the image are unavailable and set to zero (e.g. in ultrasound images with a non-rectangular field of view), and prevents those zero values to be smoothed or interpolated with actual image content.Force CPU
: Normally, the algorithm uses the GPU to perform the operation if the image already resides on the GPU. This option forces the algorithm to download the image to main memory and perform the operation with the CPU (which is significantly slower).