pyanno4rt.gui.windows._main_window

Main window.

Overview

Classes

MainWindow

Main window for the GUI.

Classes

class pyanno4rt.gui.windows._main_window.MainWindow(treatment_plan, application=None)[source]

Bases: PyQt5.QtWidgets.QMainWindow, pyanno4rt.gui.compilations.main_window.Ui_main_window

Main window for the GUI.

This class creates the main window for the graphical user interface, including logo, labels, and input/control elements.

Parameters:
  • treatment_plan (object of class TreatmentPlan) – Instance of the class TreatmentPlan, which provides methods and classes to generate treatment plans.

  • application (object of class SpyderQApplication) – Instance of the class SpyderQApplication for managing control flow and main settings of the graphical user interface.

Overview

Methods

connect_signals()

Connect the event signals to the GUI elements.

eventFilter(source, event)

Customize the event filters.

mousePressEvent(event)

-

set_initial_plan(treatment_plan)

Set the initial treatment plan in the GUI.

set_enabled(fieldnames)

Enable multiple fields by their names.

set_disabled(fieldnames)

Disable multiple fields by their names.

set_zero_line_cursor(fieldnames)

Set the line edit cursor positions to zero.

set_styles(key_value_pairs)

Set the element stylesheets from key-value pairs.

activate(treatment_plan)

Activate a treatment plan instance in the GUI.

load_tpi()

Load the treatment plan from a snapshot folder.

save_tpi()

Save the treatment plan to a snapshot folder.

drop_tpi()

Remove the current treatment plan.

select_plan()

Select a treatment plan.

initialize()

Initialize the treatment plan.

configure()

Configure the treatment plan.

optimize()

Optimize the treatment plan.

evaluate()

Evaluate the treatment plan.

visualize()

Visualize the treatment plan.

update_configuration()

Update the configuration parameters.

update_optimization()

Update the optimization parameters.

update_evaluation()

Update the evaluation parameters.

set_configuration()

Set the configuration parameters.

set_optimization()

Set the optimization parameters.

set_evaluation()

Set the evaluation parameters.

clear_configuration()

Clear the configuration parameters.

clear_optimization()

Clear the optimization parameters.

clear_evaluation()

Clear the evaluation parameters.

transform_configuration_to_dict()

Transform the configuration fields into a dictionary.

transform_optimization_to_dict()

Transform the optimization fields into a dictionary.

transform_evaluation_to_dict()

Transform the evaluation fields into a dictionary.

open_plan_creation_window()

Open the plan creation window.

open_settings_window()

Open the settings window.

open_info_window()

Open the information window.

open_compare_window()

Open the plan comparison window.

open_component_window(name)

Open a component window.

open_parameter_window()

Open the plan parameter window.

open_plan_window()

Open the plan data window.

open_model_data_window()

Open the model data window.

open_feature_map_window()

Open the feature map window.

open_log_window()

Open the log window.

open_question_dialog()

Open a question dialog.

add_imaging_path()

Add the CT and segmentation data from a folder.

add_dose_matrix_path()

Add the dose-influence matrix from a folder.

remove_component()

Remove the selected component from the instance.

edit_component()

Open a component window.

add_initial_fluence_vector()

Add the initial fluence vector from a file.

add_lower_var_bounds()

Add the lower variable bounds from a file.

add_upper_var_bounds()

Add the upper variable bounds from a file.

update_init_button()

.

update_by_initial_strategy()

Update the GUI by the initial strategy.

update_by_initial_fluence()

Update the GUI by the initial fluence vector.

update_by_reference()

Update the GUI by the reference plan.

update_by_method()

Update the GUI by the optimization method.

update_by_solver()

Update the GUI by the solver.

update_reference_plans()

Update the available reference plans.

update_comparison_plans()

.

update_compare_button()

.

exit_window()

Exit the session and close the window.

Members

connect_signals()[source]

Connect the event signals to the GUI elements.

eventFilter(source, event)[source]

Customize the event filters.

Parameters:
  • source

  • event

Return type:

mousePressEvent(event)[source]
set_initial_plan(treatment_plan)[source]

