navigate.controller.sub_controllers.multiposition.MultiPositionController
- class navigate.controller.sub_controllers.multiposition.MultiPositionController(view, parent_controller=None)
Bases:
GUIController
Controller for the Multi-Position Acquisition Interface.
- __init__(view, parent_controller=None)
Initialize the Multi-Position Acquisition Interface.
- Parameters:
view (MultiPositionView) – view for the Multi-Position Acquisition Interface
parent_controller (Controller, optional) – parent controller, by default None
Methods
__init__
(view[, parent_controller])Initialize the Multi-Position Acquisition Interface.
Add the current stage position to the Multi-Position Acquisition Interface.
append_position
(position)Append a position to the Multi-Position Acquisition Interface.
Eliminate tiles that do not contain tissue.
execute
(command, *args)This function is called when a command is passed from a child process.
Export the positions in the Multi-Position Acquisition Interface to a csv file.
Return the number of positions in the Multi-Position Acquisition Interface.
Return all positions from the Multi-Position Acquisition Interface.
handle_double_click
(event)Move to a position within the Multi-Position Acquisition Interface.
This function is called when the controller is initialized
Insert a row in the Multi-Position Acquisition Interface.
Load a csv file.
Move to a position within the Multi-Position Acquisition Interface.
register_event_listener
(event_name, ...)Register event listener in the parent_controller
remove_positions
(position_flag_list)Remove positions according to position_flag_list
Sets values of widgets based on experiment setting
set_positions
(positions)Set positions to multi-position's table
show_verbose_info
(*info)Prints verbose information to the console
Collects all the values of widgets
Attributes
Return custom events for the Multi-Position Controller.
Multi-Position Acquisition Interface
- add_stage_position()
Add the current stage position to the Multi-Position Acquisition Interface.
This function will get the stage’s current position, Then add it to position list
- append_position(position)
Append a position to the Multi-Position Acquisition Interface.
- Parameters:
position (dict) – position in the format of {axis: value}
- eliminate_tiles()
Eliminate tiles that do not contain tissue.
- execute(command, *args)
This function is called when a command is passed from a child process.
- Parameters:
command (str) – command name
args (tuple) – command arguments
- export_positions()
Export the positions in the Multi-Position Acquisition Interface to a csv file.
This function opens a dialog that let the user input a filename Then, it will export positions to that csv file
- get_position_num()
Return the number of positions in the Multi-Position Acquisition Interface.
- Returns:
number of positions
- Return type:
int
- get_positions()
Return all positions from the Multi-Position Acquisition Interface.
- Returns:
positions in the format of [[x, y, z, theta, f], ]
- Return type:
list
- handle_double_click(event)
Move to a position within the Multi-Position Acquisition Interface.
When double-clicked the row head, it will call the parent/central controller to move stage and update stage view
- Parameters:
event (tkinter event) – event that triggers the function
- initialize()
This function is called when the controller is initialized
This function initializes GUI based on configuration setting parameter: configuration_controller set range value for entry or spinbox widgets; add values to combobox get other necessary information for configuration.yml
- insert_row_func()
Insert a row in the Multi-Position Acquisition Interface.
- load_positions()
Load a csv file.
The valid csv file should contain the line of headers: stage axes
- move_to_position()
Move to a position within the Multi-Position Acquisition Interface.
- register_event_listener(event_name, event_handler)
Register event listener in the parent_controller
- Parameters:
event_name (str) – event name
event_handler (function) – event handler
- remove_positions(position_flag_list)
Remove positions according to position_flag_list
- Parameters:
position_flag_list (list[bool]) – False: the position should be removed True: the position should be kept
- set_experiment_values()
Sets values of widgets based on experiment setting
setting_dict is a dictionary
- set_positions(positions)
Set positions to multi-position’s table
- Parameters:
positions ([[]]) – positions to be set
- show_verbose_info(*info)
Prints verbose information to the console
- Parameters:
info (tuple) – information to be printed
- update_experiment_values()
Collects all the values of widgets
setting_dict is a reference of experiment dictionary update the dictionary directly
- property custom_events
Return custom events for the Multi-Position Controller.
- parent_controller
parent controller
- Type:
- table
Multi-Position Acquisition Interface
- Type:
- view
GUI view
- Type:
tkinter.Tk