def show(self): global dialog global ui ui = Ui_frmFEDictionaryLearning() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) ui.cbFit.addItem("lars") ui.cbFit.addItem("cd") ui.cbTransform.addItem("omp") ui.cbTransform.addItem("lasso_lars") ui.cbTransform.addItem("lasso_c") ui.cbTransform.addItem("lars") ui.cbTransform.addItem("threshold") dialog.setWindowTitle("easy fMRI Dictionary Learning - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmMAKMeans() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # Init ui.cbInit.addItem("k-means++") ui.cbInit.addItem("random") # Pre ui.cbPrecompute.addItem("Auto", "auto") ui.cbPrecompute.addItem("True", True) ui.cbPrecompute.addItem("False", False) # Alg ui.cbAlgorithm.addItem("Auto", "auto") ui.cbAlgorithm.addItem("Triangle Inequality", "elkan") ui.cbAlgorithm.addItem("EM-style Algorithm", "full") dialog.setWindowTitle("easy fMRI KMeans Clustering - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmNITFAFNI() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) afni = AFNI() afni.setting() if not afni.Validate: msgBox = QMessageBox() msgBox.setText("Cannot find AFNI setting!") msgBox.setIcon(QMessageBox.Critical) msgBox.setStandardButtons(QMessageBox.Ok) msgBox.exec_() else: ui.txtFAFNI.setText(afni.COPY) ui.txtFSUMA.setText(afni.REFIT) dialog.setWindowTitle("easy fMRI Convert Nifti1 to AFNI - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmMASVM() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # Kernels ui.cbKernel.addItem("rbf") ui.cbKernel.addItem("linear") ui.cbKernel.addItem("poly") ui.cbKernel.addItem("sigmoid") # Mode ui.cbMode.addItem("One vs. All", "ovr") ui.cbMode.addItem("One vs. One", "ovo") # Precision Avg ui.cbPrecisionAvg.addItem("weighted", "weighted") ui.cbPrecisionAvg.addItem("micro", "micro") ui.cbPrecisionAvg.addItem("macro", "macro") ui.cbPrecisionAvg.addItem("binary", "binary") ui.cbPrecisionAvg.addItem("samples", "samples") ui.cbPrecisionAvg.addItem("None", None) # Average of Precistion Avg ui.cbAPrecisionAvg.addItem("macro", "macro") ui.cbAPrecisionAvg.addItem("weighted", "weighted") ui.cbAPrecisionAvg.addItem("micro", "micro") ui.cbAPrecisionAvg.addItem("samples", "samples") ui.cbAPrecisionAvg.addItem("None", None) # Recall ui.cbRecallAvg.addItem("weighted", "weighted") ui.cbRecallAvg.addItem("micro", "micro") ui.cbRecallAvg.addItem("macro", "macro") ui.cbRecallAvg.addItem("binary", "binary") ui.cbRecallAvg.addItem("samples", "samples") ui.cbRecallAvg.addItem("None", None) # f1 score ui.cbF1Avg.addItem("weighted", "weighted") ui.cbF1Avg.addItem("micro", "micro") ui.cbF1Avg.addItem("macro", "macro") ui.cbF1Avg.addItem("binary", "binary") ui.cbF1Avg.addItem("samples", "samples") ui.cbF1Avg.addItem("None", None) dialog.setWindowTitle("easy fMRI C Support Vector Classification - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmMADeepGroupRSA() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # Activation ui.cbActivation.addItem('Sigmoid', 'sigmoid') ui.cbActivation.addItem('ReLU', 'relu') ui.cbActivation.addItem('Tanh', 'tanh') # LASSO Norm ui.cbLossNorm.addItem('Euclidean', 'euclidean') ui.cbLossNorm.addItem('Supremum', np.inf) # Device ui.cbDevice.addItem("Auto", False) ui.cbDevice.addItem("Just CPU", True) dialog.setWindowTitle( "easy fMRI Group Level Single-Deep-Kernel Representational Similarity Analysis - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmAAAtlas() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) ui.txtEvents = api.CodeEdit(ui.tab_2) ui.txtEvents.setGeometry(QtCore.QRect(10, 10, 641, 200)) ui.txtEvents.setObjectName("txtEvents") ui.txtEvents.backend.start('backend/server.py') ui.txtEvents.modes.append(modes.CodeCompletionMode()) ui.txtEvents.modes.append(modes.CaretLineHighlighterMode()) ui.txtEvents.modes.append( modes.PygmentsSyntaxHighlighter(ui.txtEvents.document())) ui.txtEvents.panels.append(panels.LineNumberPanel(), api.Panel.Position.LEFT) font = QtGui.QFont() font.setBold(True) font.setWeight(75) ui.txtEvents.setFont(font) ui.txtEvents.setPlainText(EventCode(), "", "") dialog.setWindowTitle("easy fMRI Atlas based analysis - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmFAPCA() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # Kenel List ui.cbKernel.addItem("linear") ui.cbKernel.addItem("poly") ui.cbKernel.addItem("rbf") ui.cbKernel.addItem("sigmoid") ui.cbKernel.addItem("cosine") # Method ui.cbMethod.addItem("PCA") ui.cbMethod.addItem("Kernel PCA") ui.cbMethod.addItem("Incremental PCA") ui.txtNumFea.setMinimum(0) ui.txtNumFea.setValue(0) dialog.setWindowTitle("easy fMRI PCA Functional Alignment - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui global OutSize, currentFile, currentSize ui = Ui_frmCombineROI() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tvArea.setColumnCount(2) ui.tvArea.setHeaderLabels(['Affine', 'File']) ui.tvArea.setColumnWidth(0, 50) ui.cbMetric.addItem("Intersection", "int") ui.cbMetric.addItem("Union", "uni") dialog.setWindowTitle("easy fMRI combine ROI - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmFAKHA() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # Kenel List ui.cbKernel.addItem("linear") ui.cbKernel.addItem("poly") ui.cbKernel.addItem("rbf") ui.cbKernel.addItem("sigmoid") ui.cbKernel.addItem("cosine") # Method ui.cbMethod.addItem("PCA") ui.cbMethod.addItem("Kernel PCA") ui.cbMethod.addItem("Incremental PCA") dialog.setWindowTitle( "easy fMRI Kernel/SVD Hyperalignment (direct solution, with trans. matrix) - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmFASRM() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # Method ui.cbMethod.addItem("Probabilistic SRM") ui.cbMethod.addItem("Deterministic SRM") ui.cbMethod.addItem("Robust SRM") ui.txtLic.setPlainText(Lic()) ui.txtLic.setReadOnly(True) ui.txtNumFea.setMinimum(0) ui.txtNumFea.setValue(0) dialog.setWindowTitle("easy fMRI Shared Response Model (SRM) - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmMASpectral() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # Init ui.cbESolver.addItem("None", None) ui.cbESolver.addItem("arpack", "arpack") ui.cbESolver.addItem("lobpcg", "lobpcg") ui.cbESolver.addItem("AMG (need pyamg)", "amg") # Pre ui.cbAffinity.addItem("RBF", "rbf") ui.cbAffinity.addItem("Nearest Neighbors", "nearest_neighbors") ui.cbAffinity.addItem("Precomputed", "precomputed") # Alg ui.cbAssignLabels.addItem("KMeans", "kmeans") ui.cbAssignLabels.addItem("Discretize", "discretize") dialog.setWindowTitle("easy fMRI Spectral Clustering - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmFEKPCA() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # Kenel List ui.cbKernel.addItem("linear") ui.cbKernel.addItem("poly") ui.cbKernel.addItem("rbf") ui.cbKernel.addItem("sigmoid") ui.cbKernel.addItem("cosine") dialog.setWindowTitle( "easy fMRI Kernel Principal Component Analysis (PCA) - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self, Jobs=None, parentin=None): global dialog, ui, parent, JRunner, JobList, JobListBack ui = Ui_frmJobs() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) JobList = Jobs JRunner = None if parentin is not None: dialog = MainWindow(parentin, JRunner) else: dialog = MainWindow() ui.setupUi(dialog) self.set_events(self) self.refresh_list(self) ui.tabWidget.setCurrentIndex(0) ui.lvJobs.setColumnCount(4) ui.lvJobs.setHeaderLabels(['ID', 'Type', 'Status', 'File']) ui.lvJobs.setColumnWidth(0, 50) ui.lvJobs.setColumnWidth(1, 150) ui.lvJobs.setColumnWidth(2, 150) dialog.setWindowTitle("easy fMRI Job Manager - V" + getVersion() + "B" + getBuild()) dialog.show()
def show(self): from Base.utility import getDirSpace, getDirSpaceINI global dialog global ui ui = Ui_frmWholeBrainROI() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget_2.setCurrentIndex(0) # Load Setting History history = History() histories = history.load_history() ui.txtSSSetting.clear() for history in histories: ui.txtSSSetting.addItem(history) ui.txtSSSetting.setCurrentText("") # Default Values for Input File ui.txtSSInFile.addItem( "$MAINDIR$/sub-$SUB$/func/sub-$SUB$_task-$TASK$_run-$RUN$_analyze.feat/mask.nii.gz" ) ui.txtSSInFile.addItem( "$MAINDIR$/sub-$SUB$/func/sub-$SUB$_task-$TASK$_run-$RUN$_analyze.feat/std_mask.nii.gz" ) # Default Values for Metric ui.cbMetric.addItem("Intersection of voxels from all masks", "inter") # Default Values for Space ui.txtSSSpace.addItem(DefaultSpace()) ProgramPath = os.path.dirname(os.path.abspath(__file__)) try: spaceINI = str.rsplit(open(getDirSpaceINI()).read(), "\n") for space in spaceINI: if len(space): ui.txtSSSpace.addItem(getDirSpace() + space) ui.txtSSSpace.setCurrentIndex(0) except: msgBox = QMessageBox() msgBox.setText("Cannot find MNI files!") msgBox.setIcon(QMessageBox.Critical) msgBox.setStandardButtons(QMessageBox.Ok) msgBox.exec_() dialog.setWindowTitle("easy fMRI whole brain ROI - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): from Base.utility import getVersion, getBuild global dialog, ui ui = Ui_frmMainMenuGUI() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) tools = Tools() tools.combo(ui.cbTools) try: ezdir = str(os.environ['EASYFMRI']) if len(ezdir): ui.txtEZDIR.setText(ezdir) assert os.path.isfile(ezdir + "/main.py") print("Easy fMRI directory is " + ezdir) else: print( "WARNING: cannot find $EASYFMRI! Please setup ~/.startupscript.sh" ) msgBox = QMessageBox() msgBox.setText( "WARNING: cannot find $EASYFMRI! Please setup ~/.startupscript.sh" ) msgBox.setIcon(QMessageBox.Critical) msgBox.setStandardButtons(QMessageBox.Ok) msgBox.exec_() except: print( "WARNING: cannot find $EASYFMRI! Please setup ~/.startupscript.sh" ) msgBox = QMessageBox() msgBox.setText( "WARNING: cannot find $EASYFMRI! Please setup ~/.startupscript.sh" ) msgBox.setIcon(QMessageBox.Critical) msgBox.setStandardButtons(QMessageBox.Ok) msgBox.exec_() ui.cbSource.addItem( "GitLab", ["gitlab.com/easyfmri/easyfmri.git", "https", False]) ui.cbSource.addItem( "GitHub", ["github.com/easyfmri/easyfmri.git", "https", False]) dialog.setWindowTitle("easy fMRI - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmSKModelEditor() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) ui.lwData.setColumnCount(4) ui.lwData.setHeaderLabels(['Name', 'Class', 'Shape', 'Value']) ui.lwData.setColumnWidth(0, 200) # Precision Avg ui.cbPrecisionAvg.addItem("weighted", "weighted") ui.cbPrecisionAvg.addItem("micro", "micro") ui.cbPrecisionAvg.addItem("macro", "macro") ui.cbPrecisionAvg.addItem("binary", "binary") ui.cbPrecisionAvg.addItem("samples", "samples") ui.cbPrecisionAvg.addItem("None", None) # Average of Precistion Avg ui.cbAPrecisionAvg.addItem("macro", "macro") ui.cbAPrecisionAvg.addItem("weighted", "weighted") ui.cbAPrecisionAvg.addItem("micro", "micro") ui.cbAPrecisionAvg.addItem("samples", "samples") ui.cbAPrecisionAvg.addItem("None", None) # Recall ui.cbRecallAvg.addItem("weighted", "weighted") ui.cbRecallAvg.addItem("micro", "micro") ui.cbRecallAvg.addItem("macro", "macro") ui.cbRecallAvg.addItem("binary", "binary") ui.cbRecallAvg.addItem("samples", "samples") ui.cbRecallAvg.addItem("None", None) # f1 score ui.cbF1Avg.addItem("weighted", "weighted") ui.cbF1Avg.addItem("micro", "micro") ui.cbF1Avg.addItem("macro", "macro") ui.cbF1Avg.addItem("binary", "binary") ui.cbF1Avg.addItem("samples", "samples") ui.cbF1Avg.addItem("None", None) dialog.setWindowTitle("easy fMRI SK Classification Model Viewer - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmMAClassicNetworkROI() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # Metric ui.txtMetric = api.CodeEdit(ui.tab_5) ui.txtMetric.setGeometry(QtCore.QRect(10, 10, 700, 350)) ui.txtMetric.setObjectName("txtMetric") ui.txtMetric.backend.start('backend/server.py') ui.txtMetric.modes.append(modes.CodeCompletionMode()) ui.txtMetric.modes.append(modes.CaretLineHighlighterMode()) ui.txtMetric.modes.append( modes.PygmentsSyntaxHighlighter(ui.txtMetric.document())) ui.txtMetric.panels.append(panels.LineNumberPanel(), api.Panel.Position.LEFT) font = QtGui.QFont() font.setBold(True) font.setWeight(75) ui.txtMetric.setFont(font) ui.txtMetric.setPlainText(MetricCode(), "", "") # Integration ui.txtIntegration = api.CodeEdit(ui.tab_3) ui.txtIntegration.setGeometry(QtCore.QRect(10, 10, 700, 350)) ui.txtIntegration.setObjectName("txtIntegration") ui.txtIntegration.backend.start('backend/server.py') ui.txtIntegration.modes.append(modes.CodeCompletionMode()) ui.txtIntegration.modes.append(modes.CaretLineHighlighterMode()) ui.txtIntegration.modes.append( modes.PygmentsSyntaxHighlighter(ui.txtIntegration.document())) ui.txtIntegration.panels.append(panels.LineNumberPanel(), api.Panel.Position.LEFT) font = QtGui.QFont() font.setBold(True) font.setWeight(75) ui.txtIntegration.setFont(font) ui.txtIntegration.setPlainText(IntegrationCode(), "", "") dialog.setWindowTitle( "easy fMRI Classic Network Analysis (ROI-based) - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self, filename=None, pwd=None): global dialog global ui global data global root global currentFile ui = Ui_frmDataEditor() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.lwData.setColumnCount(4) ui.lwData.setHeaderLabels(['Name', 'Class', 'Shape', 'Value']) ui.lwData.setColumnWidth(0, 200) dialog.setWindowTitle("easy fMRI Data Editor - V" + getVersion() + "B" + getBuild()) ui.tabWidget.setCurrentIndex(0) ui.tabWidget2.setCurrentIndex(0) layout = QHBoxLayout(ui.Code) ui.txtCode = api.CodeEdit(ui.Code) layout.addWidget(ui.txtCode) ui.txtCode.setObjectName("txtCode") ui.txtCode.backend.start(getDIR() + '/backend/server.py') ui.txtCode.modes.append(modes.CodeCompletionMode()) ui.txtCode.modes.append(modes.CaretLineHighlighterMode()) ui.txtCode.modes.append( modes.PygmentsSyntaxHighlighter(ui.txtCode.document())) ui.txtCode.panels.append(panels.SearchAndReplacePanel(), api.Panel.Position.TOP) ui.txtCode.panels.append(panels.LineNumberPanel(), api.Panel.Position.LEFT) ui.lblCodeFile.setText("New File") currentFile = None font = QtGui.QFont() font.setBold(True) font.setWeight(75) ui.txtCode.setFont(font) ui.txtCode.setPlainText(DefaultCode(), "", "") root = queue.Queue() data = None if filename is not None: if os.path.isfile(filename): self.OpenFile(self, filename) elif pwd is not None: if os.path.isfile(pwd + "/" + filename): self.OpenFile(self, pwd + "/" + filename) else: print("Data file cannot find!") dialog.show()
def show(self): global dialog global ui ui = Ui_frmMatNITF() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # SS Default Values for Space try: spaceINI = str.rsplit(open(getDirSpaceINI()).read(), "\n") for space in spaceINI: if len(space): ui.txtSSSpace.addItem(getDirSpace() + space) ui.txtSSSpace.setCurrentIndex(1) except: msgBox = QMessageBox() msgBox.setText("Cannot find MNI files!") msgBox.setIcon(QMessageBox.Critical) msgBox.setStandardButtons(QMessageBox.Ok) msgBox.exec_() afni = AFNI() afni.setting() if not afni.Validate: msgBox = QMessageBox() msgBox.setText("Cannot find AFNI setting!") msgBox.setIcon(QMessageBox.Critical) msgBox.setStandardButtons(QMessageBox.Ok) msgBox.exec_() else: ui.txtFAFNI.setText(afni.COPY) ui.txtFSUMA.setText(afni.REFIT) # Default Values for Threshold type ui.cbThType.addItem("Without Thresholding", "no") ui.cbThType.addItem("Minimum Thresholding", "min") ui.cbThType.addItem("Maximum Thresholding", "max") ui.cbThType.addItem("Extremum Thresholding", "ext") dialog.setWindowTitle("easy fMRI Convert Matrix to Nifti1 - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmMABayesianRSA() QtWidgets.QApplication.setStyle(QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # Method ui.cbMethod.addItem("Bayesian RSA","brsa") ui.cbMethod.addItem("Group Bayesian RSA","gbrsa") # Nureg Method ui.cbNuregMethod.addItem("PCA", "PCA") ui.cbNuregMethod.addItem("ICA", "ICA") ui.cbNuregMethod.addItem("Factor Analysis", "FA") ui.cbNuregMethod.addItem("Sparse PCA", "SPCA") # Tau2Prior ui.cbTau2Prior.addItem("Gamma", prior_GP_var_inv_gamma) ui.cbTau2Prior.addItem("Half Cauchy", prior_GP_var_half_cauchy) # SNR_prior ui.cbSNRPrior.addItem("Exponential", "exp") ui.cbSNRPrior.addItem("Log Norm", "lognorm") ui.cbSNRPrior.addItem("Uniform", "unif") # Base ui.txtEvents = api.CodeEdit(ui.tab_7) ui.txtEvents.setGeometry(QtCore.QRect(10, 10, 700, 500)) ui.txtEvents.setObjectName("txtEvents") ui.txtEvents.backend.start('backend/server.py') ui.txtEvents.modes.append(modes.CodeCompletionMode()) ui.txtEvents.modes.append(modes.CaretLineHighlighterMode()) ui.txtEvents.modes.append(modes.PygmentsSyntaxHighlighter(ui.txtEvents.document())) ui.txtEvents.panels.append(panels.LineNumberPanel(),api.Panel.Position.LEFT) font = QtGui.QFont() font.setBold(True) font.setWeight(75) ui.txtEvents.setFont(font) ui.txtEvents.setPlainText(OptimizationCode(),"","") ui.txtLic.setText(Lic()) dialog.setWindowTitle("easy fMRI Bayesian RSA - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self, parentin=None): from Base.utility import getVersion, getBuild global dialog, ui, parent ui = Ui_frmModelAnalysis() QtWidgets.QApplication.setStyle(QtWidgets.QStyleFactory.create('Fusion')) if parentin is not None: dialog = MainWindow(parentin) else: dialog = MainWindow() ui.setupUi(dialog) self.set_events(self) tools = Tools() tools.combo(ui.cbTools) ui.tabWidget.setCurrentIndex(0) # Unsupervised ui.cbMAU.addItem("Shared Similarity Analysis (SSA)", 30000) ui.cbMAU.addItem("RSA (Group Level)", 20008) ui.cbMAU.addItem("Bayesian RSA (Group Level)", 20001) ui.cbMAU.addItem("Gradient RSA (Group Level)", 20003) ui.cbMAU.addItem("Encoding Analysis (Session Level)", 20007) ui.cbMAU.addItem("Gradient Encoding Analysis (Session Level) ", 20002) ui.cbMAU.addItem("Classic Network Analysis ", 40000) ui.cbMAU.addItem("Classic Network Analysis (ROI-based)", 40001) ui.cbMAU.addItem("Clustering: Agglomerative", 10002) ui.cbMAU.addItem("Clustering: Birch", 10003) ui.cbMAU.addItem("Clustering: Gaussian Mixture", 10004) ui.cbMAU.addItem("Clustering: KMeans", 10000) ui.cbMAU.addItem("Clustering: Spectral", 10001) # Supervised ui.cbMAS.addItem("PyTorch (GPU) Support Vector Machine",10003) ui.cbMAS.addItem("SK Classification: AdaBoost",80005) ui.cbMAS.addItem("SK Classification: Decision Tree",80001) ui.cbMAS.addItem("SK Classification: Gaussian Naive Bayes",80000) ui.cbMAS.addItem("SK Classification: Linear Support Vector Machine (liblinear)",10001) ui.cbMAS.addItem("SK Classification: Multi-Layer Perceptron (MLP)",80002) ui.cbMAS.addItem("SK Classification: Nu Support Vector Machine (libsvm)",10002) ui.cbMAS.addItem("SK Classification: Random Forest",80004) ui.cbMAS.addItem("SK Classification: Stochastic Gradient Descent based approaches",80003) ui.cbMAS.addItem("SK Classification: Support Vector Machine (libsvm)",10000) ui.cbMAS.addItem("Atlas-based ensemble analysis", 99999) dialog.setWindowTitle("easy fMRI model analysis - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmMAGNB() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # Precision Avg ui.cbPrecisionAvg.addItem("weighted", "weighted") ui.cbPrecisionAvg.addItem("micro", "micro") ui.cbPrecisionAvg.addItem("macro", "macro") ui.cbPrecisionAvg.addItem("binary", "binary") ui.cbPrecisionAvg.addItem("samples", "samples") ui.cbPrecisionAvg.addItem("None", None) # Average of Precistion Avg ui.cbAPrecisionAvg.addItem("macro", "macro") ui.cbAPrecisionAvg.addItem("weighted", "weighted") ui.cbAPrecisionAvg.addItem("micro", "micro") ui.cbAPrecisionAvg.addItem("samples", "samples") ui.cbAPrecisionAvg.addItem("None", None) # Recall ui.cbRecallAvg.addItem("weighted", "weighted") ui.cbRecallAvg.addItem("micro", "micro") ui.cbRecallAvg.addItem("macro", "macro") ui.cbRecallAvg.addItem("binary", "binary") ui.cbRecallAvg.addItem("samples", "samples") ui.cbRecallAvg.addItem("None", None) # f1 score ui.cbF1Avg.addItem("weighted", "weighted") ui.cbF1Avg.addItem("micro", "micro") ui.cbF1Avg.addItem("macro", "macro") ui.cbF1Avg.addItem("binary", "binary") ui.cbF1Avg.addItem("samples", "samples") ui.cbF1Avg.addItem("None", None) dialog.setWindowTitle("easy fMRI Gaussian Naive Bayes - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmCombineData() QtWidgets.QApplication.setStyle(QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) dialog.setWindowTitle("easy fMRI combine data - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self, parentin=None): from Base.utility import getVersion, getBuild, getDirSpaceINI, getDirSpace global dialog, ui, parent ui = Ui_frmVisalization() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) if parentin is not None: dialog = MainWindow(parentin) else: dialog = MainWindow() ui.setupUi(dialog) ui.tabWidget.setCurrentIndex(0) self.set_events(self) tools = Tools() tools.combo(ui.cbTools) ui.cbHemisphere.addItem("Both") ui.cbHemisphere.addItem("Left") ui.cbHemisphere.addItem("Right") afni = AFNI() afni.setting() if not afni.Validate: msgBox = QMessageBox() msgBox.setText("Cannot find AFNI setting!") msgBox.setIcon(QMessageBox.Critical) msgBox.setStandardButtons(QMessageBox.Ok) msgBox.exec_() else: ui.txtFAFNI.setText(afni.AFNI) ui.txtFSUMA.setText(afni.SUMA) ui.txtDSUMA.setText(afni.SUMADIR) ui.txtSUMAMNI.setText(afni.MNI) ui.txtBSUMA.setText(afni.Both) ui.txtLSUMA.setText(afni.Left) ui.txtRSUMA.setText(afni.Right) dialog.setWindowTitle("easy fMRI visualization - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmTAInterSec() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) dialog.setWindowTitle( "easy fMRI Temporal Alignment with Intersection strategy- V" + getVersion() + "B" + getBuild()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmDataEditor() QtWidgets.QApplication.setStyle(QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.lwData.setColumnCount(4) ui.lwData.setHeaderLabels(['Name','Class','Shape','Value']) ui.lwData.setColumnWidth(0,200) dialog.setWindowTitle("easy fMRI Data Viewer - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): from Base.utility import getVersion,getBuild global dialog, ui ui = Ui_frmMainMenuGUI() QtWidgets.QApplication.setStyle(QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) tools = Tools() tools.combo(ui.cbTools) dialog.setWindowTitle("easy fMRI - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui global data ui = Ui_frmAAVoxelSelection() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) # Clear Views ui.vwSele.clear() ui.vwSele.setColumnCount(2) ui.vwSele.setRowCount(0) ui.vwSele.setColumnWidth(0, 120) ui.vwSele.setColumnWidth(1, 100) ui.vwSele.setHorizontalHeaderLabels(['Coordinate', 'Accuracy']) ui.vwSele.setSortingEnabled(True) ui.vwSele.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection) ui.vwSele.setSelectionBehavior(QAbstractItemView.SelectRows) ui.vwAvai.clear() ui.vwAvai.setColumnCount(2) ui.vwSele.setRowCount(0) ui.vwAvai.setColumnWidth(0, 120) ui.vwAvai.setColumnWidth(1, 100) ui.vwAvai.setHorizontalHeaderLabels(['Coordinate', 'Accuracy']) ui.vwAvai.setSortingEnabled(True) ui.vwAvai.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection) ui.vwAvai.setSelectionBehavior(QAbstractItemView.SelectRows) data = None dialog.setWindowTitle( "easy fMRI Voxel-based analysis: Voxel Selection - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmRemoveRestScanCross() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) dialog.setWindowTitle( "easy fMRI remove rest scans (after cross validation) - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()
def show(self): global dialog global ui ui = Ui_frmFEConv4D2D() QtWidgets.QApplication.setStyle( QtWidgets.QStyleFactory.create('Fusion')) dialog = QtWidgets.QMainWindow() ui.setupUi(dialog) self.set_events(self) ui.tabWidget.setCurrentIndex(0) dialog.setWindowTitle("easy fMRI Convert 4D data to 2D - V" + getVersion() + "B" + getBuild()) dialog.setWindowFlags(dialog.windowFlags() | QtCore.Qt.CustomizeWindowHint) dialog.setWindowFlags(dialog.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) dialog.setFixedSize(dialog.size()) dialog.show()