registration_orchestrator#
- class MiniBrain[source]#
Bases:
TypedDictA downscaled brain for quick visualization It includes the downscaled image and the scaling factors
- array: ndarray#
- scaling: tuple[float, float, float]#
- class RegistrationProcessor(sample_manager: SampleManager, cfg_coordinator: ConfigCoordinator)[source]#
Bases:
PipelineOrchestratorThis class is used to manage the registration process Perform image registration operations. Manage atlas setup and transformations. Handle registration configurations.
- align(*args, _force=False, **kwargs)#
- get(asset_type, channel='current', asset_sub_type=None, **kwargs)[source]#
Get an asset, automatically resolving registration template variables for asset types that require parametrisation (e.g. registration (Elastix) assets, where moving/fixed channels are conditional).
- Parameters:
asset_type (str) – The asset type name.
channel (str) – The channel name.
asset_sub_type (str or None) – Optional sub-type.
**kwargs – Forwarded to the parent
get.
Returns
- Asset
The resolved asset.
- get_moving_channel(channel: str) str[source]#
Get the moving channel for a given channel
Warning
Contrary to get_fixed_moving_channels, this method does not check for the existence of the fixed channel. It simply returns the moving channel as specified in the config.
- Parameters:
channel (str) – The channel to get the moving channel for
Returns
- str
The moving channel
- project_mini_brain(channel)[source]#
Project the mini brain of the channel as a mask and a surface projection
- Parameters:
channel (str) – The channel to project
Returns
- np.ndarray, np.ndarray
The mask and the projection
- resample_for_registration(*args, _force=False, **kwargs)#
- setup(sample_manager: SampleManager | None = None)[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_nameis absent.
- annotators: Dict[str, Annotation]#
- property channels#
- config_name = 'registration'#
- property n_registration_steps#
- progress_watcher: 'ProgressWatcher' | None#
- property ref_channel_cfg#
- property registration_params_files#
- sample_manager: SampleManager#
- setup_complete: bool#
- property was_registered#
- class RegistrationStatus(value)[source]#
Bases:
Enum- MISSING_OUTPUTS = 1#
- NOT_SELECTED = 0#
- REGISTERED = 2#
- setup_mini_brain(atlas_base_name, mini_brain_scaling=(5, 5, 5))[source]#
Create a downsampled version of the Allen Brain Atlas for the mini brain widget
- Parameters:
mini_brain_scaling (tuple(int, int, int)) – The scaling factors for the mini brain. Default is (5, 5, 5)
Returns
tuple(scale, downsampled_array)