tabs#

The different tabs that correspond to different functionalities of the GUI

class AlignmentTab(main_window, tab_idx=1)[source]#

Bases: GenericTab

The tab responsible for all the alignments, including the stitching and aligning to the atlas.

clear_landmarks()[source]#
convert_output()[source]#

Convert the stitched output to the file type specified by the drop down menu in the UI

Returns

convert_tiles()[source]#
display_auto_to_ref_landmarks_dialog()[source]#

Display the dialog to use landmarks for optimising the registration of the autofluorescence to the reference

Returns

display_resampled_to_auto_landmarks_dialog()[source]#

Display the dialog to use landmarks for optimising the registration of the resampled main channel to autofluorescence

Returns

plot_registration_results_composite()[source]#

Plot the result of the registration between autofluorescence and reference atlas as an overlay plot

Returns

plot_registration_results_composite_raw()[source]#

Plot the result of the registration between raw and autofluorescence as an overlay plot

Returns

plot_registration_results_side_by_side()[source]#

Plot the result of the registration between autofluorescence and reference atlas side-by-side in synchronised plots

Returns

plot_registration_results_side_by_side_raw()[source]#

Plot the result of the registration between raw and autofluorescence side-by-side in synchronised plots

Returns

plot_stitching_results()[source]#

Plot the stitched image in 3D in the viewer

Returns

preview_stitching_dumb(color)[source]#

Preview the stitching based only on a dumb overlay of the tiles i.e. only using the fixed guess overlap

Parameters:

color (bool) – Whether to stitch in chessboard or continuous grayscale

Returns

preview_stitching_smart(postfix='aligned_axis')[source]#

Preview the stitching based on the actual stitching variable, rigid by default.

Parameters:

postfix (str) – One of (‘aligned_axis’, ‘aligned’, ‘placed’)

Returns

run_registration()[source]#

Run the actual registration between the sample and the reference atlas.

Returns

run_stitching()[source]#

Run the actual stitching steps based on the values in the config file (set from the UI). .. rubric:: Returns

set_params(sample_params)[source]#

Set the params object which links the UI and the configuration file :param sample_params: The params object that links the UI to the config for all the properties intrinsic to the sample :type sample_params: SampleParameters

Returns

set_progress_watcher(watcher)[source]#

Setup the watcher object that will handle the progress in the computation for this tab

Parameters:

watcher (ProgressWatcher) – The object that tracks the progress

Returns

setup()[source]#

Setup the UI elements, notably the signal/slot connections which are not automatically set through the params object attribute

Returns

setup_atlas()[source]#

Setup the atlas that corresponds to the orientation and crop

Returns

setup_workers()[source]#

Setup the worker (PreProcessor) which handle the computations associated with this tab .. rubric:: Returns

write_registration_landmark_coords(direction)[source]#

Write the corresponding landmarks to file for use in landmark optimised registration

Parameters:

direction (str) – The direction of the transformation. One of (‘auto_to_reference’, ‘resampled_to_auto’)

Returns

class BatchProcessingTab(main_window, tab_idx=4)[source]#

Bases: BatchTab

run_batch_process()[source]#
set_params()[source]#

Set the params object which links the UI and the configuration file :param args:

Returns

setup()[source]#

Setup the UI elements, notably the signal/slot connections which are not automatically set through the params object attribute

Returns

class BatchTab(main_window, name, tab_idx, ui_file_name)[source]#

Bases: GenericTab

create_wizard()[source]#
setup()[source]#
setup_results_folder()[source]#
property initialised#
class CellCounterTab(main_window, tab_idx=2)[source]#

Bases: PostProcessingTab

The tab responsible for the cell detection and cell coordinates alignment

create_cell_detection_tuning_sample()[source]#

Create an array from a subset of the sample to perform tests on .. rubric:: Returns

detect_cells()[source]#

Run the cell detection on the whole sample

Returns

filter_cells()[source]#
handle_tool_tab_changed(tab_idx)[source]#

Triggered when a new sub tab (tooltab) of the cell detection tab is selected. It will either plot the cell parameter distributions or update the cell count display.

Parameters:

tab_idx

Returns

plot_cell_filter_results()[source]#

