def get_models_list(): """Get a list of all available models, composite and cascade. Returns: list of str: A list of available model names. """ from mdt.lib.components import list_composite_models, list_cascade_models l = list(list_cascade_models()) l.extend(list_composite_models()) return list(sorted(l))
def setupUi(self, tab_content): super().setupUi(tab_content) self._tab_content = tab_content self.selectDWI.clicked.connect(lambda: self._select_dwi()) self.selectMask.clicked.connect(lambda: self._select_mask()) self.selectProtocol.clicked.connect(lambda: self._select_protocol()) self.selectOutputFolder.clicked.connect(lambda: self._select_output()) self.selectedDWI.textChanged.connect(self._check_enable_action_buttons) self.selectedMask.textChanged.connect( self._check_enable_action_buttons) self.selectedProtocol.textChanged.connect( self._check_enable_action_buttons) self.runButton.clicked.connect(lambda: self.run_model()) self.optimizationOptionsButton.clicked.connect( self._run_optimization_options_dialog) self.additionalDataButton.clicked.connect(self._extra_data_dialog) self.cascadedFitButtonGroup.buttonClicked.connect( self._update_cascade_selection_possible) self.modelSelection.addItems(list(sorted(list_composite_models()))) self.modelSelection.currentIndexChanged.connect( self._update_cascade_selection) initial_model = 'BallStick_r1' self.modelSelection.setCurrentText(initial_model) self._update_cascade_selection() self.cascadeSelection.setCurrentText('Cascade') if self._input_data_info.dwi: self.selectedDWI.setText(self._input_data_info.dwi) if self._input_data_info.mask: self.selectedMask.setText(self._input_data_info.mask) if self._input_data_info.protocol: self.selectedProtocol.setText(self._input_data_info.protocol) self.update_output_folder_text() self._check_enable_action_buttons()