Skip to content

Commit

Permalink
capsul engine sync with mia pref - FSL OK (bis) (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
servoz committed Mar 18, 2022
1 parent 0b5cee8 commit 543a4da
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions python/populse_mia/software_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,14 +949,24 @@ def set_capsul_config(self, capsul_config_dict):
# fsl
fsl = engine_config.get('global', {}).get('capsul.engine.module.fsl')
use_fsl = False

if fsl:
fsl = next(iter(fsl.values()))
fsl_conf_path = fsl.get('config')
fsl_dir_path = fsl.get('directory')

if fsl_conf_path:
use_fsl = True
self.set_fsl_config(fsl_conf_path)
self.set_use_fsl(True)

# if only the directory parameter has been set, let's try using
# the config parameter = directory/fsl.sh:
elif fsl_dir_path:
use_fsl = True
self.set_fsl_config(os.path.join(fsl_dir_path, 'fsl.sh'))
self.set_use_fsl(True)

if use_fsl is False:
self.set_use_fsl(False)

Expand Down
5 changes: 4 additions & 1 deletion python/populse_mia/user_interface/pop_ups.py
Original file line number Diff line number Diff line change
Expand Up @@ -2774,9 +2774,12 @@ def edit_capsul_config(self):

# fsl
use_fsl = config.get_use_fsl()

if use_fsl:
self.fsl_choice.setText(config.get_fsl_config())

use_fsl = Qt.Qt.Checked if use_fsl else Qt.Qt.Unchecked
self.use_fsl_checkbox.setCheckState(use_fsl)
self.fsl_choice.setText(config.get_fsl_config())

# afni
use_afni = config.get_use_afni()
Expand Down

0 comments on commit 543a4da

Please sign in to comment.