2D Transformation#

Apply geometric transformations to images

../../_images/2D_transformation.png

Parameters#

image_stacks

One or multiple stacks of images as list of array-likes

transformations

One or multiple lists of transformations that are either represented by Transformations or 3x3 matrices

url

Location to and in .h5-file where the resulting images/stacks will be saved as a dataset (one stack) or a group containing datasets (multiple stacks)

crop

Only for translations: Crops the resulting images to remove all NaN-values

interpolation_order:

Determines the order of interpolation used for resampling the image. See Resampling

Reg2DTransform#

Apply transformations calculated from image registration to the images of one or more stacks.

Identifier:
ewoksndreg.tasks.reg2d_transform.Reg2DTransform
Task type:
class
Inputs:
image_stacks* : ewoksndreg.io.input_stack.InputStacks | Dict[str, Sequence[numpy.ndarray]] | Dict[str, numpy.ndarray] | Sequence[str | silx.io.url.DataUrl] | Dict[str, str | silx.io.url.DataUrl]

Image stacks as a dictionary of numpy arrays or list of HDF5 dataset URI’s.

Examples:
  • {'stack1': '/path/to/file.h5::/entry/process1/results/parameters/Ca-K', 'stack2': '/path/to/file.h5::/entry/process1/results/parameters/Fe-K'}
  • {'stack1': [[0, 0, 0], [1, 1, 1], [2, 2, 2]]}
transformations* : Dict[str, List[ewoksndreg.transformation.base.Transformation]]

Transformations for each image in each stack.

output_root_uri : silx.io.url.DataUrl | str | None= None

URL to save all transformed stacks.

Examples:
  • '/path/to/file.h5::/entry/process2/results/parameters/'
image_stacks_nxmetadata : dict | None= None

HDF5/NeXus metadata relative to the file root following the Silx dictdump schema.

Examples:
  • {'@NX_class': 'NXroot', 'entry': {'@NX_class': 'NXentry'}}
output_configuration : Dict[str, Any] | None= None

Registration configuration parameters to be saved.

Examples:
  • {'param1': 0, 'param2': 1}
crop : bool= False

Crop Nan’s at the image edges after alignment.

interpolation_order : int= 1

Interpolation order when transforming an image.

Outputs:
image_stacks : Dict[str, List[numpy.ndarray]] | Dict[str, str]

Dictionary of image stacks in memory or URIs.

output_configuration : Dict[str, Any] | None

Registration configuration parameters to be saved.

Examples:
  • {'param1': 0, 'param2': 1}