예제 #1
0
    def __init__( self, parent = None ):
        self.workThread = None
        QtGui.QMainWindow.__init__( self, parent )
        self.setWindowTitle( 'Crowd Analysis' )

        mainFrame = QtGui.QFrame( self )
        mainFrame.setFrameShadow( QtGui.QFrame.Plain )
        mainFrame.setFrameShape( QtGui.QFrame.NoFrame )
        mainVLayout = QtGui.QHBoxLayout( mainFrame )
        mainVLayout.setSpacing( 3 )
        mainVLayout.setMargin( 0 )

        # Feedback panel
        splitter = QtGui.QSplitter( mainFrame )
        splitter.setOrientation( QtCore.Qt.Vertical )
        # GL Window
        wFrame = QtGui.QFrame(splitter)
        wLayout = QtGui.QGridLayout( wFrame )
        wLayout.setColumnStretch( 0, 0 )
        wLayout.setColumnStretch( 1, 1 )
        wLayout.setColumnStretch( 2, 0 )
        self.glWindow = GLWidget(  (10,10),(0,0), (10,10),(0,0), (1,1) )
        self.glWindow.setMinimumSize( QtCore.QSize( 640, 480 ) )
        wLayout.addWidget( self.glWindow, 0, 0, 1, 3 )
        self.playerWidget = PlayerController( self.glWindow )
        self.playerWidget.need3DUpdate.connect( self.glWindow.updateGL )
        wLayout.addWidget( self.playerWidget, 1, 0, 1, 3 )
        wLayout.setRowStretch( 0, 1 )
        wLayout.setRowStretch( 1, 0 )
        # Console
        self.console = Logger( splitter )
        QtCore.QObject.connect( self.console, QtCore.SIGNAL('cursorPositionChanged ()'), self.logExtended )

        # set up the shared resource
        self.rsrc = SystemResource()
        self.rsrc.glWindow = self.glWindow
        self.rsrc.logger = self.console
        sys.stdout = ConsoleFile()
        sys.stdout.processMessage.connect( self.console.info )

        # Main configuration panel
        self.f = QtGui.QFrame()
        vLayout = QtGui.QVBoxLayout()
        vLayout.setMargin( 0 )
        self.analysisBox = AnlaysisWidget( self.rsrc, self )
        QtCore.QObject.connect( self.analysisBox, QtCore.SIGNAL('scbLoaded(PyQt_PyObject)'), self.scbLoaded )
        vLayout.addWidget( self.analysisBox )
        vLayout.addStretch( 1 )
        self.f.setLayout( vLayout )

        mainVLayout.addWidget( self.f, 0 )
        mainVLayout.addWidget( splitter, 1 )

        self.setCentralWidget( mainFrame )

        self.createActions()
        self.createMenus()
        self.createStatusBar()
예제 #2
0
    def __init__(self, parent):
        QSplitter.__init__(self, Qt.Horizontal, parent)
        w = QWidget(self)
        w.setMinimumSize(64, 64)
        w.setLayout(BoxLayout(self))
        self.glWidget = GLWidget(self)
        self.glWidget.centroids = (1, 2, 3), (-1, -2, -3)
        self.addWidget(self.glWidget)
        self.addWidget(w)
        self.setStretchFactor(0, 1)
        self.setStretchFactor(1, 1)

        dx, dy, dz = map(lambda x, y: x - y, *self.glWidget.centroids)
        print dx, dy, dz
        w.layout().setValues(dx, dy, dz)  # wonky
        w.layout().valueChanged.connect(self.valueChangedEvent)
예제 #3
0
파일: main.py 프로젝트: michaelRM/OpenAnt
    def __init__(self):
        '''
        Only initialize critical components(like opengl) here, use start() for anything else
        '''
        QMainWindow.__init__(self)

        Globals.glwidget = GLWidget(self)
        self.setCentralWidget(Globals.glwidget)
        Globals.glwidget.makeCurrent()

        if Globals.musicOn:
            print "Using music"
            Globals.mediaobject = Phonon.MediaObject(self)
            self.audioOutput = Phonon.AudioOutput(Phonon.MusicCategory, self)
            Phonon.createPath(Globals.mediaobject, self.audioOutput)

        self.map = Map()  #map class

        self.drawTimer = QTimer()
        self.drawTimer.timeout.connect(self.drawTimerTimeout)
        self.drawTimer.start(0.2)
