cmp.bidsappmanager.project module¶
Connectome Mapper Controler for handling GUI and non GUI general events.
-
class
cmp.bidsappmanager.project.CMP_BIDSAppWindowHandler[source]¶ Bases:
traitsui.handler.HandlerEvent handler of the BIDS App Interface window.
-
docker_process¶ Instance of
subprocess.Popenwhere BIDS App docker image is run- Type
subprocess.Popen
-
check_settings(ui_info)[source]¶ Function that checks if all parameters are properly set before execution of the BIDS App.
- Parameters
ui_info (QtView) – TraitsUI QtView associated with
self
-
classmethod
manage_bidsapp_procs(proclist)[source]¶ Function that managed the parallelized BIDS App Popen process.
- Parameters
proclist – List of
Popenprocesses running the BIDS App on a single subject
-
start_bids_app(ui_info)[source]¶ Main function that runs the BIDS App on a set or sub-set of participants.
- Parameters
ui_info (QtView) – TraitsUI QtView associated with this handler
-
-
class
cmp.bidsappmanager.project.CMP_ConfigQualityWindowHandler[source]¶ Bases:
traitsui.handler.HandlerEvent handler of the Configurator and Inspector (Quality Control) windows.
-
project_loaded¶ Indicate if project has been successfully loaded (Default: False)
- Type
traits.Bool
-
anat_pipeline¶ Instance of
AnatomicalPipelineUIclass- Type
Instance(HasTraits)
-
anat_inputs_checked¶ Indicate if anatomical pipeline inputs are available (Default: False)
- Type
traits.Bool
-
anat_outputs_checked¶ Indicate if anatomical pipeline outputs are available (Default: False)
- Type
traits.Bool
-
anatomical_processed¶ Indicate if anatomical pipeline was run (Default: False)
- Type
traits.Bool
-
dmri_pipeline¶ Instance of
DiffusionPipelineUIclass- Type
Instance(HasTraits)
-
dmri_inputs_checked¶ Indicate if diffusion pipeline inputs are available (Default: False)
- Type
traits.Bool
-
dmri_processed¶ Indicate if diffusion pipeline was run (Default: False)
- Type
traits.Bool
-
fmri_pipeline¶ Instance of
fMRIPipelineUIclass- Type
Instance(HasTraits)
-
fmri_inputs_checked¶ Indicate if fMRI pipeline inputs are available (Default: False)
- Type
traits.Bool
-
fmri_processed¶ Indicate if fMRI pipeline was run (Default: False)
- Type
traits.Bool
-
load_anat_config_file(ui_info)[source]¶ Function that loads the anatomical pipeline configuration file.
- Parameters
ui_info (QtView) – TraitsUI QtView associated with
self
-
load_dmri_config_file(ui_info)[source]¶ Function that loads the diffusion pipeline configuration file.
- Parameters
ui_info (QtView) – TraitsUI QtView associated with
self
-
load_fmri_config_file(ui_info)[source]¶ Function that loads the fMRI pipeline configuration file.
- Parameters
ui_info (QtView) – TraitsUI QtView associated with
self
-
load_project(ui_info)[source]¶ Function that creates a new
CMP_Project_InfoUIinstance from an existing project.- Parameters
ui_info (QtView) – TraitsUI QtView associated with
self
-
new_project(ui_info)[source]¶ Function that creates a new
CMP_Project_InfoUIinstance.- Parameters
ui_info (QtView) – TraitsUI QtView associated with
self
-
classmethod
save_anat_config_file(ui_info)[source]¶ Function that saves the anatomical pipeline configuration file.
- Parameters
ui_info (QtView) – TraitsUI QtView associated with
self
-
classmethod
save_dmri_config_file(ui_info)[source]¶ Function that saves the diffusion pipeline configuration file.
- Parameters
ui_info (QtView) – TraitsUI QtView associated with
self
-
classmethod
save_fmri_config_file(ui_info)[source]¶ Function that saves the fMRI pipeline configuration file.
- Parameters
ui_info (QtView) – TraitsUI QtView associated with
self
-
classmethod
show_bidsapp_window()[source]¶ Function that shows the BIDS App Interface Window.
- Parameters
ui_info (QtView) – TraitsUI QtView associated with this handler
-
update_subject_anat_pipeline(ui_info)[source]¶ Function that updates attributes of the
AnatomicalPipelineUIinstance.- Parameters
ui_info (QtView) – TraitsUI QtView associated with
self
-
-
class
cmp.bidsappmanager.project.CMP_MainWindowHandler[source]¶ Bases:
traitsui.handler.HandlerEvent handler of the Configurator and Inspector (Quality Control) windows.
-
project_loaded¶ Indicate if project has been successfully loaded (Default: False)
- Type
traits.Bool
-
anat_pipeline¶ Instance of
AnatomicalPipelineUIclass- Type
Instance(HasTraits)
-
anat_inputs_checked¶ Indicate if anatomical pipeline inputs are available (Default: False)
- Type
traits.Bool
-
anat_outputs_checked¶ Indicate if anatomical pipeline outputs are available (Default: False)
- Type
traits.Bool
-
anatomical_processed¶ Indicate if anatomical pipeline was run (Default: False)
- Type
traits.Bool
-
dmri_pipeline¶ Instance of
DiffusionPipelineUIclass- Type
Instance(HasTraits)
-
dmri_inputs_checked¶ Indicate if diffusion pipeline inputs are available (Default: False)
- Type
traits.Bool
-
dmri_processed¶ Indicate if diffusion pipeline was run (Default: False)
- Type
traits.Bool
-
fmri_pipeline¶ Instance of
fMRIPipelineUIclass- Type
Instance(HasTraits)
-
fmri_inputs_checked¶ Indicate if fMRI pipeline inputs are available (Default: False)
- Type
traits.Bool
-
fmri_processed¶ Indicate if fMRI pipeline was run (Default: False)
- Type
traits.Bool
-
-
cmp.bidsappmanager.project.clean_cache(bids_root)[source]¶ Clean cache stored in /tmp.
Target issue related to that a dataset directory is mounted into /tmp and used for caching by java/matlab/matplotlib/xvfb-run in the container image.
- Parameters
bids_root (string) – BIDS root dataset directory
-
cmp.bidsappmanager.project.init_anat_project(project_info, is_new_project)[source]¶ Create and initialize a
AnatomicalPipelineUIinstance- Parameters
project_info (CMP_Project_InfoUI) – Instance of
CMP_Project_InfoUIclassis_new_project (bool) – If True, this is a new project which has been never processed
-
cmp.bidsappmanager.project.init_dmri_project(project_info, bids_layout, is_new_project, gui=True)[source]¶ Create and initialize a
DiffusionPipelineUIinstance- Parameters
project_info (CMP_Project_InfoUI) – Instance of
CMP_Project_InfoUIclassbids_layout (bids.BIDSLayout) – PyBIDS BIDS Layout object describing the BIDS dataset
is_new_project (bool) – If True, this is a new project which has been never processed
gui (bool) – If True, display messages in GUI
-
cmp.bidsappmanager.project.init_fmri_project(project_info, bids_layout, is_new_project, gui=True)[source]¶ Create and initialize a
fMRIPipelineUIinstance- Parameters
project_info (CMP_Project_InfoUI) – Instance of
CMP_Project_InfoUIclassbids_layout (bids.BIDSLayout) – PyBIDS BIDS Layout object describing the BIDS dataset
is_new_project (bool) – If True, this is a new project which has been never processed
gui (bool) – If True, display messgae in GUI
-
cmp.bidsappmanager.project.refresh_folder(derivatives_directory, subject, input_folders, session=None)[source]¶ Creates (if needed) the folder hierarchy.
- Parameters
derivatives_directory (string) –
subject (string) – Subject label (
sub-XX) for which we create the output folder hierarchysession (string) – Subject session label (
ses-YY)input_folders (list of string) – List of folders to create in
derivative_directory/sub-XX/(ses-YY)/folder for the givensubject
-
cmp.bidsappmanager.project.update_anat_last_processed(project_info, pipeline)[source]¶ Update anatomical pipeline processing information
- Parameters
project_info (CMP_Project_InfoUI) – Instance of
CMP_Project_InfoUIclasspipeline (AnatomicalPipelineUI) – Instance of
AnatomicalPipelineUI
-
cmp.bidsappmanager.project.update_dmri_last_processed(project_info, pipeline)[source]¶ Update diffusion pipeline processing information
- Parameters
project_info (CMP_Project_InfoUI) – Instance of
CMP_Project_InfoUIclasspipeline (DiffusionPipelineUI) – Instance of
DiffusionPipelineUI
-
cmp.bidsappmanager.project.update_fmri_last_processed(project_info, pipeline)[source]¶ Update functional MRI pipeline processing information
- Parameters
project_info (CMP_Project_InfoUI) – Instance of
CMP_Project_InfoUIclasspipeline (fMRIPipelineUI) – Instance of
fMRIPipelineUI