params#

All the classes that define parameters or group thereof for the tabs of the graphical interface

class AtlasParams(tab, *, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: UiParameter

build_params_dict()[source]#
connect()[source]#

Connect GUI slots here

handle_atlas_resolution_changed(state)[source]#
notify_atlas_id_changed()[source]#
update_atlas_resolution()[source]#
property atlas_base_name#
atlas_folder: str#
atlas_id: str#
publishes = <ClearMap.Utils.event_bus.Publishes object>#
structure_tree_id: str#
class BatchParameters(tab, *, event_bus: EventBus, preferences=None, get_view=None, apply_patch=None)[source]#

Bases: UiParameter

add_group(name: str | None = None) None[source]#

Add a new empty group (called by SamplePickerDialog and similar wizards).

build_params_dict() dict[source]#
cfg_to_ui()[source]#
connect()[source]#

Connect GUI slots here

get_all_paths() list[str][source]#
get_paths(gp_idx: int) list[str][source]#
remove_current_group()[source]#
set_paths(gp_idx: int, paths: list[str]) None[source]#
cfg_subtree = None#
property group_names: list[str]#
groups: dict[str, list[str]]#
property n_groups: int#
publishes = <ClearMap.Utils.event_bus.Publishes object>#
results_folder: str#
class BatchProcessingParams(tab, *, event_bus: EventBus, preferences=None, get_view=None, apply_patch=None)[source]#

Bases: BatchParameters

Essentially BatchParameters with processing steps

align: bool#
cfg_subtree = ['batch_processing']#
count_cells: bool#
run_vasculature: bool#
class BlockProcessingParams(tab, *, cfg_prefix: list[str], event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: UiParameter

Generic block-processing parameters (n_processes + size_min / size_max / overlap).

You can attach this to any ‘block_processing’ subtree by passing cfg_prefix. tab is expected to be the BlockProcessingParamsWidget for that step.

build_params_dict()[source]#
property cfg_subtree#
n_processes: int#
overlap: int | None#
size_max: int | None#
size_min: int | None#
class CellMapParams(tab, sample_params, *, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: ChannelsUiParameterCollection

add_channel(channel_name, data_type=None)[source]#
add_perf_channel(channel_name: str)[source]#

Called from the tab once the channel UI page exists.

pop(channel_name: str)[source]#
property params#
class ChannelCellMapParams(tab, channel, *, main_params, event_bus: EventBus, dtype=<class 'numpy.uint16'>, get_view=None, apply_patch=None)[source]#

Bases: ChannelUiParameter, OrthoviewerSlicingMixin

build_params_dict()[source]#
cast_max_from_ui(cfg_vals)[source]#

After sentinel mapping back to tokens (None/’auto’), push upper to dtype.max.

connect()[source]#

Connect GUI slots here

handle_advanced_state_changed(state)[source]#
handle_colocalization_compatible_changed(state)[source]#
background_correction_diameter: List[int]#
cell_filter_intensity: List[int]#
cell_filter_size: List[int]#
property cfg_subtree#
colocalization_compatible: bool#
crop_x: List[int]#
crop_y: List[int]#
crop_z: List[int]#
detect_cells: bool#
detection_threshold: int#
filter_cells: bool#
h_max: int | None#
maxima_shape: int#
n_detected_cells: int#
n_filtered_cells: int#
plot_detected_cells: bool#
plot_when_finished: bool#
save_shape: bool#
voxelization_radii: List[int]#
voxelization_weights: str | None#
voxelize: bool#
class ChannelCellMapPerformanceParams(tab: QWidget, channel_name: str, *, event_bus: EventBus, name_widget_name: str | None = None, get_view: Callable[[], Mapping[str, Any]] | None = None, apply_patch: Callable[[dict], None] | None = None)[source]#

Bases: ChannelUiParameter

Links per-channel detection.block_processing performance to the UI widget.

build_params_dict()[source]#
property cfg_subtree#
n_processes: int#
overlap: int | None#
size_max: int#
size_min: int#
class ChannelColocalizationParams(tab, channel, *, main_params, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: ChannelUiParameter

build_params_dict()[source]#
property cfg_subtree#
max_particle_distance: float#
n_processes: int#
particle_diameter: int#
relative_overlap_threshold: float#
voxel_number_overlap_threshold: int#
class ChannelRegistrationParams(tab, channel_name, *, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: ChannelUiParameter

static scale_landmarks(value: int)[source]#

Scale the weight of the landmarks using an exponential function so that the ratio between the weights follows a geometric progression with the slider value

Parameters:

value (int) – The value of the slider (between 0 and 100)

Returns

float

The scaled weight (between 0 and max_ratio)

build_params_dict()[source]#
connect()[source]#

Connect GUI slots here

handle_landmarks_weight_changed(idx: int, value: int)[source]#
handle_params_files_changed()[source]#
property cfg_subtree#
property n_registration_files: int#
property params_files#
publishes = <ClearMap.Utils.event_bus.Publishes object>#
property use_landmarks_for#
class ChannelStitchingParams(tab, channel, *, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: UiParameterCollection

compute_layout()[source]#

Checks if the layout should be computed for this channel. This is the case if the layout channel is the current channel. If the config has not been pushed to the ui yet, it will use the config directly.

Returns

bool

Whether the stitching layout should be computed for this channel

connect()[source]#
handle_layout_channel_changed(layout_changed_event: UiLayoutChannelChanged)[source]#
handle_use_existing_layout_changed(use_existing_layout_event: UiUseExistingLayoutChanged)[source]#
property params#
class ChannelTractMapParams(tab, channel, *, main_params, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: ChannelUiParameter, OrthoviewerSlicingMixin

build_params_dict()[source]#
binarize: bool#
property cfg_subtree#
clip_range: List[int]#
clipping_decimation_ratio: int#
clipping_percents: List[float]#
crop_x: List[int]#
crop_y: List[int]#
crop_z: List[int]#
display_decimation_ratio: int#
export_df: bool#
extract_coordinates: bool#
label_coordinates: bool#
transform_coordinates: bool#
voxelization_radii: List[int]#
voxelize: bool#
class ColocalizationParams(tab, sample_params, *, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: ChannelsUiParameterCollection

add_channel(channel_name, data_type=None)[source]#
property params#
class GeneralChannelStitchingParams(tab: QWidget, channel_name: str, *, event_bus: EventBus, name_widget_name: str | None = None, get_view: Callable[[], Mapping[str, Any]] | None = None, apply_patch: Callable[[dict], None] | None = None)[source]#

Bases: ChannelUiParameter

build_params_dict()[source]#
refresh_layout_channel_items()[source]#

Populate and keep in sync the layoutChannelComboBox items.

property cfg_subtree#
layout_channel: str#
publishes = <ClearMap.Utils.event_bus.Publishes object>#
property run#
use_existing_layout: bool#
use_npy: bool#
class GraphFilterParams(*, main_params, widget, graph, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: UiParameter

connect()[source]#

Connect GUI slots here

get_default_property_value()[source]#
get_property_value()[source]#
handle_property_name_changed()[source]#
suffix()[source]#
update_properties()[source]#
property cfg_subtree#
property combine_operator_name#

Read the action from the following combine button .. rubric:: Returns

property current_dtype#
property filter_type#
property property_name#
class GroupAnalysisParams(tab, *, event_bus: EventBus, preferences=None, get_view=None, apply_patch=None)[source]#

Bases: BatchParameters

Essentially batch parameters with comparisons

cfg_to_ui()[source]#
set_channels_provider(provider: Callable[[], list[str]])[source]#
set_on_plot_group(handler: Callable[[str], None])[source]#
set_pipelines(pipelines: list[str])[source]#
set_suffixes_provider(provider: Callable[[], list[str]])[source]#
cfg_subtree = ['group_analysis']#
property comparisons: list[Tuple[str, str]]#
compute_sd_and_effect_size: bool#
density_suffix: str#
pipeline: str#
property selected_comparisons: list[Tuple[str, str]]#
class NProcessesParams(tab, *, cfg_path: list[str], event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: UiParameter

Minimal helper for performance.<step>.n_processes

build_params_dict()[source]#
property cfg_subtree#
n_processes: int#
class PreferencesParams(tab: QWidget, *, event_bus: EventBus, get_view: Callable[[], Mapping[str, Any]] | None = None, apply_patch: Callable[[dict], None] | None = None)[source]#

Bases: UiParameter

build_params_dict()[source]#
cfg_subtree = ['machine']#
font_size: int#
lut: str#
pattern_finder_min_n_files: int#
start_folder: str#
start_full_screen: bool#
three_d_plot_bg: str#
verbosity: str#
class RegistrationParams(tab, *, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: ChannelsUiParameterCollection

add_channel(channel_name, data_type=None)[source]#
get_channel_name(channel_idx)[source]#
property params#
publishes = <ClearMap.Utils.event_bus.Publishes object>#
class RigidChannelStitchingParams(tab: QWidget, channel_name: str, *, event_bus: EventBus, name_widget_name: str | None = None, get_view: Callable[[], Mapping[str, Any]] | None = None, apply_patch: Callable[[dict], None] | None = None)[source]#

Bases: ChannelUiParameter

build_params_dict()[source]#
set_enabled(state)[source]#
set_visible(state)[source]#
background_level: int#
background_pixels: int#
property cfg_subtree#
max_shifts_x: List[int]#
max_shifts_y: List[int]#
max_shifts_z: List[int]#
projection_thickness: List[int]#
skip: bool#
x_overlap: int#
y_overlap: int#
class SampleChannelParameters(tab, channel_name, *, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: ChannelUiParameter

build_params_dict()[source]#
cfg_to_ui()[source]#
connect()[source]#

Connect GUI slots here

handle_name_changed(old_name: str, new_name: str)[source]#
handle_orientation_changed(_)[source]#
set_geometry_settings_from_options(items)[source]#
validate_orientation(orientation)[source]#
property cfg_subtree#
comments: str#
data_type: str#
extension: str#
geometry_settings_from: str#
property orientation#
path: str#
publishes = <ClearMap.Utils.event_bus.Publishes object>#
resolution: List[float]#
slice_x: List[int]#
slice_y: List[int]#
slice_z: List[int]#
wavelength: int | None#
class SampleParameters(tab, *, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: ChannelsUiParameterCollection

Class that links the sample params file to the UI

add_channel(channel_name: str)[source]#
cfg_to_ui()[source]#
ensure_channel_param(channel_name: str)[source]#
get_channel_name(channel_idx)[source]#
handle_channel_rename_request(old_name: str, new_name: str, requester: SampleChannelParameters) None[source]#
Orchestrate rename:
  1. Update parent-owned state (dict key, tab text) so synchronous cascade sees consistent state

  2. Ask child to write its config

  3. Verify and revert on failure

Parameters:
  • old_name (str) – The current name of the channel to rename. This must be a key in self.channel_params.

  • new_name (str) – The desired name for the channel. This must be a valid channel name.

  • requester (SampleChannelParameters) – The sub tab (channel) that triggered this rename. This is needed to route the config change and to revert the UI if something goes wrong.

propagate_params(channel)[source]#
reconcile_from_config()[source]#

Makes channels in UI match view (i.e. config).

request_add_channel(channel_name: str)[source]#
cfg_subtree: List[str] = ['sample']#
property config_channels#
property params#
publishes = <ClearMap.Utils.event_bus.Publishes object>#
class SharedRegistrationParams(tab: QWidget, *, event_bus: EventBus, get_view: Callable[[], Mapping[str, Any]] | None = None, apply_patch: Callable[[dict], None] | None = None)[source]#

Bases: UiParameter

build_params_dict()[source]#
class SharedSampleParams(tab: QWidget, *, event_bus: EventBus, get_view: Callable[[], Mapping[str, Any]] | None = None, apply_patch: Callable[[dict], None] | None = None)[source]#

Bases: UiParameter

Links the shared sample parameters (i.e. independent of channel like folder, sample_id…) to the UI

sample_id#

The ID of the sample. This must be unique

Type:

str

use_id_as_prefix#

Whether to use the sample ID as a prefix for the output files

Type:

bool

default_tile_extension#

The extension of the tile files

Type:

str

build_params_dict()[source]#
cfg_subtree = ['sample']#
property channels#
default_tile_extension: str#
sample_id: str#
src_folder: str#
use_id_as_prefix: bool#
class SharedVesselBinarizationParams(tab: QWidget, *, event_bus: EventBus, get_view: Callable[[], Mapping[str, Any]] | None = None, apply_patch: Callable[[dict], None] | None = None)[source]#

Bases: UiParameter

build_params_dict()[source]#
set_plotable_channels(channels)[source]#
fill_combined: bool#
plot_channel_1: str#
plot_channel_2: str#
plot_step_1: str#
plot_step_2: str#
class StitchingParams(tab, *, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: ChannelsUiParameterCollection

Class that groups all the parameters related to the stitching of the sample (i.e. rigid and wobbly stitching)

add_channel(channel_name, data_type=None)[source]#

Add a channel to the stitching parameters if not already present.

Warning

This only adds the channel to the config — it does not create the UI elements. UI creation is handled by the tab’s add_channel_tab() method.

Parameters:
  • channel_name (str) – The name of the channel to add.

  • data_type (str, optional)

compute_layout(channel)[source]#
create_missing_channels_from_view(desired_channels: tuple)[source]#
get_channels_to_run()[source]#
handle_layout_channel_changed(channel, layout_channel)[source]#
materialize_channel(ch)[source]#
prune_obsolete_channels(desired_channels: tuple)[source]#
reconcile_children_from_view(*_)[source]#

Ensure we have one ChannelStitchingParams per stitching.channels entry.

set_channels_to_run(channels)[source]#
property params#
publishes = <ClearMap.Utils.event_bus.Publishes object>#
class TractMapParams(tab, sample_params, *, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: ChannelsUiParameterCollection

add_channel(channel_name, data_type=None)[source]#
property params#
class TractMapPerformanceParams(tab: QWidget, *, event_bus: EventBus, get_view: Callable[[], Mapping[str, Any]] | None = None, apply_patch: Callable[[dict], None] | None = None)[source]#

Bases: UiParameter

tract_map.performance.<section> → performanceGroupBox widgets. Shared (not per-channel) in v3.1.

build_params_dict()[source]#
cfg_subtree = ['tract_map', 'performance']#
class VesselBinarizationParams(tab: QWidget, channel_name: str, *, event_bus: EventBus, name_widget_name: str | None = None, get_view: Callable[[], Mapping[str, Any]] | None = None, apply_patch: Callable[[dict], None] | None = None)[source]#

Bases: ChannelUiParameter

apply_pipeline_to_config(pipeline: LinearPipeline) None[source]#

Write step order and enabled flags from pipeline to config. Called by the tab whenever the pipeline widget changes.

build_params_dict()[source]#
cfg_to_ui() None[source]#
pipeline_from_config() LinearPipeline[source]#

Reconstruct a LinearPipeline from config run flags and step_order. Falls back to BINARIZATION_STEPS insertion order when step_order is absent (e.g. legacy config).

post_connect() None[source]#

Create and wire the LinearPipelineWidget after ParamLink connections are established. The widget replaces the run_* checkboxes and is owned here because it drives config writes via apply_pipeline_to_config.

binarization_clip_range: List[int]#
binarization_threshold: int#
property cfg_subtree#
property n_steps#
run_binarization: bool#
run_binary_filling: bool#
run_deep_filling: bool#
run_smoothing: bool#
class VesselBinarizationPerformanceParams(tab: QWidget, channel_name: str, *, event_bus: EventBus, name_widget_name: str | None = None, get_view: Callable[[], Mapping[str, Any]] | None = None, apply_patch: Callable[[dict], None] | None = None)[source]#

Bases: ChannelUiParameter

build_params_dict()[source]#
property cfg_subtree#
n_processes: int#
overlap: int | None#
size_max: int#
size_min: int#
class VesselGraphParams(tab, *, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: UiParameter

add_graph_filter_params(widget, graph)[source]#
build_params_dict()[source]#
compute_filter_suffix()[source]#
annotate: bool#
arteries_min_noise_edges: int#
artery_intensity_min: float#
artery_trace_radius_um: float#
build: bool#
cfg_subtree = ['vasculature']#
clean: bool#
distance_to_surface_min: float#
final_min_vein_radius: float#
max_arteries_tracing_iterations: int#
max_veins_tracing_iterations: int#
min_artery_component_edges: int#
min_vein_component_edges: int#
property n_filters#
permissive_min_vein_radius: float#
publishes = <ClearMap.Utils.event_bus.Publishes object>#
reduce: bool#
restrictive_min_vein_radius: float#
skeletonize: bool#
transform: bool#
use_arteries: bool#
vein_intensity_min: float#
vein_intensity_range_on_arteries_channel: List[int]#
vein_trace_radius_um: float#
class VesselGraphPerformanceParams(tab: QWidget, *, event_bus: EventBus, get_view: Callable[[], Mapping[str, Any]] | None = None, apply_patch: Callable[[dict], None] | None = None)[source]#

Bases: UiParameter

Graph construction performance parameters. Global — graph operates on the combined binary, not per-channel. Widgets are created dynamically in VasculatureTab._setup_graph_perf() before VesselParams is instantiated.

build_params_dict() dict[source]#
cfg_subtree = ['vasculature', 'performance', 'graph_construction']#
class VesselParams(tab, sample_params, *, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: ChannelsUiParameterCollection

add_channel(channel_name, data_type=None)[source]#
add_perf_channel(channel_name: str)[source]#

Called from the tab once the channel UI page exists.

get_selected_steps_and_channels()[source]#
pop(channel_name: str)[source]#
property params#
class VesselVisualizationParams(tab, *, sample_params=None, event_bus: EventBus, get_view=None, apply_patch=None)[source]#

Bases: UiParameter, OrthoviewerSlicingMixin

build_params_dict()[source]#
set_structure_id(structure_widget)[source]#
crop_x: List[int]#
crop_y: List[int]#
crop_z: List[int]#
graph_step: str#
pipeline: str | None = 'TubeMap'#
plot_type: str#
vertex_degrees: str#
voxelization_size: List[int]#
weight_by_radius: bool#
class WobblyChannelStitchingParams(tab: QWidget, channel_name: str, *, event_bus: EventBus, name_widget_name: str | None = None, get_view: Callable[[], Mapping[str, Any]] | None = None, apply_patch: Callable[[dict], None] | None = None)[source]#

Bases: ChannelUiParameter

build_params_dict()[source]#
set_enabled(state)[source]#
set_visible(state)[source]#
property cfg_subtree#
max_shifts_x: List[int]#
max_shifts_y: List[int]#
max_shifts_z: List[int]#
skip: bool#
slice_pixel_size: int | None#
slice_valid_range: List[int]#
stack_pixel_size: int | None#
stack_valid_range: list#