예제 #4
0
    def __init__(self):
        super(MainWindow, self).__init__()

        centralWidget = QtGui.QWidget()
        self.setCentralWidget(centralWidget)

        self.glWidget = GLWidget()

        self.glWidgetArea = QtGui.QScrollArea()
        self.glWidgetArea.setWidget(self.glWidget)
        self.glWidgetArea.setWidgetResizable(True)
        self.glWidgetArea.setHorizontalScrollBarPolicy(
            QtCore.Qt.ScrollBarAlwaysOff)
        self.glWidgetArea.setVerticalScrollBarPolicy(
            QtCore.Qt.ScrollBarAlwaysOff)
        self.glWidgetArea.setSizePolicy(QtGui.QSizePolicy.Ignored,
                                        QtGui.QSizePolicy.Ignored)
        self.glWidgetArea.setMinimumSize(50, 50)

        self.createActions()
        self.createMenus()

        centralLayout = QtGui.QGridLayout()
        centralLayout.addWidget(self.glWidgetArea, 0, 0)
        centralWidget.setLayout(centralLayout)

        self.setWindowTitle("3D Brain Network Analysis Tool")
        self.resize(800, 600)

        self.renderSystem = RenderSystem()
        self.sourceManager = SourceManager()
        self.sceneManager = SceneManager()
        self.renderSystem.setRenderWidget(self.glWidget)
        self.renderSystem.setSceneManager(self.sceneManager)
        self.sceneManager.addSource(self.sourceManager)

        self.glWidget.addRenderSystem(self.renderSystem)