Plot the cells as colored dots on top of the raw image fraction used for tests .. rubric:: Returns

plot_cell_map_results()[source]#

Plot the voxelisation (density map) result .. rubric:: Returns

plot_cells_scatter_w_atlas_colors()[source]#

Plot the cells as colored symbols on top of the resampled (aligned) image .. rubric:: Returns

plot_cells_scatter_w_atlas_colors_raw()[source]#

Plot the cells as colored symbols on top of the raw stitched (not aligned) image .. rubric:: Returns

plot_debug_cropping_interface()[source]#

Plot the orthoslicer to select a subset of the sample to perform cell detections tests on

Returns

plot_detection_results()[source]#

Display the different steps of the cell detection in a grid to evaluate the filters

Returns

preview_cell_filter()[source]#
run_cell_map()[source]#

Run the whole pipeline at once .. rubric:: Returns

run_tuning_cell_detection()[source]#

Run the cell detection on a subset of the sample which was previously selected

Returns

set_params(sample_params, alignment_params)[source]#

Set the params object which links the UI and the configuration file :param sample_params: The params object that links the UI to the config for all the properties intrinsic to the sample :type sample_params: SampleParameters :param alignment_params: The params object that links the UI to the config for things related to sample alignment :type alignment_params: AlignmentParams

Returns

set_progress_watcher(watcher)[source]#

Setup the watcher object that will handle the progress in the computation for this tab

Parameters:

watcher (ProgressWatcher) – The object that tracks the progress

Returns

setup()[source]#

Setup the UI elements, notably the signal/slot connections which are not automatically set through the params object attribute

Returns

setup_cell_detector()[source]#

Post configuration of the CellDetector object # FIXME: check redundancy with above

Returns

setup_cell_param_histogram(cells, plot_item, key='size', x_log=False)[source]#

Plots the histogram of the cell parameter defined by key. This is used to display the distribution of cell sizes or intensities

Parameters:
  • cells (pd.DataFrame) – The Cells dataframe containing one row per detected cell

  • plot_item (QWidget or None) – The Plot element to plot into. If None, creates a new one

  • key (str) –

    The key (cell attribute) in the dataframe to plot.

    One of ‘size’ or ‘source’

  • x_log (bool) – X axis is log

Returns

setup_workers()[source]#

Setup the cell detection worker, which handle the computations associated with this tab

Returns

update_cell_number()[source]#

Update the cell count number displayed based on the size of the raw and filtered cell detection files .. rubric:: Returns

voxelize()[source]#

Creates the cell density plot .. rubric:: Returns

class GroupAnalysisProcessor(progress_watcher, results_folder=None)[source]#

Bases: object

compute_p_vals(selected_comparisons, groups, wrapping_func, advanced=False)[source]#
plot_density_maps(group_folders, parent=None)[source]#
plot_p_vals(selected_comparisons, groups, parent=None)[source]#
run_plots(plot_function, selected_comparisons, plot_kw_args)[source]#
class GroupAnalysisTab(main_window, tab_idx=4)[source]#

Bases: BatchTab

handle_tool_changed(idx)[source]#
make_group_stats_tables()[source]#
plot_density_maps(group_name)[source]#
plot_histograms(fold_threshold=2)[source]#
plot_p_vals()[source]#
plot_volcanoes()[source]#
run_p_vals()[source]#
run_plots(plot_function, plot_kw_args)[source]#
set_params()[source]#

Set the params object which links the UI and the configuration file :param args:

Returns

setup()[source]#

Setup the UI elements, notably the signal/slot connections which are not automatically set through the params object attribute

Returns

setup_workers()[source]#

Setup the optional workers (which handle the computations) associated with this tab .. rubric:: Returns

class SampleTab(main_window, tab_idx=0)[source]#

Bases: GenericTab

The tab manager to define the parameters of the sample This refers to values that are intrinsic to the sample and the acquisition like resolution, orientation …

display_atlas()[source]#

Plot the atlas as a FIXME: .. rubric:: Returns

display_sample_id(sample_id)[source]#

Display the sample ID to the corresponding UI widget :param sample_id: The unique ID for that sample :type sample_id: str