Set the initial treatment plan in the GUI.

Parameters:

treatment_plan

set_enabled(fieldnames)[source]

Enable multiple fields by their names.

Parameters:

fieldnames

set_disabled(fieldnames)[source]

Disable multiple fields by their names.

Parameters:

fieldnames

set_zero_line_cursor(fieldnames)[source]

Set the line edit cursor positions to zero.

Parameters:

fieldnames

set_styles(key_value_pairs)[source]

Set the element stylesheets from key-value pairs.

Parameters:

key_value_pairs

activate(treatment_plan)[source]

Activate a treatment plan instance in the GUI.

Parameters:

treatment_plan

load_tpi()[source]

Load the treatment plan from a snapshot folder.

save_tpi()[source]

Save the treatment plan to a snapshot folder.

drop_tpi()[source]

Remove the current treatment plan.

select_plan()[source]

Select a treatment plan.

initialize()[source]

Initialize the treatment plan.

Returns:

Indicator for the success of the initialization.

Return type:

bool

configure()[source]

Configure the treatment plan.

Returns:

Indicator for the success of the configuration.

Return type:

bool

optimize()[source]

Optimize the treatment plan.

Returns:

Indicator for the success of the optimization.

Return type:

bool

evaluate()[source]

Evaluate the treatment plan.

Returns:

Indicator for the success of the evaluation.

Return type:

bool

visualize()[source]

Visualize the treatment plan.

Returns:

Indicator for the success of the visualization.

Return type:

bool

update_configuration()[source]

Update the configuration parameters.

update_optimization()[source]

Update the optimization parameters.

update_evaluation()[source]

Update the evaluation parameters.

set_configuration()[source]

Set the configuration parameters.

set_optimization()[source]

Set the optimization parameters.

set_evaluation()[source]

Set the evaluation parameters.

clear_configuration()[source]

Clear the configuration parameters.

clear_optimization()[source]

Clear the optimization parameters.

clear_evaluation()[source]

Clear the evaluation parameters.

transform_configuration_to_dict()[source]

Transform the configuration fields into a dictionary.

Returns:

Dictionary with the configuration parameters.

Return type:

dict

transform_optimization_to_dict()[source]

Transform the optimization fields into a dictionary.

Returns:

Dictionary with the optimization parameters.

Return type:

dict

transform_evaluation_to_dict()[source]

Transform the evaluation fields into a dictionary.

Returns:

Dictionary with the evaluation parameters.

Return type:

dict

open_plan_creation_window()[source]

Open the plan creation window.

open_settings_window()[source]

Open the settings window.

open_info_window()[source]

Open the information window.

open_compare_window()[source]

Open the plan comparison window.

open_component_window(name)[source]

Open a component window.

open_parameter_window()[source]

Open the plan parameter window.

open_plan_window()[source]

Open the plan data window.

open_model_data_window()[source]

Open the model data window.

open_feature_map_window()[source]

Open the feature map window.

open_log_window()[source]

Open the log window.

open_question_dialog()[source]

Open a question dialog.

add_imaging_path()[source]

Add the CT and segmentation data from a folder.

add_dose_matrix_path()[source]

Add the dose-influence matrix from a folder.

remove_component()[source]

Remove the selected component from the instance.

edit_component()[source]

Open a component window.

add_initial_fluence_vector()[source]

Add the initial fluence vector from a file.

add_lower_var_bounds()[source]

Add the lower variable bounds from a file.

add_upper_var_bounds()[source]

Add the upper variable bounds from a file.

update_init_button()[source]

.

update_by_initial_strategy()[source]

Update the GUI by the initial strategy.

update_by_initial_fluence()[source]

Update the GUI by the initial fluence vector.

update_by_reference()[source]

Update the GUI by the reference plan.

update_by_method()[source]

Update the GUI by the optimization method.

update_by_solver()[source]

Update the GUI by the solver.

update_reference_plans()[source]

Update the available reference plans.

update_comparison_plans()[source]

.

update_compare_button()[source]

.

exit_window()[source]

Exit the session and close the window.