stitching_orchestrator#

class StitchingProcessor(sample_manager: SampleManager, cfg_coordinator: ConfigCoordinator)[source]#

Bases: PipelineOrchestrator

This class is used to manage the stitching process Handle image stitching operations. Manage stitching configurations and processes.

align_channel_rigid(channel, _force=False)[source]#
channel_was_stitched_rigid(channel)[source]#
convert_tiles(*args, _force=False, **kwargs)#
convert_tiles_channel(channel, _force=False)[source]#
copy_or_stack(channel)[source]#

Copy or stack or convert to npy the channel data in case there is no X/Y tiling

Parameters:

channel (str) – The channel to copy or stack

create_layout_from_ome(channel: str) None[source]#

Build and persist a real WobblyLayout for ‘channel’ from OME TileConfiguration. Marks the channel as ‘use_existing_layout’ so rigid placement can be skipped.

get_stitching_order(strict=False)[source]#

Returns a list of trees (each tree is a list of channels in hierarchical order). Raises a ValueError if any channel is unreachable or if there is a cycle.

get_wobbly_layout(channel, overlaps=None)[source]#
overlay_layout_plane(layout)[source]#

Overlays the sources to check their placement.

Arguments

layoutLayout class

The layout with the sources to overlay.

Returns

imagearray

A color image.

place_layout_rigid(channel)[source]#
plot_layout(channel, asset_sub_type='aligned_axis')[source]#
plot_stitching_results(channels=None, mode='side-by-side', parent=None)[source]#
prepare_all_channels_raw_data(force: bool = False) list[str][source]#

Prepare all pipeline-ready channels that don’t yet have their working asset. Tiled channels → convert tiles to npy. Non-tiled → stack/copy to stitched volume. Idempotent unless force=True.

Parameters:

force (bool) – If True, re-prepare even if the working asset already exists.

Returns

list[str]

Channel names that were prepared.

setup(sample_manager: SampleManager | None = None, convert_tiles: bool = False)[source]#

Attach a sample manager and mark this processor as ready.

Parameters:

sample_manager (SampleManager, optional) – If provided, replaces the currently stored sample manager. When None, the previously stored instance is reused.

Raises:

ValueError – If the config section identified by config_name is absent.

stack_columns(channel)[source]#
stitch()[source]#
stitch_channel_wobbly(*args, _force=False, **kwargs)#
stitch_overlay(channel, color=True)[source]#

This creates a dumb overlay of the tiles i.e. only using the fixed guess overlap

Parameters:
  • channel

  • color

Returns

np.array(dtype=uint8)

The overlay image

config_name = 'stitching'#
property n_rigid_steps_to_run#
property n_wobbly_steps_to_run#