Returns

display_use_id_as_prefix(use_id)[source]#

Displays whether to use the ID as prefix in the corresponding widget of the UI

Parameters:

use_id (bool) – Whether to se the sample ID as prefix in the file names

Returns

get_sample_id()[source]#

Get the sample ID from the GUI widget .. rubric:: Returns

go_to_orientation()[source]#

Jump to the sample orientation (space info) tab

Returns

launch_pattern_wizard()[source]#

Start the pattern selection wizard. This wizard helps create the pattern strings for the individual tiles, with specific characters representing the digits for the different axes.

Returns

load_config_to_gui()[source]#

Set every control on the UI to the value in the params .. rubric:: Returns

plot_mini_brain()[source]#

Plot the brain icon which represents the acquisition sample orientation graphically to help users pick the right orientation.

Returns

save_cfg()[source]#

Save the config to file

Returns

set_params(*args)[source]#

Set the params object which links the UI and the configuration file :param args:

Returns

setup()[source]#

Setup the UI elements, notably the signal/slot connections which are not automatically set through the params object attribute

Returns

property src_folder#
class VasculatureTab(main_window, tab_idx=3)[source]#

Bases: PostProcessingTab

The tab responsible for the vasculature tracts detection, graph extraction and analysis

binarize_channel(channel, stop_on_error=False)[source]#

Perform all the selected binarization steps on the given channel

Parameters:
  • channel

  • stop_on_error

Returns

build_graph()[source]#

Run the pipeline to build the vasculature graph .. rubric:: Returns

combine()[source]#

Combine the binarized (thresholded) version of the different channels. .. rubric:: Returns

display_graph_chunk(graph_step)[source]#

Display a chunk of the graph selected with the slicer

Parameters:

graph_step (str) – The name of the step to display (from ‘raw’, ‘cleaned’, ‘reduced’, ‘annotated’)

Returns

display_graph_chunk_from_cfg()[source]#
pick_region()[source]#

Open a dialog to select a brain region and plot it .. rubric:: Returns

plot_binarization_results(plot_side_by_side=True)[source]#

Plot the thresholded images resulting from the binarization at the steps specified by the comboboxes in the UI.

Parameters:

plot_side_by_side

Returns

plot_graph_structure()[source]#

Plot a subregion of the vasculature graph corresponding to a structure using the atlas registration results .. rubric:: Returns

plot_graph_type_processing_chunk_slicer()[source]#

Plot the orthoslicer to pick a sub part of the graph to display because depending on the display options, the whole graph may not fit in memory

Returns

plot_voxelization()[source]#

Plot the density map .. rubric:: Returns

post_process_graph()[source]#

Post process the graph by filtering, tracing and removing capillaries .. rubric:: Returns

run_all()[source]#

Run the whole vasculature pipeline at once

Returns

save_stats()[source]#

Save the stats of the graph .. rubric:: Returns

set_params(sample_params, alignment_params)[source]#

Set the params object which links the UI and the configuration file :param sample_params: The params object that links the UI to the config for all the properties intrinsic to the sample :type sample_params: SampleParameters :param alignment_params: The params object that links the UI to the config for things related to sample alignment :type alignment_params: AlignmentParams

Returns

set_progress_watcher(watcher)[source]#

Setup the watcher object that will handle the progress in the computation for this tab

Parameters:

watcher (ProgressWatcher) – The object that tracks the progress

Returns

setup()[source]#

Setup the UI elements, notably the signal/slot connections which are not automatically set through the params object attribute

Returns

setup_preproc(pre_processor)[source]#

Associate the preprocessor to the current tab

Parameters:

pre_processor (PreProcessor)

Returns

setup_vessel_processors()[source]#

Post configuration of the BinaryVesselProcessor and VesselGraphProcessor objects # FIXME: check redundancy with above

Returns

setup_workers()[source]#
Setup the BinaryVesselProcessor and VesselGraphProcessor workers,

which handle the computations associated with this tab

Returns

unload_temporary_graphs()[source]#

Unload the temporary vasculature graph objects to free up RAM

voxelize()[source]#

Run the voxelisation (density map) on the vasculature graph .. rubric:: Returns