populse_mia.user_interface package¶
User interface module, encompass the main window and its tabs definition, as well as pop ups.
- Contains:
- Modules:
data_browser
data_viewer
main_window
pipeline_manager
pop_ups
Subpackages¶
- populse_mia.user_interface.data_browser package
- Submodules
- populse_mia.user_interface.data_browser.advanced_search module
AdvancedSearch
AdvancedSearch.__init__()
AdvancedSearch.add_search_bar()
AdvancedSearch.apply_filter()
AdvancedSearch.displayConditionRules()
AdvancedSearch.displayValueRules()
AdvancedSearch.get_filters()
AdvancedSearch.launch_search()
AdvancedSearch.prepare_filters()
AdvancedSearch.refresh_search()
AdvancedSearch.remove_row()
AdvancedSearch.rows_borders_added()
AdvancedSearch.rows_borders_removed()
AdvancedSearch.show_search()
- populse_mia.user_interface.data_browser.count_table module
- populse_mia.user_interface.data_browser.data_browser module
DataBrowser
DataBrowser.__init__()
DataBrowser.add_tag_infos()
DataBrowser.add_tag_pop_up()
DataBrowser.clone_tag_infos()
DataBrowser.clone_tag_pop_up()
DataBrowser.connect_actions()
DataBrowser.connect_mini_viewer()
DataBrowser.connect_toolbar()
DataBrowser.count_table_pop_up()
DataBrowser.create_layout()
DataBrowser.create_toolbar_view()
DataBrowser.move_splitter()
DataBrowser.open_filter()
DataBrowser.open_filter_infos()
DataBrowser.remove_tag_infos()
DataBrowser.remove_tag_pop_up()
DataBrowser.reset_search_bar()
DataBrowser.run_advanced_search()
DataBrowser.search_str()
DataBrowser.send_documents_to_pipeline()
DataBrowser.update_database()
DateFormatDelegate
DateTimeFormatDelegate
NumberFormatDelegate
TableDataBrowser
TableDataBrowser.__init__()
TableDataBrowser.add_column()
TableDataBrowser.add_columns()
TableDataBrowser.add_path()
TableDataBrowser.add_rows()
TableDataBrowser.change_cell_color()
TableDataBrowser.clear_cell()
TableDataBrowser.context_menu_table()
TableDataBrowser.delete_from_brick()
TableDataBrowser.display_file()
TableDataBrowser.display_unreset_values()
TableDataBrowser.edit_table_data_values()
TableDataBrowser.fill_cells_update_table()
TableDataBrowser.fill_headers()
TableDataBrowser.get_current_filter()
TableDataBrowser.get_index_insertion()
TableDataBrowser.get_scan_row()
TableDataBrowser.get_tag_column()
TableDataBrowser.mouseReleaseEvent()
TableDataBrowser.multiple_sort_infos()
TableDataBrowser.multiple_sort_pop_up()
TableDataBrowser.remove_scan()
TableDataBrowser.reset_cell()
TableDataBrowser.reset_column()
TableDataBrowser.reset_row()
TableDataBrowser.section_moved()
TableDataBrowser.select_all_column()
TableDataBrowser.select_all_columns()
TableDataBrowser.selection_changed()
TableDataBrowser.show_brick_history()
TableDataBrowser.sort_column()
TableDataBrowser.sort_updated()
TableDataBrowser.update_colors()
TableDataBrowser.update_selection()
TableDataBrowser.update_table()
TableDataBrowser.update_visualized_columns()
TableDataBrowser.update_visualized_rows()
TableDataBrowser.visualized_tags_pop_up()
TimeFormatDelegate
- populse_mia.user_interface.data_browser.mini_viewer module
MiniViewer
MiniViewer.__init__()
MiniViewer.boxSlider()
MiniViewer.changePosValue()
MiniViewer.check_box_cursors_state_changed()
MiniViewer.clear()
MiniViewer.clear_layouts()
MiniViewer.createDimensionLabels()
MiniViewer.createFieldValue()
MiniViewer.create_slider()
MiniViewer.displayPosValue()
MiniViewer.enableSliders()
MiniViewer.image2DModifications()
MiniViewer.image_to_pixmap()
MiniViewer.indexImage()
MiniViewer.mem_release()
MiniViewer.navigImage()
MiniViewer.openTagsPopUp()
MiniViewer.setThumbnail()
MiniViewer.show_slices()
MiniViewer.update_nb_slices()
MiniViewer.update_visualization_method()
MiniViewer.verify_slices()
- populse_mia.user_interface.data_browser.modify_table module
- populse_mia.user_interface.data_browser.rapid_search module
- populse_mia.user_interface.data_viewer package
- Subpackages
- populse_mia.user_interface.data_viewer.anatomist package
- populse_mia.user_interface.data_viewer.anatomist_2 package
- Submodules
- populse_mia.user_interface.data_viewer.anatomist_2.anasimpleviewer2 module
- populse_mia.user_interface.data_viewer.anatomist_2.mia_anatomist module
- populse_mia.user_interface.data_viewer.anatomist_2.resources module
- populse_mia.user_interface.data_viewer.anatomist_2.resources_snd_window module
- populse_mia.user_interface.data_viewer.anatomist_2.snd_window module
- Submodules
- populse_mia.user_interface.data_viewer.data_viewer module
- populse_mia.user_interface.data_viewer.data_viewer_tab module
- Subpackages
- populse_mia.user_interface.pipeline_manager package
- Submodules
- populse_mia.user_interface.pipeline_manager.iteration_table module
IterationTable
IterationTable.__init__()
IterationTable.add_tag()
IterationTable.emit_iteration_table_updated()
IterationTable.fill_values()
IterationTable.filter_values()
IterationTable.iteration_table_updated
IterationTable.refresh_layout()
IterationTable.remove_tag()
IterationTable.select_iteration_tag()
IterationTable.select_visualized_tag()
IterationTable.update_iterated_tag()
IterationTable.update_selected_tag()
IterationTable.update_table()
- populse_mia.user_interface.pipeline_manager.node_controller module
AttributesFilter
CapsulNodeController
CapsulNodeController.__init__()
CapsulNodeController.display_parameters()
CapsulNodeController.filter_attributes()
CapsulNodeController.parameters_changed()
CapsulNodeController.release_process()
CapsulNodeController.rename_subprocesses()
CapsulNodeController.static_release()
CapsulNodeController.update_attributes_from_filter()
CapsulNodeController.update_node_name()
CapsulNodeController.update_parameters()
CapsulNodeController.value_changed
FilterWidget
NodeController
NodeController.__init__()
NodeController.clearLayout()
NodeController.display_filter()
NodeController.display_parameters()
NodeController.get_index_from_plug_name()
NodeController.release_process()
NodeController.rename_subprocesses()
NodeController.update_node_name()
NodeController.update_parameters()
NodeController.update_plug_value()
NodeController.update_plug_value_from_filter()
NodeController.value_changed
PlugFilter
values()
- populse_mia.user_interface.pipeline_manager.pipeline_editor module
PipelineEditor
PipelineEditor.__init__()
PipelineEditor.add_link()
PipelineEditor.add_named_process()
PipelineEditor.check_modifications()
PipelineEditor.del_node()
PipelineEditor.export_node_plugs()
PipelineEditor.get_current_filename()
PipelineEditor.pipeline_modified
PipelineEditor.pipeline_saved
PipelineEditor.save_pipeline()
PipelineEditor.update_history()
PipelineEditor.update_node_name()
PipelineEditor.update_plug_value()
PipelineEditorTabs
PipelineEditorTabs.__init__()
PipelineEditorTabs.check_modifications()
PipelineEditorTabs.close_tab()
PipelineEditorTabs.emit_node_clicked()
PipelineEditorTabs.emit_pipeline_saved()
PipelineEditorTabs.emit_switch_clicked()
PipelineEditorTabs.export_to_db_scans()
PipelineEditorTabs.get_capsul_engine()
PipelineEditorTabs.get_current_editor()
PipelineEditorTabs.get_current_filename()
PipelineEditorTabs.get_current_pipeline()
PipelineEditorTabs.get_current_tab_name()
PipelineEditorTabs.get_editor_by_file_name()
PipelineEditorTabs.get_editor_by_index()
PipelineEditorTabs.get_editor_by_tab_name()
PipelineEditorTabs.get_filename_by_index()
PipelineEditorTabs.get_index_by_editor()
PipelineEditorTabs.get_index_by_filename()
PipelineEditorTabs.get_index_by_tab_name()
PipelineEditorTabs.get_tab_name_by_index()
PipelineEditorTabs.has_pipeline_nodes()
PipelineEditorTabs.load_pipeline()
PipelineEditorTabs.load_pipeline_parameters()
PipelineEditorTabs.new_tab()
PipelineEditorTabs.node_clicked
PipelineEditorTabs.open_filter()
PipelineEditorTabs.open_sub_pipeline()
PipelineEditorTabs.pipeline_saved
PipelineEditorTabs.process_clicked
PipelineEditorTabs.reset_pipeline()
PipelineEditorTabs.save_pipeline()
PipelineEditorTabs.save_pipeline_parameters()
PipelineEditorTabs.set_current_editor_by_editor()
PipelineEditorTabs.set_current_editor_by_file_name()
PipelineEditorTabs.set_current_editor_by_tab_name()
PipelineEditorTabs.set_tab_index()
PipelineEditorTabs.switch_clicked
PipelineEditorTabs.update_current_node()
PipelineEditorTabs.update_history()
PipelineEditorTabs.update_iteration_checkbox()
PipelineEditorTabs.update_pipeline_editors()
PipelineEditorTabs.update_scans_list()
find_filename()
get_path()
save_pipeline()
values()
- populse_mia.user_interface.pipeline_manager.pipeline_manager_tab module
PipelineManagerTab
PipelineManagerTab.__init__()
PipelineManagerTab.add_plug_value_to_database()
PipelineManagerTab.ask_iterated_pipeline_plugs()
PipelineManagerTab.build_iterated_pipeline()
PipelineManagerTab.check_requirements()
PipelineManagerTab.cleanup_older_init()
PipelineManagerTab.complete_pipeline_parameters()
PipelineManagerTab.controller_value_changed()
PipelineManagerTab.displayNodeParameters()
PipelineManagerTab.finish_execution()
PipelineManagerTab.garbage_collect()
PipelineManagerTab.get_capsul_engine()
PipelineManagerTab.get_missing_mandatory_parameters()
PipelineManagerTab.get_pipeline_or_process()
PipelineManagerTab.init_pipeline()
PipelineManagerTab.initialize()
PipelineManagerTab.item_library_clicked
PipelineManagerTab.layout_view()
PipelineManagerTab.loadParameters()
PipelineManagerTab.loadPipeline()
PipelineManagerTab.postprocess_pipeline_execution()
PipelineManagerTab.redo()
PipelineManagerTab.register_completion_attributes()
PipelineManagerTab.remove_progress()
PipelineManagerTab.runPipeline()
PipelineManagerTab.saveParameters()
PipelineManagerTab.savePipeline()
PipelineManagerTab.savePipelineAs()
PipelineManagerTab.show_status()
PipelineManagerTab.stop_execution()
PipelineManagerTab.undo()
PipelineManagerTab.updateProcessLibrary()
PipelineManagerTab.update_auto_inheritance()
PipelineManagerTab.update_inheritance()
PipelineManagerTab.update_node_list()
PipelineManagerTab.update_project()
PipelineManagerTab.update_scans_list()
PipelineManagerTab.update_user_buttons_states()
PipelineManagerTab.update_user_mode()
RunProgress
RunWorker
StatusWidget
- populse_mia.user_interface.pipeline_manager.process_library module
DictionaryTreeModel
DictionaryTreeModel.__init__()
DictionaryTreeModel.columnCount()
DictionaryTreeModel.data()
DictionaryTreeModel.flags()
DictionaryTreeModel.getNode()
DictionaryTreeModel.headerData()
DictionaryTreeModel.index()
DictionaryTreeModel.insertRows()
DictionaryTreeModel.mimeData()
DictionaryTreeModel.mimeTypes()
DictionaryTreeModel.parent()
DictionaryTreeModel.removeRows()
DictionaryTreeModel.rowCount()
DictionaryTreeModel.setData()
DictionaryTreeModel.to_dict()
InstallProcesses
Node
PackageLibrary
PackageLibraryDialog
PackageLibraryDialog.__init__()
PackageLibraryDialog.add_package()
PackageLibraryDialog.add_package_with_text()
PackageLibraryDialog.delete_package()
PackageLibraryDialog.delete_package_with_text()
PackageLibraryDialog.install_processes_pop_up()
PackageLibraryDialog.load_config()
PackageLibraryDialog.load_packages()
PackageLibraryDialog.ok_clicked()
PackageLibraryDialog.remove_package()
PackageLibraryDialog.remove_package_with_text()
PackageLibraryDialog.reset_action()
PackageLibraryDialog.save()
PackageLibraryDialog.signal_save
PackageLibraryDialog.update_config()
ProcessLibrary
ProcessLibraryWidget
import_file()
node_structure_from_dict()
- populse_mia.user_interface.pipeline_manager.process_mia module
MIAProcessCompletionEngine
MIAProcessCompletionEngine.__init__()
MIAProcessCompletionEngine.complete_attributes_with_database()
MIAProcessCompletionEngine.complete_nipype_common()
MIAProcessCompletionEngine.complete_parameters()
MIAProcessCompletionEngine.complete_parameters_mia()
MIAProcessCompletionEngine.get_attribute_values()
MIAProcessCompletionEngine.get_path_completion_engine()
MIAProcessCompletionEngine.get_project()
MIAProcessCompletionEngine.path_attributes()
MIAProcessCompletionEngine.remove_switch_observer()
MIAProcessCompletionEngineFactory
ProcessMIA
ProcessMIA.__init__()
ProcessMIA.ignore
ProcessMIA.ignore_node
ProcessMIA.init_default_traits()
ProcessMIA.init_process()
ProcessMIA.key
ProcessMIA.list_outputs()
ProcessMIA.load_nii()
ProcessMIA.make_initResult()
ProcessMIA.relax_nipype_exists_constraints()
ProcessMIA.requirements()
ProcessMIA.run_process_mia()
ProcessMIA.tags_inheritance()
- populse_mia.user_interface.pipeline_manager.type_editors module
PopulseDirectoryControlWidget
PopulseFileControlWidget
PopulseOffscreenListFileControlWidget
PopulseUndefinedControlWidget
PopulseUndefinedControlWidget.STYLED_UNDEFINED_TEXT
PopulseUndefinedControlWidget.UNDEFINED_TEXT
PopulseUndefinedControlWidget.VALID_REPRESENTATIONS
PopulseUndefinedControlWidget.check()
PopulseUndefinedControlWidget.connect()
PopulseUndefinedControlWidget.create_widget()
PopulseUndefinedControlWidget.disconnect()
PopulseUndefinedControlWidget.is_valid()
PopulseUndefinedControlWidget.update_controller()
PopulseUndefinedControlWidget.update_controller_widget()
Submodules¶
populse_mia.user_interface.main_window module¶
Module to define main window appearance, functions and settings.
Initialize the software appearance and defines interactions with the user.
- Contains:
- Class:
MainWindow
_ProcDeleter
- class populse_mia.user_interface.main_window.MainWindow(project, test=False, deleted_projects=None)[source]¶
Bases:
QMainWindow
Initialize software appearance and define interactions with the user.
- __init__(project, test=False, deleted_projects=None)[source]¶
Main window class, initializes the software appearance and defines interactions with the user.
- Parameters:
project – Current project in the software.
test – Boolean indicating if the widget is launched from unit tests or not.
deleted_projects – Projects that have been deleted.
- check_unsaved_modifications()[source]¶
Check if there are differences between the current project and the database.
- Return (bool):
True if there are unsaved modifications, False otherwise
- closeEvent(event)[source]¶
Override the QWidget closing event to check if there are unsaved modifications.
- Parameters:
event – closing event
Create the menu-bar view.
- get_controller_version()[source]¶
Gives the value of the controller_version_changed attribute.
- Returns:
Boolean
- import_data()[source]¶
Import MRI data using the MRI File Manager and load it into the database.
This method performs the following steps: 1. Launches the MRI conversion software to convert MRI files to
Nifti/JSON format
Attempts import with maximum heap size of 4096M, falls back to 1024M if needed
Updates the database with newly imported scans
Refreshes the data browser UI with new scan information
- install_processes_pop_up(folder=False)[source]¶
Open the install processes pop-up.
- Parameters:
folder – boolean, True if installing from a folder
- static last_window_closed()[source]¶
Force exit the event loop after ipython console is closed.
If the ipython console has been run, something prevents Qt from quitting after the window is closed. The cause is not known yet. So: force exit the event loop.
- open_project_pop_up()[source]¶
Open a dialog to select and open a project, updating recent projects list.
This method handles: 1. Checking for unsaved modifications in current project 2. Opening project selection dialog 3. Validating project path 4. Switching to new project 5. Updating clinical mode based on database fields 6. Updating database paths if project is external
- remove_raw_files_useless()[source]¶
Remove the useless raw files of the current project.
Close the database connection. The project is not valid any longer after this call.
- static run_ipconsole_kernel(mode='qtconsole')[source]¶
Starts and initializes an IPython kernel with support for a Qt-based GUI.
This method is designed to set up and run an IPython kernel for interactive computing, with the specified mode (defaulting to qtconsole). It handles initialization of the kernel and associated event loops, ensuring proper integration with Qt-based applications.
- Parameters:
(str) (mode) – The mode for running the IPython kernel. Default is “qtconsole”. It determines the GUI integration mode of the kernel.
- Return (IPKernelApp):
The instance of the IPython kernel application.
- Notes:
The method ensures that the kernel is properly initialized if it hasn’t been set up already.
To support Qt-based GUIs, the Qt event loop is properly integrated with the IPython kernel.
Special handling for Tornado versions >= 4.5 ensures compatibility with its callback mechanism.
- set_controller_version()[source]¶
Reverses the value of the controller_version_changed attribute.
From False to True and vice versa
Initialize menu actions with icons and descriptions.
- Parameters:
sources_images_dir – Directory containing source images for icons.
- switch_project(file_path, name)[source]¶
Check if it’s possible to open the selected project and quit the current one.
- Parameters:
file_path – raw file_path
name – project name
- Returns:
Boolean
- tab_changed()[source]¶
Update the window when switching between application tab.
Updates the UI state and data when switching between Data Browser, Data Viewer, and Pipeline Manager tabs. Handles data synchronization, search state preservation, and unsaved changes warnings.
The method performs the following operations based on the selected tab: - Data Browser: Refreshes table data, preserves search state and
visualization settings
Data Viewer: Loads current viewer and updates document list
- Pipeline Manager: Updates scan lists and handles unsaved
modifications
- undo()[source]¶
Reverts the last action performed by the user, depending on the active tab.
If the “Data Browser” tab is active, the undo operation is applied to the project’s database. If the “Pipeline Manager” tab is active, the pipeline manager’s undo function is invoked.
- update_project(file_path, call_update_table=True)[source]¶
Updates the project after a database change.
This method updates the database, the window title, and the recent and saved projects menus.
- Parameters:
(str) (file_path) – The file path of the new project.
(bool) (call_update_table) – Whether to update the table data. Defaults to True.
populse_mia.user_interface.pop_ups module¶
Module that defines all the pop-ups used across the Mia software.
- Contains:
- Class:
ClickableLabel
DefaultValueListCreation
DefaultValueQLineEdit
PopUpAddPath
PopUpAddTag
PopUpCloneTag
PopUpClosePipeline
PopUpDataBrowserCurrentSelection
PopUpDeletedProject
PopUpDeleteProject
PopUpFilterSelection
PopUpInformation
PopUpInheritanceDict
PopUpMultipleSort
PopUpNewProject
PopUpOpenProject
PopUpPreferences
PopUpProperties
PopUpQuit
PopUpRemoveScan
PopUpRemoveTag
PopUpSaveProjectAs
PopUpSeeAllProjects
PopUpSelectFilter
PopUpSelectIteration
PopUpTagSelection (must precede PopUpSelectTag)
PopUpSelectTag
PopUpSelectTagCountTable
PopUpShowHistory
PopUpVisualizedTags
QLabel_clickable
- class populse_mia.user_interface.pop_ups.ClickableLabel[source]¶
Bases:
QLabel
A QLabel subclass that emits a signal when clicked.
- clicked¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class populse_mia.user_interface.pop_ups.DefaultValueListCreation(parent, type)[source]¶
Bases:
QDialog
A dialog for creating or editing a list’s default value.
This widget allows users to input and manage a list of values based on a specified type (e.g., integers, floats, booleans, etc.).
- __init__(parent, type)[source]¶
Initializes the DefaultValueListCreation dialog.
- Parameters:
(DefaultValueQLineEdit) (parent) – The parent object.
(Type) (type) – The type of the list elements (e.g., int, float, str).
- add_element()[source]¶
Adds a new empty element to the list.
Increases the number of columns in the table by one and adds an empty QTableWidgetItem for user input.
- default_init_table()[source]¶
Initializes the table with a default value.
If no previous value exists, the table is set up with a single empty column to allow user input.
- remove_element()[source]¶
Removes the last element from the list.
Ensures that at least one column remains to prevent an empty table. Adjusts the table size accordingly.
- resize_table()[source]¶
Adjusts the size of the popup window based on the table content.
Dynamically resizes the table width and height based on the number of columns and rows, with a maximum width limit of 900 pixels.
- update_default_value()[source]¶
Validates user input and updates the parent’s default value.
Converts table values to the specified list type, ensuring that each entry is valid. If any value is invalid, a warning message is displayed, and the update is aborted.
If all values are valid, they are stored in the parent widget, and the dialog is closed.
- class populse_mia.user_interface.pop_ups.DefaultValueQLineEdit(parent)[source]¶
Bases:
QLineEdit
A QLineEdit override for handling default values.
This class customizes QLineEdit to handle list-type default values by displaying a popup when clicked.
- class populse_mia.user_interface.pop_ups.PopUpAddPath(project, databrowser)[source]¶
Bases:
QDialog
Dialog for adding a document to the project without using the MRI Files Manager (File > Import).
- class populse_mia.user_interface.pop_ups.PopUpAddTag(databrowser, project)[source]¶
Bases:
QDialog
Dialog for adding a new tag to the project.
This dialog allows users to create a new tag by specifying its name, default value, description, unit, and type.
- Attributes:
signal_add_tag: Signal emitted when a new tag is successfully added
- Methods:
_connect_signals: Connect signals to slots
_setup_layouts: Set up the layout of UI elements
_setup_ui: Set up the dialog UI elements
_show_error: Display an error message box
ok_action: Validates input fields and adds the new tag if valid
on_activated: Updates form fields when tag type is changed
- __init__(databrowser, project)[source]¶
Initialize the dialog for adding a new tag.
- Parameters:
databrowser – The data browser instance
project – The current project in the software
- ok_action()[source]¶
Validate inputs and add the new tag if all fields are correct.
Performs validation on the tag name, type and default value to ensure they are valid before adding the tag to the project.
- on_activated(text)[source]¶
Update the default value when the tag type changes.
- Parameters:
text – The new type selected from combo box
- signal_add_tag¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class populse_mia.user_interface.pop_ups.PopUpCloneTag(databrowser, project)[source]¶
Bases:
QDialog
Dialog for cloning an existing tag with a new name.
This dialog allows users to select an existing tag from the project and clone it with a new name.
- Attributes:
signal_clone_tag: Signal emitted when a tag is successfully cloned
- Methods:
_connect_signals: Connect signals to slots
_populate_tag_list: Populate the tag list with available tags
_setup_ui: Set up the dialog UI elements
_show_error: Display an error message box
ok_action: Validates the new tag name and clones the selected tag
search_str: Filters the tag list based on a search string
- __init__(databrowser, project)[source]¶
Initialize the dialog for cloning a tag.
- Parameters:
databrowser – The data browser instance
project – The current project in the software
- ok_action(project)[source]¶
Validate new tag name and clone the selected tag if valid.
- Parameters:
project – The current project
- search_str(project, search_text)[source]¶
Filter the tag list based on the search string.
- Parameters:
project – The current project
search_text – The search string to filter by
- signal_clone_tag¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class populse_mia.user_interface.pop_ups.PopUpClosePipeline(pipeline_name)[source]¶
Bases:
QDialog
Dialog displayed when closing a modified pipeline editor.
This dialog asks the user whether they want to save changes before closing the pipeline editor. It provides three options: save, don’t save, or cancel.
- Signals:
save_as_signal: Emitted when the user chooses to save the pipeline. do_not_save_signal: Emitted when the user chooses not to save
the pipeline.
cancel_signal: Emitted when the user cancels the closing action.
- Attributes:
- bool_save_as (bool): Indicates if the pipeline should be saved
under a new name.
bool_exit (bool): Indicates if the editor can be closed. pipeline_name (str): Name of the pipeline being edited.
- __init__(pipeline_name)[source]¶
Initialize the dialog with the pipeline name.
- Parameters:
(str) (pipeline_name) – Name of the pipeline (basename).
- can_exit()[source]¶
Check if the editor can be closed.
Return (bool): True if the editor can be closed, False otherwise.
- cancel_clicked()[source]¶
Handle the cancel button click.
Sets bool_exit to False, emits cancel_signal, and closes the dialog.
- cancel_signal¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- do_not_save_clicked()[source]¶
Handle the ‘Do not save’ button click.
Sets bool_exit to True, emits do_not_save_signal, and closes the dialog.
- do_not_save_signal¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- save_as_clicked()[source]¶
Handle the ‘Save’ button click.
Sets bool_save_as and bool_exit to True, emits save_as_signal, and closes the dialog.
- save_as_signal¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class populse_mia.user_interface.pop_ups.PopUpDataBrowserCurrentSelection(project, databrowser, filter, main_window)[source]¶
Bases:
QDialog
Dialog to display and confirm the current data browser selection.
This dialog shows a table of the currently selected document from the data browser and allows the user to confirm or cancel the selection. When confirmed, it updates the scan_list attribute of relevant components in the main window.
- Attributes:
project: Current project in the software. databrowser: Data browser instance of the software. filter: List of the current documents in the data browser. main_window: Main window of the software.
- __init__(project, databrowser, filter, main_window)[source]¶
Initialize the dialog with the current project and selection data.
- Parameters:
project – Current project in the software
databrowser – Data browser instance of the software
(list) (filter) – List of the current documents in the data browser
main_window – Main window of the software
- class populse_mia.user_interface.pop_ups.PopUpDeleteProject(main_window)[source]¶
Bases:
QDialog
Dialog for deleting selected projects.
Allows the user to select and delete one or more projects from the projects directory after confirmation.
- class populse_mia.user_interface.pop_ups.PopUpDeletedProject(deleted_projects)[source]¶
Bases:
QMessageBox
Message box that displays a list of deleted, renamed, or moved projects.
This dialog appears when the software starts and detects that previously available projects are no longer accessible at their expected locations.
- Attributes:
- deleted_projects (list): List of project names that are no longer
accessible.
- class populse_mia.user_interface.pop_ups.PopUpFilterSelection(project)[source]¶
Bases:
QDialog
Dialog for selecting a previously saved filter.
- Methods:
cancel_clicked: Closes the pop-up.
ok_clicked: Handles actions when the “OK” button is clicked.
search_str: Filters the list based on the search input.
- __init__(project)[source]¶
Initializes the pop-up dialog.
- Parameters:
(object) (project) – The current project containing saved filters
- class populse_mia.user_interface.pop_ups.PopUpInformation(project)[source]¶
Bases:
QWidget
Popup window displaying the current project’s information.
- __init__(project)[source]¶
Initializes the popup window with project details.
- Parameters:
(Project) (project) – The current project instance
- signal_preferences_change¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class populse_mia.user_interface.pop_ups.PopUpInheritanceDict(values, node_name, plug_name, iterate)[source]¶
Bases:
QDialog
Dialog for selecting tag inheritance between input and output plugs.
This dialog allows users to select which input plug should pass its tags to a specific output plug, or to choose to ignore tag inheritance altogether.
- Methods:
_setup_buttons: Set up action buttons for the dialog
_setup_radio_buttons: Set up radio buttons for each input option
ok_clicked: Event when ok button is clicked
okall_clicked: Event when Ok all button is clicked
on_clicked: Event when radiobutton is clicked
ignoreall_clicked: Event when ignore all plugs button is clicked
ignore_clicked: Event when ignore button is clicked
ignore_node_clicked: Event when ignore all nodes button is clicked
- __init__(values, node_name, plug_name, iterate)[source]¶
Initialize the inheritance selection dialog.
- Parameters:
(dict) (values) – Dict mapping input names (keys) to their paths (values)
(str) (plug_name) – Name of the current node
(str) – Name of the current output plug
(bool) (iterate) – Boolean indicating if the choice applies to iterations
- ignore_clicked()[source]¶
Handle Ignore button click.
Accepts the dialog with tag inheritance ignored for current plug.
- ignore_node_clicked()[source]¶
Handle ‘Ignore for all nodes in the pipeline’ button click.
Accepts the dialog with tag inheritance ignored for the entire pipeline.
- ignoreall_clicked()[source]¶
Handle ‘Ignore for all output plugs’ button click.
Accepts the dialog with tag inheritance ignored for all output plugs.
- ok_clicked()[source]¶
Handle OK button click.
Accepts the dialog with current selection applied to current plug.
- class populse_mia.user_interface.pop_ups.PopUpMultipleSort(project, table_data_browser)[source]¶
Bases:
QDialog
Dialog for sorting the data browser’s table based on multiple tags.
This dialog allows users to select multiple tags (columns) for sorting table data in either ascending or descending order. Users can dynamically add or remove sort criteria.
- __init__(project, table_data_browser)[source]¶
Initialize the multiple sort dialog.
- Parameters:
project – Current project in the software
table_data_browser – Data browser’s table to be sorted
- fill_values(idx)[source]¶
Collect unique values for the selected tag.
- Parameters:
idx – Index of the tag button in the push_buttons list
- class populse_mia.user_interface.pop_ups.PopUpNewProject[source]¶
Bases:
QFileDialog
Dialog for creating a new project.
This dialog is displayed when the user wants to create a new project. It manages file selection and handles the creation process.
- get_filename(file_name_tuple)[source]¶
Process the selected filename and set up project attributes.
- Parameters:
(tuple) (file_name_tuple) – Tuple containing the selected filename(s), obtained from the selectedFiles method
- Note:
If the file already exists, displays an error message. Otherwise, closes the dialog and emits signal_create_project.
- signal_create_project¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class populse_mia.user_interface.pop_ups.PopUpOpenProject[source]¶
Bases:
QFileDialog
Dialog for opening an existing MIA project.
This dialog allows users to select an existing project directory from the filesystem. It uses the default projects directory as the starting location and emits a signal when a valid project is selected.
- get_filename(file_name_tuple)[source]¶
Process the selected directory and emit signal if valid.
Sets the path, name, and relative_path attributes based on the selected directory. If the directory exists, emits signal_create_project.
- Parameters:
(tuple) (file_name_tuple) – Tuple containing selected directory path(s). Typically obtained from selectedFiles() method.
- signal_create_project¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class populse_mia.user_interface.pop_ups.PopUpPreferences(main_window)[source]¶
Bases:
QDialog
Dialog for changing software preferences.
This class manages the preferences dialog for the software, allowing users to configure various settings related to tools, projects, and appearance.
- __init__(main_window)[source]¶
Initialize the preferences dialog.
- Parameters:
main_window – The main window object of the software
- change_admin_psswd(status)[source]¶
Open a dialog to change the admin password with validation checks.
- Parameters:
(str) (status) – Initial status message to display in the dialog.
- control_checkbox_toggled()[source]¶
Check if the user really wants to change the controller version.
- create_appearance_tab(_translate)[source]¶
Create and configure the ‘Appearance’ tab with color and display settings.
- Parameters:
(callable) (_translate) – Function used to translate UI text (translate method of QCoreApplication in the Qt framework.)
- create_capsul_group(groupbox_capsul)[source]¶
Create and configure the CAPSUL group box with a configuration button.
- Parameters:
(QGroupBox) (groupbox_capsul) – The group box to be configured for CAPSUL settings.
- create_horizontal_box(*widgets, add_stretch=True)[source]¶
Create a horizontal box layout containing the specified widgets.
- Parameters:
...]) (widgets (tuple[QtWidgets.QWidget,) – The widgets to add to the layout.
(bool) (add_stretch) – Whether to add stretch at the end to push the widgets to the left. Defaults to True.
- Return (QHBoxLayout):
The created horizontal box layout.
- create_pipeline_tab(_translate)[source]¶
Create the ‘Pipeline’ tab in the settings interface.
This tab allows configuring various neuroimaging tool settings, including Matlab, SPM, FSL, AFNI, ANTS, FreeSurfer, MRtrix, and CAPSUL.
- Parameters:
(Callable) (_translate) – Function used to translate UI text (translate method of QCoreApplication in the Qt framework.)
- create_tools_tab(_translate)[source]¶
Create the ‘Tools’ tab in the settings interface.
This tab contains various sections for configuring global preferences, project-specific settings, third-party tool integration, and external resources.
- Parameters:
(Callable) (_translate) – Function used to translate UI text (translate method of QCoreApplication in the Qt framework.)
- edit_capsul_config()[source]¶
Capsul engine edition.
This method is used when user hit the Edit CAPSUL config button (File > MIA preferences > Pipeline tab).
- findChar()[source]¶
Highlights characters in red when using the Find button in the configuration editor.
This method searches for a pattern entered in the find field and highlights all matching occurrences in the text editor.
- not_use_clinical_mode_signal¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- save_full_config(config)[source]¶
Saves the full configuration and validates settings.
- Parameters:
(Config) (config) – The configuration object to update and save.
- Return (bool):
True if the configuration is valid and successfully saved, False otherwise.
- save_minimal_config(config)[source]¶
Saves a minimal configuration for CAPSUL config synchronization.
- Parameters:
(Config) (config) – The configuration object to update and save.
- show_error_message(title, message)[source]¶
Displays an error message dialog.
- Parameters:
(str) (message) – The title of the error message dialog.
(str) – The detailed error message to display.
- show_warning_message(title, message)[source]¶
Displays a warning message dialog.
- Parameters:
(str) (message) – The title of the warning message dialog.
(str) – The detailed warning message to display.
- signal_preferences_change¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- update_gui_from_capsul_config(conf)[source]¶
Updates the GUI elements based on the CAPSUL configuration.
This method retrieves the configuration settings for various neuroimaging tools (e.g., AFNI, ANTs, FreeSurfer, FSL, Matlab, SPM, etc.) and updates the corresponding GUI fields, including checkboxes and text fields.
- Parameters:
(CapsulConfig) (conf) – The CAPSUL configuration object containing the paths and usage states of different tools.
- use_clinical_mode_signal¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- validate_and_save(OK_clicked=False)[source]¶
Validate and save the preferences.
- Parameters:
(bool) (ok_clicked) – Whether the OK button was clicked (True) when this method was launched.
- Contains:
- remove_capsul_config: Helper function to remove a
module’s configuration
- clean_spm_config: Cleans the SPM configuration based
on standalone mode
clean_matlab_config: Removes MATLAB-related configuration keys
- validate_matlab_path(path, config)[source]¶
Validates the given Matlab executable path.
- Parameters:
(str) (path) – The path to the Matlab executable.
(Config) (config) – The configuration object to update.
- Return (bool):
True if the path is valid and updated in the configuration, False otherwise.
- validate_matlab_standalone_path(path, config)[source]¶
Validate the Matlab standalone path.
This method does not thoroughly test the configuration for Matlab MCR alone (without SPM standalone) due to the lack of a concrete example.
- Parameters:
(str) (path) – The path to the Matlab standalone directory.
(Config) (config) – The configuration object to update.
- Return (bool):
True if the path is valid and updated in the configuration, False otherwise.
- validate_paths(config)[source]¶
Validate the paths and settings.
This method checks the validity of paths for various neuroimaging tools (AFNI, ANTS, FreeSurfer, FSL, MRtrix, Matlab, SPM, etc.) and updates the configuration accordingly. It also validates additional paths such as the projects folder, MRIFileManager.jar path, and resources folder.
- Parameters:
(Config) (config) – The configuration object where validated paths and settings will be stored.
- Return (bool):
True if all paths and settings are valid, False otherwise.
- validate_spm_path(path, config)[source]¶
Validates the SPM path and its compatibility with Matlab.
This method checks whether the provided SPM and Matlab paths are valid. If they are already configured correctly, it enables SPM and Matlab usage without further checks. Otherwise, it attempts to run an SPM command via Matlab to confirm the setup.
- Parameters:
(str) (path) – The file path to the SPM installation.
(Config) (config) – The configuration object where validated paths and settings will be stored.
- Return (bool):
True if the SPM path and Matlab path are valid, False otherwise.
- validate_spm_standalone_path(path, config)[source]¶
Validates the SPM standalone path and its compatibility with Matlab standalone.
This method checks whether the provided paths for SPM standalone and Matlab standalone (if applicable) are valid. It also verifies system architecture compatibility and attempts to execute SPM standalone to confirm its functionality.
- Parameters:
(str) (path) – The file path to the SPM standalone installation.
(Config) (config) – The configuration object where validated paths and settings will be stored.
- Return (bool):
True if the SPM standalone and Matlab standalone paths are valid, False otherwise.
- validate_tool_path(tool_name, path, cmd, config, config_name, set_in_use, set_path)[source]¶
Validates the specified tool’s path and checks its functionality.
This method checks if the given tool path exists and verifies that the tool is functional by running a command to check its version. It also handles tool-specific setup for FreeSurfer and FSL by setting environment variables and adjusting paths as necessary.
- Parameters:
(str) (config_name) – The name of the tool to validate (e.g., “FreeSurfer”, “FSL”, “Matlab”, etc.).
(str) – The file path to the tool’s installation directory.
(str) – The command to execute within the tool’s directory to check its version.
(Config) (config) – The configuration object where validated paths and settings will be stored.
(str) – The name of the configuration setting for the tool.
(Callable) (set_path) – A function to set the tool’s “in use” status in the configuration.
(Callable) – A function to set the tool’s path in the configuration.
- Return (bool):
True if the tool’s path is valid and functional, False otherwise.
- wrong_path(path, tool, extra_mess='')[source]¶
Displays an error message for an invalid tool path.
This method restores the cursor, clears the status label, and shows a QMessageBox with an error message indicating that the provided path for a specified tool is invalid.
- Parameters:
(str) (tool) – The invalid path entered by the user.
(str) – The name of the tool for which the path is being validated.
optional) (extra_mess (str,) – Additional context for the error message, such as specifying a configuration file.
- Return (None):
This function does not return anything.
- class populse_mia.user_interface.pop_ups.PopUpProperties(project, databrowser, old_tags)[source]¶
Bases:
QDialog
Dialog for modifying project properties.
Allows users to change project settings, including visualized tags and information. Is called when the user wants to change the current project’s properties (File > properties).
- __init__(project, databrowser, old_tags)[source]¶
Initialize the project properties dialog.
- Parameters:
project – current project in the software
databrowser – data browser instance of the software
old_tags – visualized tags before opening this dialog
- signal_settings_change¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class populse_mia.user_interface.pop_ups.PopUpQuit(project)[source]¶
Bases:
QDialog
Dialog to handle unsaved project modifications when closing the software.
Provides options to save, discard, or cancel the exit process. Is called when the user closes the software and the current project has been modified.
- __init__(project)[source]¶
Initialize the quit confirmation dialog.
- Parameters:
project – Current project with unsaved modifications.
- cancel_signal¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- do_not_save_signal¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- save_as_signal¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class populse_mia.user_interface.pop_ups.PopUpRemoveScan(scan, size)[source]¶
Bases:
QDialog
Dialog to confirm removal of a scan previously sent to the pipeline manager.
Provides options to remove or keep a scan, with additional ‘apply to all’ functionality when multiple scans are involved. Is called when the user wants to remove a scan that was previously sent to the pipeline manager.
- __init__(scan, size)[source]¶
Initialize the remove scan confirmation dialog.
- Parameters:
scan – Identifier of the scan to be potentially removed.
size – Total number of scans in the removal process.
- cancel_clicked()[source]¶
Handle ‘Cancel’ action.
Sets stop flag to True and indicates no global action.
- no_all_clicked()[source]¶
Handle ‘No to All’ action.
Sets stop flag to True and indicates a global ‘No’ action.
- class populse_mia.user_interface.pop_ups.PopUpRemoveTag(databrowser, project)[source]¶
Bases:
QDialog
Dialog for removing user-defined tags from a Populse MIA project.
Allows users to select and remove custom tags from the project’s database.
- __init__(databrowser, project)[source]¶
Initialize the remove tag dialog.
- Parameters:
databrowser – Data browser instance managing project data.
project – Current project containing tags to be removed.
- ok_action()[source]¶
Process selected tags for removal and update the data browser.
Retrieves selected tags and passes them to the data browser for removal. Closes the dialog after processing.
- search_str(search_pattern)[source]¶
Filter tags based on search pattern.
- Parameters:
search_pattern – String to match against tag names.
- signal_remove_tag¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class populse_mia.user_interface.pop_ups.PopUpSaveProjectAs[source]¶
Bases:
QDialog
Dialog for saving a project under a new name.
Provides a user interface to select and save a project with a new name, with options to browse existing projects and validate the new project name.
- __init__()[source]¶
Initialize the save project as dialog.
Sets up the user interface with a scrollable list of existing projects, input field for new project name, and save/cancel buttons.
- fill_input(name)[source]¶
Fill the project name input field with the selected project name.
- Parameters:
name – Name of the project to fill in the input field.
- return_value()[source]¶
Validate and process the selected project name.
Checks project name validity, handles potential naming conflicts, and emits a signal when a valid project name is selected.
- Return (str):
Full path of the new project if successful, None otherwise.
- signal_saved_project¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class populse_mia.user_interface.pop_ups.PopUpSeeAllProjects(saved_projects, main_window)[source]¶
Bases:
QDialog
A dialog window for displaying and managing saved projects.
This dialog allows users to view a list of saved projects, check their existence, and open a selected project.
- __init__(saved_projects, main_window)[source]¶
Initialize the PopUpSeeAllProjects dialog.
- Parameters:
saved_projects – Container with a list of project paths.
main_window – Main window.
- checkState(path)[source]¶
Determine the icon based on project existence.
- Parameters:
(str) (path) – Path to the project directory.
- Returns:
QIcon: Green checkmark if project exists, red cross if not.
- class populse_mia.user_interface.pop_ups.PopUpSelectFilter(project, databrowser)[source]¶
Bases:
PopUpFilterSelection
Popup window for selecting and opening a previously saved filter.
- class populse_mia.user_interface.pop_ups.PopUpSelectIteration(iterated_tag, tag_values)[source]¶
Bases:
QDialog
Dialog for selecting values to iterate over when running an iterated pipeline.
- class populse_mia.user_interface.pop_ups.PopUpSelectTag(project)[source]¶
Bases:
PopUpTagSelection
A dialog for selecting and updating the thumbnail tag in the mini viewer.
This class allows users to choose which tag will be displayed as the thumbnail in the application’s mini viewer. It presents a list of available tags and allows selecting a single tag to be used as the thumbnail.
- class populse_mia.user_interface.pop_ups.PopUpSelectTagCountTable(project, tags_to_display, tag_name_checked=None)[source]¶
Bases:
PopUpTagSelection
A pop-up dialog for selecting a tag from a count table.
Allows users to choose a single tag from a list of available tags, with an option to pre-select a specific tag.
- __init__(project, tags_to_display, tag_name_checked=None)[source]¶
Initialize the tag selection pop-up.
- Parameters:
project – The current project context.
(list) (tags_to_display) – List of tags to be displayed for selection.
(str) (tag_name_checked) – Optional tag to be pre-checked on initialization.
- class populse_mia.user_interface.pop_ups.PopUpShowHistory(project, brick_uuid, scan, databrowser, main_window)[source]¶
Bases:
QDialog
A dialog for displaying the history of a document in a software pipeline.
This class creates a popup window that provides comprehensive information about a specific brick (processing node) in a pipeline, including: - Pipeline visualization - Input and output parameters - Initialization and execution details
The dialog allows users to: - View the pipeline structure - Inspect node details - Navigate between associated bricks - Select and highlight specific files
- __init__(project, brick_uuid, scan, databrowser, main_window)[source]¶
Initialize the document history popup.
- Parameters:
project – Current project in the software
(str) (scan) – Unique identifier of the brick
(str) – Filename of the scan
databrowser – Data browser instance
main_window – Main window of the software
- find_associated_bricks(node_name)[source]¶
Find bricks associated with a given node name.
- Parameters:
(str) (node_name) – The name of the node to find associated bricks for.
- Return (dict):
A dictionary where the keys are the full brick names and the values are lists of associated UUIDs.
- find_process_from_plug(plug)[source]¶
Find the process and plug name from a given plug.
- Parameters:
(Plug) (plug) – The plug object to find the process and plug name from.
- Return (tuple):
A tuple containing the process name (str) and plug name (str).
- handle_pipeline_nodes(pipeline, full_brick_name)[source]¶
Handle pipeline nodes, set up the view, and initialize the pipeline visualization.
- Parameters:
(Pipeline) (pipeline) – The pipeline object containing the nodes to handle.
(list) (full_brick_name) – The full name of the brick, split into parts.
- highlight_selected_node(node_name)[source]¶
Highlight the selected node in the pipeline view.
- Parameters:
(str) (node_name) – The name of the node to highlight.
- initialize_pipeline(full_brick_name)[source]¶
Initialize the pipeline view using the given pipeline XML.
- Parameters:
(list) (full_brick_name) – The full name of the brick, split into parts.
- io_value_is_scan(value)[source]¶
Check if the I/O value is a scan.
- Parameters:
value – I/O value
- Returns:
The scan corresponding to the value if it exists, None otherwise
- load_data(brick_uuid, scan)[source]¶
Load data from the project database and update the table with brick data.
- Parameters:
(str) (scan) – The UUID of the brick to load.
(str) – The identifier of the scan associated with the brick.
- load_pipeline_data(history_uuid, full_brick_name)[source]¶
Load pipeline data from the database based on the provided history UUID.
- Parameters:
(str) (history_uuid) – The UUID of the history record to load pipeline data from.
(list) (full_brick_name) – The full name of the brick, split into parts.
- node_selected(node_name, process)[source]¶
Handle node selection and update the table.
- Parameters:
node_name – node name
process – process of the corresponding node
- select_node(pipeline, bricks, full_brick_name)[source]¶
Select the node in the pipeline view based on the provided brick UUID.
- Parameters:
(Pipeline) (pipeline) – The pipeline object containing the nodes to handle.
(dict) (bricks) – A dictionary of bricks with UUIDs as values.
(list) (full_brick_name) – The full name of the brick, split into parts.
- update_table(inputs, outputs, brick_name, init='', init_time=None, exec='', exec_time=None)[source]¶
Updates the table with information about a brick’s execution state.
- Parameters:
(dict) (outputs) – Dictionary containing input data.
(dict) – Dictionary containing output data.
(str) (brick_name) – Name of the brick.
optional) (exec_time (Any,) – Initialization status.
optional) – Initialization timestamp.
optional) – Execution status.
optional) – Execution timestamp.
- Contains:
- create_cell_widget: Creates a QWidget containing a vertically
aligned QLabel
- update_table_for_single_brick(bricks, node_name, full_node_name)[source]¶
Update the table for a single brick, using the provided brick data.
- Parameters:
(dict) (bricks) – A dictionary of bricks with UUIDs as values.
(str) (node_name) – The name of the node associated with the brick.
(list) (full_node_name) – The full name of the node, split into parts.
- update_table_for_subpipeline(bricks, process, full_node_name)[source]¶
Update the table for a subpipeline based on the given process and brick data.
- Parameters:
(dict) (bricks) – A dictionary of bricks with UUIDs as values.
(PipelineNode) (process) – The process node associated with the subpipeline.
(list) (full_node_name) – The full name of the node, split into parts.
- class populse_mia.user_interface.pop_ups.PopUpTagSelection(project)[source]¶
Bases:
QDialog
A dialog for selecting and filtering tags in a data browser.
This class provides a user interface for: - Displaying available tags - Searching through tags - Selecting a single tag
- Is called when the user wants to update the tags that are visualized in
the data browser.
- __init__(project)[source]¶
Initialize the tag selection dialog.
- Parameters:
project – The current project containing the database with available tags
- item_clicked(item)[source]¶
Handle item selection by checking/unchecking tags.
- Parameters:
(QListWidgetItem) – The clicked list item
- class populse_mia.user_interface.pop_ups.PopUpVisualizedTags(project, visualized_tags)[source]¶
Bases:
QWidget
A widget for managing tag visualization preferences in a project.
This class provides an interface for users to select and unselect tags to be displayed in the project. It allows searching through available tags and moving them between available and visualized lists.
- __init__(project, visualized_tags)[source]¶
Initialize the tag visualization management widget.
- Parameters:
project – The current project in the software.
visualized_tags – Tags currently being visualized before opening this widget.
- click_select_tag()[source]¶
Move selected tags from available to visualized list.
Removes selected tags from the left (available) list and adds them to the right (visualized) list.
- click_unselect_tag()[source]¶
Remove selected tags from the visualized list and return them to the available tags list.
Moves selected tags from the right (visualized) list to the left (available) list, maintaining sorted order.
- search_str(str_search)[source]¶
Filter tags based on search string.
- Parameters:
(str) (str_search) – Search pattern to match against tags
- signal_preferences_change¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class populse_mia.user_interface.pop_ups.QLabel_clickable(parent=None)[source]¶
Bases:
QLabel
A custom QLabel that emits a clicked signal when mouse pressed.
This class extends the standard QLabel to provide a signal that can be connected to other methods when the label is clicked, enabling more interactive label behaviors.
- __init__(parent=None)[source]¶
Initialize the clickable label.
- Parameters:
(QWidget) (parent) – Parent widget.
- clicked¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.