scallops.registration.itk.itk_transform_image

scallops.registration.itk.itk_transform_image(image, transform_parameter_object, image_spacing=None)

Apply an ITK transform to an image.

Parameters:
  • image (DataArray) – The input image represented as an xarray DataArray.

  • transform_parameter_object (elastixParameterObject | str | Sequence[dict]) – The ITK parameter object containing transformation parameters or path to directory of parameter objects

  • image_spacing (None | tuple[float, float]) – Optional spacing information for the image. If not provided, it is determined from the metadata.

Returns:

The transformed image as a DataArray.

Return type:

DataArray