TomoImageStitcher

API reference

The full reference is auto-generated from the docstrings. The most useful entry points are listed below.

tomo_image_stitcher.Stitcher

class tomo_image_stitcher.Stitcher(
    file_path_list,
    physical_coordinates,
    mm_per_voxel,
    x_y_z_correspondance=(1, 2, 3),
    saving_path=None,
)

Drives the entire stitching pipeline. The order of operations is:

  1. get_layers_in_z(tolerance_mm)
  2. get_padding()
  3. get_intersections(check=False, radius=None)
  4. compute_shift_in_layers(...)
  5. get_displacement_pyramid(check=False, starting_coord=None)
  6. accumulate_displacement(exclude_NCC=80, weighted_avg=True, affine_operator=False)
  7. compose_final_displacements(verbose=False)
  8. push_stitch_parameters()
  9. stitch_layers(chunk_size_series=200, chunk_size_parallel=10, n_cores=10, ...)

Key methods

Key class attributes

Attribute Default Description
add_value_for_mask 0 Shift added to all values when reading (reserve 0 for mask).
erosion_mask_LC_xyz (11, 11, 11) Erosion applied to the registration mask.
GPU_chunk_size 1 Z-chunk size for the affine warp.
sitk_interpolator sitk.sitkLinear Interpolation used by get_transformed_slices.
affine_interpolator_order 1 Spline order for the affine transform.
force_rigid_warp False If True, only the rigid part of the affine is used.
projection_xy_stitching False If True, ignore z in the registration.
affine_warp None Whether to use affine (vs shift) for stitching.
prop_x_y (0, 0) Direction for the blending distance field.

tomo_image_stitcher.RegistrationKIT

Static-method class. Useful methods:

tomo_image_stitcher.affine_transform_large_data

class tomo_image_stitcher.affine_transform_large_data(img_h5_pointer, chunk_size=1, add_value_for_mask=False)

tomo_image_stitcher.Utilities

Static helpers (no instance needed):

tomo_image_stitcher.danmax (optional)

Beamline-specific helpers, only useful on the DanMAX Jupyter environment: