populse_mia package¶
MIA is shorthand for “Multiparametric Image Analysis”. It is intended to be a complete image processing environment mainly targeted at the analysis and visualization of large amounts of MRI data.
MRI data analysis often requires a complex succession of data processing pipelines applied to a set of data acquired in an MRI exam or over several MRI exams. This analysis may need to be repeated a large number of times in studies involving a large number of acquisition sessions. Such that manual execution of the processing modules or simple ad-hoc scripting of the process may become error-prone, cumbersome and difficult to reproduce. Data processing pipelines exist in separate heterogeneous toolboxes, developed in-house or by other researchers in the field. This heterogeneity adds to the complexity of the modules are to be invoked manually.
MIA (populse_mia) aims to provide easy tools to perform complex data processing based on a definition of the inputs and outputs of the individual pipelines on a conceptual level, and implies identifying data with respect to their role in an analysis project: “the scan type”, “the subject being scanned”, “the group of this subject is part of”, etc.
- Contains:
- Packages:
data_manager: handles the projects and their database
sources_images: a collection of images used in Mia
user_interface: mainly intended for the graphic interface of Mia
utils: various utilities for the Mia operation
- Modules:
info.py: define software version, description and requirements
main.py: the first module used at the runtime of mia
__main__.py: make populse_mia accessible as a module
software_properties.py: handles the configuration of the software
test.py: unitary tests
Subpackages¶
- populse_mia.data_manager package
- Submodules
- populse_mia.data_manager.data_history_inspect module
- populse_mia.data_manager.data_loader module
- populse_mia.data_manager.database_mia module
DatabaseMIA
DatabaseSessionMIA
DatabaseSessionMIA.add_collection()
DatabaseSessionMIA.add_field()
DatabaseSessionMIA.add_field_attributes_collection()
DatabaseSessionMIA.add_fields()
DatabaseSessionMIA.get_field()
DatabaseSessionMIA.get_fields()
DatabaseSessionMIA.get_shown_tags()
DatabaseSessionMIA.remove_field()
DatabaseSessionMIA.set_shown_tags()
- populse_mia.data_manager.filter module
- populse_mia.data_manager.project module
Project
Project.__init__()
Project.add_clinical_tags()
Project.cleanup_orphan_bricks()
Project.cleanup_orphan_history()
Project.cleanup_orphan_nonexisting_files()
Project.del_clinical_tags()
Project.files_in_project()
Project.finished_bricks()
Project.getDate()
Project.getFilter()
Project.getFilterName()
Project.getName()
Project.getSortOrder()
Project.getSortedTag()
Project.get_data_history()
Project.get_finished_bricks_in_pipeline()
Project.get_finished_bricks_in_workflows()
Project.get_orphan_bricks()
Project.get_orphan_history()
Project.get_orphan_nonexsiting_files()
Project.hasUnsavedModifications()
Project.init_filters()
Project.loadProperties()
Project.redo()
Project.reput_values()
Project.saveConfig()
Project.saveModifications()
Project.save_current_filter()
Project.setCurrentFilter()
Project.setDate()
Project.setName()
Project.setSortOrder()
Project.setSortedTag()
Project.undo()
Project.unsaveModifications()
Project.unsavedModifications
Project.update_data_history()
Project.update_db_for_paths()
- populse_mia.data_manager.project_properties module
- populse_mia.user_interface package
- Subpackages
- populse_mia.user_interface.data_browser package
- Submodules
- populse_mia.user_interface.data_browser.advanced_search module
- populse_mia.user_interface.data_browser.count_table module
- populse_mia.user_interface.data_browser.data_browser module
- populse_mia.user_interface.data_browser.mini_viewer module
- 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
- populse_mia.user_interface.pipeline_manager package
- Submodules
- populse_mia.user_interface.pipeline_manager.iteration_table module
- populse_mia.user_interface.pipeline_manager.node_controller module
- populse_mia.user_interface.pipeline_manager.pipeline_editor module
- populse_mia.user_interface.pipeline_manager.pipeline_manager_tab module
- populse_mia.user_interface.pipeline_manager.process_library module
- populse_mia.user_interface.pipeline_manager.process_mia module
- populse_mia.user_interface.pipeline_manager.type_editors module
- populse_mia.user_interface.data_browser package
- Submodules
- populse_mia.user_interface.main_window module
MainWindow
MainWindow.__init__()
MainWindow.add_clinical_tags()
MainWindow.check_database()
MainWindow.check_unsaved_modifications()
MainWindow.closeEvent()
MainWindow.create_project_pop_up()
MainWindow.create_tabs()
MainWindow.create_view_actions()
MainWindow.create_view_menus()
MainWindow.create_view_window()
MainWindow.credits()
MainWindow.del_clinical_tags()
MainWindow.delete_project()
MainWindow.documentation()
MainWindow.get_controller_version()
MainWindow.import_data()
MainWindow.install_processes_pop_up()
MainWindow.last_window_closed()
MainWindow.open_project_pop_up()
MainWindow.open_recent_project()
MainWindow.open_shell()
MainWindow.package_library_pop_up()
MainWindow.project_properties_pop_up()
MainWindow.redo()
MainWindow.remove_raw_files_useless()
MainWindow.run_ipconsole_kernel()
MainWindow.save()
MainWindow.saveChoice()
MainWindow.save_as()
MainWindow.save_project_as()
MainWindow.see_all_projects()
MainWindow.set_controller_version()
MainWindow.software_preferences_pop_up()
MainWindow.switch_project()
MainWindow.tab_changed()
MainWindow.undo()
MainWindow.update_project()
MainWindow.update_recent_projects_actions()
- populse_mia.user_interface.pop_ups module
ClickableLabel
DefaultValueListCreation
DefaultValueQLineEdit
PopUpAddPath
PopUpAddTag
PopUpCloneTag
PopUpClosePipeline
PopUpDataBrowserCurrentSelection
PopUpDeleteProject
PopUpDeletedProject
PopUpFilterSelection
PopUpInformation
PopUpInheritanceDict
PopUpMultipleSort
PopUpNewProject
PopUpOpenProject
PopUpPreferences
PopUpPreferences.__init__()
PopUpPreferences.admin_mode_switch()
PopUpPreferences.browse_afni()
PopUpPreferences.browse_ants()
PopUpPreferences.browse_freesurfer()
PopUpPreferences.browse_fsl()
PopUpPreferences.browse_matlab()
PopUpPreferences.browse_matlab_standalone()
PopUpPreferences.browse_mri_conv_path()
PopUpPreferences.browse_mrtrix()
PopUpPreferences.browse_projects_save_path()
PopUpPreferences.browse_resources_path()
PopUpPreferences.browse_spm()
PopUpPreferences.browse_spm_standalone()
PopUpPreferences.change_admin_psswd()
PopUpPreferences.control_checkbox_toggled()
PopUpPreferences.edit_capsul_config()
PopUpPreferences.edit_config_file()
PopUpPreferences.findChar()
PopUpPreferences.not_use_clinical_mode_signal
PopUpPreferences.ok_clicked()
PopUpPreferences.signal_preferences_change
PopUpPreferences.use_afni_changed()
PopUpPreferences.use_ants_changed()
PopUpPreferences.use_clinical_mode_signal
PopUpPreferences.use_current_mainwindow_size()
PopUpPreferences.use_freesurfer_changed()
PopUpPreferences.use_fsl_changed()
PopUpPreferences.use_matlab_changed()
PopUpPreferences.use_matlab_standalone_changed()
PopUpPreferences.use_mrtrix_changed()
PopUpPreferences.use_spm_changed()
PopUpPreferences.use_spm_standalone_changed()
PopUpPreferences.validate_and_save()
PopUpPreferences.wrong_path()
PopUpProperties
PopUpQuit
PopUpRemoveScan
PopUpRemoveTag
PopUpSaveProjectAs
PopUpSeeAllProjects
PopUpSelectFilter
PopUpSelectIteration
PopUpSelectTag
PopUpSelectTagCountTable
PopUpShowHistory
PopUpTagSelection
PopUpVisualizedTags
QLabel_clickable
- Subpackages
- populse_mia.utils package
Submodules¶
populse_mia.info module¶
Define software version, description and requirements
- Contains:
- Function:
get_populse_mia_gitversion
populse_mia.main module¶
The first module used at the mia runtime.
Basically, this module is dedicated to the initialisation of the basic parameters and the various checks necessary for a successful launch of the mia’s GUI.
- Contains:
- Function:
main
- populse_mia.main.main()[source]¶
Make basic configuration check, then actual launch of Mia.
Checks if Mia is called from the site/dist packages (user mode) or from a cloned git repository (developer mode).
~/.populse_mia/configuration_path.yml is mandatory, if it doesn’t exist or is corrupted, try to create one with a valid properties path.
- If launched from a cloned git repository (developer mode):
the properties_path is the “properties_dev_path” parameter in ~/.populse_mia/configuration_path.yml
- If launched from the site/dist packages (user mode):
the properties_path is the “properties_user_path” parameter in ~/.populse_mia/configuration_path.yml
Launches the verify_processes() function, then the launch_mia() function (Mia’s real launch).
populse_mia.software_properties module¶
Module that handle the configuration of the software
Load and save the parameters from the miniviewer and the MIA preferences pop-up in the config.yml file.
- Contains:
- Class:
Config
- class populse_mia.software_properties.Config(properties_path=None)[source]¶
Bases:
object
Object that handles the configuration of the software
- Contains:
- Methods:
get_admin_hash: get the value of the hash of the admin password
get_afni_path: returns the path of AFNI
get_ants_path: returns the path of ANTS
getBackgroundColor: get background color
get_capsul_config: get CAPSUL config dictionary
get_capsul_engine: get a global CapsulEngine object used for all operations in MIA application
getChainCursors: returns if the “chain cursors” checkbox of the mini viewer is activated
get_freesurfer_setup: get freesurfer path
get_fsl_config: returns the path of the FSL config file
get_mainwindow_maximized: get the maximized (full-screen) flag
get_mainwindow_size: get the main window size
get_matlab_command: returns Matlab command
get_matlab_path: returns the path of Matlab’s executable
get_matlab_standalone_path: returns the path of Matlab Compiler Runtime
get_max_projects: returns the maximum number of projects displayed in the “Saved projects” menu
get_max_thumbnails: get max thumbnails number at the data browser bottom
get_properties_path: returns the software’s properties path
get_mri_conv_path: returns the MRIManager.jar path
get_mrtrix_path: returns mrtrix path
getNbAllSlicesMax: returns the maximum number of slices to display in the mini viewer
get_opened_projects: returns the opened projects
getPathToProjectsFolder: returns the project’s path
get_projects_save_path: returns the folder where the projects are saved
get_referential: returns boolean to indicate DataViewer referential
get_resources_path: get the resources path
getShowAllSlices: returns if the “show all slices” checkbox of the mini viewer is activated
getSourceImageDir: get the source directory for project images
get_spm_path: returns the path of SPM12 (license version)
get_spm_standalone_path: returns the path of SPM12 (standalone version)
getTextColor: return the text color
getThumbnailTag: returns the tag that is displayed in the mini viewer
get_use_afni: returns the value of “use afni” checkbox in the preferences
get_use_ants: returns the value of “use ants” checkbox in the preferences
get_use_clinical: returns the value of “clinical mode” checkbox in the preferences
get_use_freesurfer: returns the value of “use freesurfer” checkbox in the preferences
get_use_fsl: returns the value of “use fsl” checkbox in the preferences
get_use_matlab: returns the value of “use matlab” checkbox in the preferences
get_use_matlab_standalone: returns the value of “use matlab standalone” checkbox in the preferences
get_use_mrtrix: returns the value of “use mrtrix” checkbox in the prefrence
get_user_level: get the user level in the Capsul config
get_user_mode: returns the value of “user mode” checkbox in the preferences
get_use_spm: returns the value of “use spm” checkbox in the preferences
get_use_spm_standalone: returns the value of “use spm standalone” checkbox in the preferences
getViewerConfig: returns the DataViewer configuration (neuro or radio), by default neuro
getViewerFramerate: returns the DataViewer framerate for automatic time running images
isAutoSave: checks if auto-save mode is activated
isControlV1: checks if the selected display of the controller is of V1 type
isRadioView: checks if miniviewer in radiological orientation (if not, then it is in neurological orientation)
loadConfig: reads the config in the config.yml file
saveConfig: saves the config to the config.yml file
set_admin_hash: set the password hash
set_afni_path: set the path of the AFNI
set_ants_path: set the path of the ANTS
set_mrtrix_path: set the path of mrtrix
setAutoSave: sets the auto-save mode
setBackgroundColor: sets the background color
set_capsul_config: set CAPSUL configuration dict into MIA config
setChainCursors: set the “chain cursors” checkbox of the mini viewer
set_clinical_mode: set the value of “clinical mode” in the preferences
setControlV1: Set controller display mode (True if V1)
set_freesurfer_setup: set freesurfer path
set_fsl_config: set the path of the FSL config file
set_mainwindow_maximized: set the maximized (fullscreen) flag
set_mainwindow_size: set main window size
set_matlab_path: set the path of Matlab’s executable
set_matlab_standalone_path: set the path of Matlab Compiler Runtime
set_max_projects: set the maximum number of projects displayed in the “Saved projects” menu
set_max_thumbnails: set max thumbnails number at the data browser bottom
set_mri_conv_path: set the MRIManager.jar path
setNbAllSlicesMax: set the maximum number of slices to display in the mini viewer
set_opened_projects: set the opened projects
set_projects_save_path: set the folder where the projects are saved
set_radioView: set the orientation in miniviewer (True for radiological, False for neurological orientation)
set_referential: set the DataViewer referential
set_resources_path: Set the resources path
setShowAllSlices: set the “show all slices” checkbox of the mini viewer
setSourceImageDir: set the source directory for project images
set_spm_path: set the path of SPM12 (license version)
set_spm_standalone_path: set the path of SPM12 (standalone version)
setTextColor: set the text color
setThumbnailTag: set the tag that is displayed in the mini viewer
set_use_afni: set the value of “use afni” checkbox in the preferences
set_use_ants: set the value of “use ants” checkbox in the preferences
- set_use_freesurfer: set the value of “use freesurfer” checkbox
in the preferences
set_use_fsl: set the value of “use fsl” checkbox in the preferences
set_use_matlab: set the value of “use matlab” checkbox in the preferences
set_use_matlab_standalone: set the value of “use matlab standalone” checkbox in the preferences
set_use_mrtrix: set the value of “use mrtrix” checkbox in the preferences
set_user_mode: set the value of “user mode” checkbox in the preferences
set_use_spm: set the value of “use spm” checkbox in the preferences
set_use_spm_standalone: set the value of “use spm standalone” checkbox in the preferences
setViewerConfig: set the Viewer configuration neuro or radio
setViewerFramerate: set the Viewer frame rate for automatic running time images
update_capsul_config: update a global CapsulEngine object used for all operations in MIA application
- __init__(properties_path=None)[source]¶
Initialization of the Config class
- Parameters:
- config_path:
str (optional). If provided, the configuration file will be loaded/saved from the given directory. Otherwise, the regular heuristics will be used to determine the config path. This option allows to use an alternative config directory (for tests for instance).
- capsul_engine = None¶
- getChainCursors()[source]¶
Get the value of the checkbox ‘chain cursor’ in miniviewer.
- Returns:
boolean
- getNbAllSlicesMax()[source]¶
Get number the maximum number of slices to display in the miniviewer.
- Returns:
Integer
- getShowAllSlices()[source]¶
Get whether the show_all_slices parameters was enabled or not in the miniviewer.
- Returns:
boolean
- getSourceImageDir()[source]¶
Get the source directory for project images.
- Returns:
string of the path
- getThumbnailTag()[source]¶
Get the tag of the thumbnail displayed in the miniviewer.
- Returns:
string
- get_capsul_config(sync_from_engine=True)[source]¶
Get CAPSUL config dictionary.
- Parameters:
sync_from_engine – if True, perform a synchronisation with CAPSUL engine (Bool)
- Returns:
capsul_config: the CAPSUL configuration saved into Mia config (Dict)
- static get_capsul_engine()[source]¶
Get a global CapsulEngine object used for all operations in MIA application. The engine is created once when needed.
- Returns:
Config.capsul_engine: capsul.engine.CapsulEngine object
- get_fsl_config()[source]¶
Get the FSL config file path
- Returns:
string of path to the fsl/etc/fslconf/fsl.sh file
- get_matlab_command()[source]¶
Get Matlab command.
- Returns:
matlab executable path or nothing if matlab path not specified
- get_matlab_standalone_path()[source]¶
Get the path to matlab compiler runtime.
- Returns:
string of path
- get_max_projects()[source]¶
Get the maximum number of projects displayed in the “Saved projects” menu.
- Returns:
Integer
- get_max_thumbnails()[source]¶
Get the max thumbnails number at the data browser bottom.
- Returns:
Integer
- get_mri_conv_path()[source]¶
Get the MRIManager.jar path.
- Returns:
string of the path to the MRIManager.jar
- get_properties_path()[source]¶
Get the path to the folder containing the processes and properties folders of mia (properties_path).
The properties_path is defined and stored in the configuration_path.yml file, located in the ~/.populse_mia folder.
If Mia is launched in user mode, properties path must compulsorily be returned from the “properties_user_path” parameter of the configuration_path.yml file.
If mia is launched in developer mode, mia path must compulsorily be returned from the “properties_dev_path” parameter of the configuration_path.yml file.
- Returns:
string of path to properties folder
- get_referential()[source]¶
Checks in anatomist_2 data viewer which referential has been chosen
- Returns:
0 for World Coordinates, 1 for Image ref
- get_resources_path()[source]¶
Get the resources path.
- Returns:
string of the path to the resources folder
- get_spm_standalone_path()[source]¶
Get the path to the SPM12 (standalone version).
- Returns:
String of path
- get_use_freesurfer()[source]¶
Get the value of “use freesurfer” checkbox in the preferences.
- Returns:
boolean
- get_use_matlab()[source]¶
Get the value of “use matlab” checkbox in the preferences.
- Returns:
boolean
- get_use_matlab_standalone()[source]¶
Get the value of “use matlab standalone” checkbox in the preferences.
- Returns:
boolean
- get_use_mrtrix()[source]¶
Get the value of “use mrtrix” checkbox in the preferences.
- Returns:
boolean
- get_use_spm_standalone()[source]¶
Get the value of “use spm standalone” checkbox in the preferences.
- Returns:
boolean
- get_user_mode()[source]¶
Get if user mode is disabled or enabled in the preferences.
- Returns:
boolean
- isRadioView()[source]¶
Get if the display in miniviewer is in radiological orientation.
True for radiological
False for neurological
- Returns:
boolean
- loadConfig()[source]¶
Read the config in the config.yml file.
- Returns:
Returns a dictionary of the contents of config.yml
- setBackgroundColor(color)[source]¶
Set background color and save configuration.
- Parameters:
color – Color string (‘Black’, ‘Blue’, ‘Green’, ‘Grey’, ‘Orange’, ‘Red’, ‘Yellow’, ‘White’)
- setChainCursors(chain_cursors)[source]¶
Set the value of the checkbox ‘chain cursor’ in the mini viewer.
- Parameters:
chain_cursors – Boolean
- setControlV1(controlV1)[source]¶
Set controller display mode (True if V1).
- Parameters:
controlV1 – boolean
- setNbAllSlicesMax(nb_slices_max)[source]¶
Set the number of slices to display in the mini viewer.
- Parameters:
nb_slices_max – maximum number of slices to display (Int)
- setShowAllSlices(show_all_slices)[source]¶
Set the show_all_slides setting in miniviewer.
- Parameters:
show_all_slices – Boolean
- setSourceImageDir(source_image_dir)[source]¶
Set the source directory for project images.
- Parameters:
source_image_dir – String of path
- setTextColor(color)[source]¶
Set text color and save configuration.
- Parameters:
color – Color string (‘Black’, ‘Blue’, ‘Green’, ‘Grey’, ‘Orange’, ‘Red’, ‘Yellow’, ‘White’)
- setThumbnailTag(thumbnail_tag)[source]¶
Set the tag that is displayed in the mini viewer.
- Parameters:
thumbnail_tag – string
- setViewerConfig(config_NeuRad)[source]¶
sets user’s configuration neuro or radio for data_viewer
neuro: neurological
radio: radiological
- Parameters:
config_NeuRad – string
- set_capsul_config(capsul_config_dict)[source]¶
Set CAPSUL configuration dict into MIA config.
This method is used just (and only) after editing capsul config (in File > Mia preferences, Pipeline tab, Edit CAPSUL config button), in order to synchronise the new Capsul config with the Mia preferences.
- Parameters:
capsul_config_dict – a dict; {‘engine’: {…}, ‘engine_modules’: […]}
- set_clinical_mode(clinical_mode)[source]¶
Enable of disable clinical mode.
- Parameters:
clinical_mode – boolean
- set_freesurfer_setup(path)[source]¶
Set the freesurfer config file
- Parameters:
path – string of path to freesurfer/FreeSurferEnv.sh
- set_fsl_config(path)[source]¶
Set the FSL config file
- Parameters:
path – string of path to fsl/etc/fslconf/fsl.sh
- set_mainwindow_maximized(enabled)[source]¶
Set the maximized (full-screen) flag
- Parameters:
enabled – boolean
- set_matlab_path(path)[source]¶
Set the path of Matlab’s executable.
- Parameters:
path – string of path
- set_matlab_standalone_path(path)[source]¶
Set the path of Matlab Compiler Runtime.
- Parameters:
path – string of path
- set_max_projects(nb_max_projects)[source]¶
Set the maximum number of projects displayed in the “Saved projects” menu.
- Parameters:
nb_max_projects – Integer
- set_max_thumbnails(nb_max_thumbnails)[source]¶
Set max thumbnails number at the data browser bottom.
- Parameters:
nb_max_thumbnails – Integer
- set_opened_projects(new_projects)[source]¶
Set the list of opened projects and saves the modification.
- Parameters:
new_projects – list of path
- set_projects_save_path(path)[source]¶
Set the folder where the projects are saved.
- Parameters:
path – string of path
- set_radioView(radio_view)[source]¶
Set the radiological/neurological orientation in mini viewer.
True for radiological
False for neurological
- Parameters:
radio_view – boolean
- set_referential(ref)[source]¶
Set the referential to image ref or world coordinates in anatomist_2 data viewer.
- Parameters:
ref – str; 0 for World Coordinates, 1 for Image ref
- set_spm_path(path)[source]¶
Set the path of SPM (license version).
- Parameters:
path – string of path
- set_spm_standalone_path(path)[source]¶
Set the path of SPM (standalone version).
- Parameters:
path – string of path
- set_use_afni(use_afni)[source]¶
Set the value of “use_afni” checkbox in the preferences.
- Parameters:
use_afni – boolean
- set_use_ants(use_ants)[source]¶
Set the value of “use_ants” checkbox in the preferences.
- Parameters:
use_ants – boolean
- set_use_freesurfer(use_freesurfer)[source]¶
Set the value of “use_freesurfer” checkbox in the preferences.
- Parameters:
use_freesurfer – boolean
- set_use_fsl(use_fsl)[source]¶
Set the value of “use_fsl” checkbox in the preferences.
- Parameters:
use_fsl – boolean
- set_use_matlab(use_matlab)[source]¶
Set the value of “use matlab” checkbox in the preferences.
- Parameters:
use_matlab – boolean
- set_use_matlab_standalone(use_matlab_standalone)[source]¶
Set the value of “use_matlab_standalone” checkbox in the preferences.
- Parameters:
use_matlab – boolean
- set_use_mrtrix(use_mrtrix)[source]¶
Set the value of “use_mrtrix” checkbox in the preferences.
- Parameters:
use_mrtrix – boolean
- set_use_spm(use_spm)[source]¶
Set the value of “use spm” checkbox in the preferences.
- Parameters:
use_spm – boolean