linumpy.gpu.interpolation#
GPU-accelerated interpolation and resampling operations for linumpy.
Provides GPU versions of image resampling, affine transforms, and coordinate mapping operations.
Functions#
|
GPU-accelerated affine transformation. |
|
GPU-accelerated coordinate mapping (general interpolation). |
|
GPU-accelerated image resize. |
|
Apply a displacement field to warp an image. |
|
Resample a volume to a new spacing. |
Module Contents#
- linumpy.gpu.interpolation.affine_transform(image, matrix, output_shape=None, order=1, use_gpu=True)[source]#
GPU-accelerated affine transformation.
- Parameters:
- Returns:
Transformed image
- Return type:
np.ndarray
- linumpy.gpu.interpolation.map_coordinates(image, coordinates, order=1, use_gpu=True)[source]#
GPU-accelerated coordinate mapping (general interpolation).
- linumpy.gpu.interpolation.resize(image, output_shape, order=1, anti_aliasing=True, use_gpu=True)[source]#
GPU-accelerated image resize.
- linumpy.gpu.interpolation.apply_displacement_field(image, displacement_field, use_gpu=True)[source]#
Apply a displacement field to warp an image.
- Parameters:
image (np.ndarray) – Input image (2D or 3D)
displacement_field (np.ndarray) – Displacement field with shape
(ndim, *image.shape)use_gpu (bool) – Whether to use GPU
- Returns:
Warped image
- Return type:
np.ndarray