Post-Registration Evaluation#

Find the best list of transformations given multiple lists and the images they were registered from

../../_images/2D_posteval.png

Parameters#

image_stacks

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

transformations

The resulting transformations for each of the image_stacks

url

Url of an hdf5 Dataset to save the chosen transformed image stack

reference_stack

Most relevant stack name

Outputs#

image_stacks

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

transformations

The resulting transformations for each of the image_stacks

reference_stack

Most relevant stack name

ranked_stack_names

Stack names ordered from most to least relevant

Reg2DPostEvaluation#

Given several stacks of images and their image transformations, determine the stack and list of transformations that results in the best registration.

Identifier:
ewoksndreg.tasks.reg2d_posteval.Reg2DPostEvaluation
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/file1.h5::/entry/process/results/parameters/Ca-K', 'stack2': '/path/to/file1.h5::/entry/process/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.

reference_stack : str | None= None

Force select stack.

Examples:
  • 'stack1'
  • 'stack2'
output_root_uri : silx.io.url.DataUrl | str | None= None

URL to save all stacks transformed with its own transformations.

Examples:
  • '/path/to/file2.h5::/entry/process/results/parameters/'
output_configuration : Dict[str, Any] | None= None

Registration configuration parameters to be saved.

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

Do not rank the stacks.

Outputs:
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]

Dictionary of image stacks in memory or URIs.

transformations : Dict[str, List[ewoksndreg.transformation.base.Transformation]]

Transformation between the images of each stack.

reference_stack : str | None

Transformations of all stacks is based on the image registration of this stack.

Examples:
  • 'stack1'
  • 'stack2'
ranked_stack_names : List[str] | None

image_stacks keys ordered from best to worst.

output_configuration : Dict[str, Any] | None

Registration configuration parameters to be saved.

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

Notes#

Deciding whether an alignment is “good” is very hard to solve algorithmically, therefore the attemps to find the best alignment in this task are in no way definitive.

For every image_stacks there are two measures used:
  • Mean squared error between the images

  • Smoothness of the transformations using change of corner coordinates when applying transformations