Ewoks Tasks#
Example2DStacks#
Generate one or more stacks of transformed images to test registration methods.
- Identifier:
ewoksndreg.tasks.example2d_stacks.Example2DStacks- Task type:
- class
- Inputs:
- name* :
str Name of the image
Examples:- 'astronaut'
- transformation_type* :
ewoksndreg.transformation.types.TransformationType Transformation type
Examples:- 'translation'
- 'rigid'
- shape :
Sequence[int] | None= None Image shape
Examples:- (200, 220)
- nimages :
int | None= None Number of images per stack
- nstacks :
int | None= None Number of image stacks
- noise :
int | None= None Number of image stacks
Examples:- 's&p'
- 'uniform'
- name* :
- Outputs:
- image_stacks :
Dict[str, List[numpy.ndarray]] | Dict[str, str] Dictionary of image stacks in memory or URIs.
- transformations :
Dict[str, List[ewoksndreg.transformation.base.Transformation]] Transformation between the images of each stack.
- image_stacks :
Reg2DFeatures#
Use a feature-based registration method to calculate transformations between the images in one or more stacks.
- Identifier:
ewoksndreg.tasks.reg2d_features.Reg2DFeatures- 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/process/results/parameters/Ca-K', 'stack2': '/path/to/file.h5::/entry/process/results/parameters/Fe-K'}
- {'stack1': [[0, 0, 0], [1, 1, 1], [2, 2, 2]]}
- detector* :
ewoksndreg.registry.RegistryId | str | Tuple[str, str] Method to detect and describe feature points in an image.
Examples:- 'Sift-Silx'
- 'Sift-SciKitImage'
- 'Orb-SciKitImage'
- matcher* :
ewoksndreg.registry.RegistryId | str | Tuple[str, str] Method to build correspondence between the feature points in two images.
Examples:- 'Descriptor-Silx'
- 'Descriptor-SciKitImage'
- mapper* :
ewoksndreg.registry.RegistryId | str | Tuple[str, str] Method to find parameters of the transformation between the matches.
Examples:- 'LstSq-Numpy'
- 'LstSq-SciPy'
- 'Ransac-SciKitImage'
- transformation_type* :
ewoksndreg.transformation.types.TransformationType Type of transformation between the matches.
Examples:- 'Translation'
- 'Rigid'
- 'Affine'
- reference_image :
int | float= 0 The index of the reference image in the stack (0.5 is the middle of the stack).The calculated transformations will be relative to this image.
Examples:- 0
- -1
- 0.5
- reference_stack :
str | None= None Transformations of all stacks is based on the image registration of this stack.
Examples:- 'stack1'
- 'stack2'
- mask :
numpy.ndarray | None= None Boolean image mask applied to the image before calculating the transformation (False means masked-off).
Examples:- [[True, True, True], [True, True, True], [False, True, True]]
- output_configuration :
Dict[str, Any] | None= None Registration configuration parameters to be saved.
Examples:- {'param1': 0, 'param2': 1}
- image_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'
- features :
Dict[str, List[ewoksndreg.features.features.base.Features]] - matches :
Dict[str, List[Tuple[ewoksndreg.features.features.base.Features | None, ewoksndreg.features.features.base.Features | None]]] - output_configuration :
Dict[str, Any] | None Registration configuration parameters to be saved.
Examples:- {'param1': 0, 'param2': 1}
- image_stacks :
Reg2DIntensities#
Use an intensity-based registration method to calculate transformations between the images in one or more stacks.
- Identifier:
ewoksndreg.tasks.reg2d_intensities.Reg2DIntensities- 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/process/results/parameters/Ca-K', 'stack2': '/path/to/file.h5::/entry/process/results/parameters/Fe-K'}
- {'stack1': [[0, 0, 0], [1, 1, 1], [2, 2, 2]]}
- mapper* :
ewoksndreg.registry.RegistryId | str | Tuple[str, str] Method to find parameters of the transformation between the image intensities.
Examples:- 'LstSq-Numpy'
- 'LstSq-SciPy'
- 'Ransac-SciKitImage'
- transformation_type* :
ewoksndreg.transformation.types.TransformationType Type of transformation between the intensities.
Examples:- 'Translation'
- 'Rigid'
- 'Affine'
- reference_image :
int | float= 0 The index of the reference image in the stack (0.5 is the middle of the stack).The calculated transformations will be relative to this image.
Examples:- 0
- -1
- 0.5
- reference_stack :
str | None= None Transformations of all stacks is based on the image registration of this stack.
Examples:- 'stack1'
- 'stack2'
- block_size :
int= 1 Register images within blocks and then register with respect to the reference. Pair-wise registration can be done with block_size=2.Useful when images drift alot over the entire stack.
Examples:- 2
- 5
- mask :
numpy.ndarray | None= None Boolean image mask applied to the image before calculating the transformation (False means masked-off).
Examples:- [[True, True, True], [True, True, True], [False, True, True]]
- preprocessing_options :
dict | None= None Filters, windows and other operations that will be applied to the image before calculating the transformation.
Examples:- {'apply_filter': 'median'}
- mapper_options :
dict | None= None Method dependent parameters.
- output_configuration :
Dict[str, Any] | None= None Registration configuration parameters to be saved.
Examples:- {'param1': 0, 'param2': 1}
- image_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 stack as numpy arrays.
- 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'
- output_configuration :
Dict[str, Any] | None Registration configuration parameters to be saved.
Examples:- {'param1': 0, 'param2': 1}
- image_stacks :
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.
- image_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}
- image_stacks :
Reg2DPreEvaluation#
Given several stacks of images requiring the same alignment, determine the stack which is most suitable to get a correct alignment.
- Identifier:
ewoksndreg.tasks.reg2d_preeval.Reg2DPreEvaluation- 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/process/results/parameters/Ca-K', 'stack2': '/path/to/file.h5::/entry/process/results/parameters/Fe-K'}
- {'stack1': [[0, 0, 0], [1, 1, 1], [2, 2, 2]]}
- reference_stack :
str | None= None Force select stack.
Examples:- 'stack1'
- 'stack2'
- 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.
- image_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.
- 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}
- image_stacks :
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.
- image_stacks* :
- 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}
- image_stacks :
SelectNXdataImageStacks#
Find image stacks by searching recursively for 3D NXdata signals under a root HDF5 URL.
- Identifier:
ewoksndreg.tasks.select_nxdata.SelectNXdataImageStacks- Task type:
- class
- Inputs:
- input_root_uri* :
str | silx.io.url.DataUrl Root HDF5 URL in which to search for NXdata groups.
Examples:- '/path/to/file.h5::/entry/process/'
- output_root_uri :
silx.io.url.DataUrl | str | None= None Root HDF5 URL under which to save the aligned results.
Examples:- '/path/to/file.h5::/entry'
- input_root_uri* :
- Outputs:
- image_stacks :
Dict[str, List[numpy.ndarray]] | Dict[str, str] Dictionary of image stacks in memory or URIs.
- output_root_uri :
str Root HDF5 URL under which to save the aligned results.
Examples:- '/path/to/file.h5::/entry'
- image_stacks_nxmetadata :
Dict[str, Any] NeXus metadata for each stack
- image_stacks :