예제 #5
0
    def __init__(self):
        QDialog.__init__(self, None)
        uic.loadUi(path, self)
        '''
        ## volume_controller _ 01 ##
        '''
        self.volume_cntr = Volume_controller(
            model_path='../Diagnosis_Network/model/Grad_cam_10')

        self.Similar_Explanations = Similar_Document(Top)
        self.image = QtGui.QImage()
        self.file_name = ""
        ### Event Handler
        self.Load_MR_Image.clicked.connect(self.open_image_fd)

        # Analyze_btn even

        #self.MR_Analyze_btn.clicked.connect(self.Visual_Explanation)
        #self.MR_Analyze_btn.clicked.connect(self.Report)
        #self.MR_Analyze_btn.clicked.connect(self.Explanation)
        #self.MR_Analyze_btn.clicked.connect(self.show_prediction)
        #self.MR_Analyze_btn.clicked.connect(self.show_details)

        self.MR_Analyze_btn.clicked.connect(self.Diagnosis_disease)

        # Slider event
        self.Axial_slider.sliderMoved['int'].connect(self.Axial_slider_change)
        self.Coronal_slider.sliderMoved['int'].connect(
            self.Coronal_slider_change)
        self.Sagittal_slider.sliderMoved['int'].connect(
            self.Sagittal_slider_change)

        self.Topiclist.doubleClicked.connect(self.showContent)

        # i think we need more implement here

        # openGL
        self.openGLWidget = GLWidget(self.groupBox_2)
        self.openGLWidget.setGeometry(QtCore.QRect(20, 50, 370, 370))
        self.openGLWidget.setObjectName("openGLWidget")

        # QtWidget label
        #self.opengl_title = QtWidgets.QLabel(self.groupBox_2)
        #self.opengl_title.setGeometry(QtCore.QRect(0, 30, 81, 21))
        self.opengl_title.raise_()

        self.paper_to_journal = {
            "High b-value diffusion imaging of dementia_3A application to vascular dementia and Alzheimer disease":
            "neurological sciences (2007)",
            "Novel MRI techniques in the assessment of dementia":
            "nuclear medicine and molecular imaging(2008)",
            "Oxidative modification and down-regulation of Pin1 in Alzheimer's disease hippocampus_3A a redox proteomics analysis":
            "Neurobiology of aging (2006)",
            "Ways toward an early diagnosis in Alzheimer's disease_3A the Alzheimer's Disease Neuroimaging Initiative (ADNI)":
            "Alzheimer's & Dementia (2005)",
            "Novel MRI techniques in the assessment of dementia":
            "neurological sciences (2007)",
            "Amyloid precursor protein processing and A42 deposition in atransgenic mouse model of Alzheimer disease":
            "National Academy of Sciences(1997)",
            "Oxidative modification and down - regulation of Pin1 in Alzheimer's disease hippocampus_3A a redox proteomics analysis":
            "Neurobiology of aging(2006)",
            "New insights into brain BDNF function in normal aging and Alzheimer disease":
            "Brain research reviews (2008)",
            "The developmental role of serotonin_3A news from mouse molecular genetics":
            "Nature Reviews Neuroscience (2003)",
            "Chronic divalproex sodium use and brain atrophy in Alzheimer disease":
            "Neurology (2011)",
            'Amyloid precursor protein processing and A42 deposition in a transgenic mouse model of Alzheimer disease':
            "National Academy of Sciences (1997)",
            'Oxidative modification and down-regulation of Pin1 in Alzheimer_s disease hippocampus_3A a redox proteomics analysis':
            'Neurobiology (2006)'
        }

        self.paper_to_author = {
            "High b-value diffusion imaging of dementia_3A application to vascular dementia and Alzheimer disease":
            "Mayzel-Oreg, Orna, et al.",
            "Novel MRI techniques in the assessment of dementia":
            "Teipel, Stefan J., et al.",
            "Oxidative modification and down-regulation of Pin1 in Alzheimer's disease hippocampus_3A a redox proteomics analysis":
            "Sultana, Rukhsana, et al.",
            "Ways toward an early diagnosis in Alzheimer's disease_3A the Alzheimer's Disease Neuroimaging Initiative (ADNI)":
            "Mueller, Susanne G., et al.",
            "Novel MRI techniques in the assessment of dementia":
            "Teipel, Stefan J., et al.",
            "Amyloid precursor protein processing and A42 deposition in atransgenic mouse model of Alzheimer disease":
            "Johnson - Wood, K., et al.",
            "Oxidative modification and down - regulation of Pin1 in Alzheimer's disease hippocampus_3A a redox proteomics analysis":
            "Sultana, Rukhsana, et al.",
            "New insights into brain BDNF function in normal aging and Alzheimer disease":
            "Tapia-Arancibia, Lucia, et al.",
            "The developmental role of serotonin_3A news from mouse molecular genetics":
            "Gaspar, Patricia, Olivier Cases, and Luc Maroteaux.",
            "Chronic divalproex sodium use and brain atrophy in Alzheimer disease":
            "Fleisher, A.S., et al.",
            'Amyloid precursor protein processing and A42 deposition in a transgenic mouse model of Alzheimer disease':
            "Johnson-Wood, K., et al.",
            'Oxidative modification and down-regulation of Pin1 in Alzheimer_s disease hippocampus_3A a redox proteomics analysis':
            'Sultana, Rukhsana, et al.'
        }
        '''
        font = QtGui.QFont()
        font.setPointSize(20)
        font.setItalic(True)
        self.opengl_title.setFont(font)
        #self.opengl_title.setAutoFillBackground(False)
        self.opengl_title.setStyleSheet("background-color: rgb(0, 0, 0);\n"
                                        "color: rgb(255, 255, 255);")

        #self.opengl_title.
        '''

        self.flag = 0
        if self.flag == 1:
            print("test")

        self.topics = []
        self.contents = []
        self.pairs = []

        self.ad_hippocampus = 0
        self.nc_hippocampus = 0
        self.ad_ventricle = 0
        self.nc_ventricle = 0
        self.ad_amygdala = 0
        self.nc_amygdala = 0
        self.ad_thalamus = 0
        self.nc_thalamus = 0
        self.ad_putamen = 0
        self.nc_putamen = 0
        self.ad_wholebrain = 0
        self.nc_wholebrain = 0