Exemplo n.º 1
0
    def __init__(self, parent=None):
        QtWidgets.QMainWindow.__init__(self, parent)
        #self.resize(800,600)

        self.frame1 = QCILViewerWidget(
            viewer=viewer2D,
            shape=(600, 600),
            interactorStyle=vlink.Linked2DInteractorStyle)
        self.frame2 = QCILViewerWidget(
            viewer=viewer3D,
            shape=(600, 600),
            interactorStyle=vlink.Linked3DInteractorStyle)

        reader = vtk.vtkMetaImageReader()
        reader.SetFileName('head.mha')
        reader.Update()

        self.frame1.viewer.setInputData(reader.GetOutput())
        self.frame2.viewer.setInputData(reader.GetOutput())

        # Initially link viewers
        self.linkedViewersSetup()
        self.link2D3D.enable()

        layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight)
        layout.addWidget(self.frame1)
        layout.addWidget(self.frame2)

        cw = QtWidgets.QWidget()
        cw.setLayout(layout)
        self.setCentralWidget(cw)
        self.central_widget = cw
        self.show()
Exemplo n.º 2
0
    def __init__(self, parent=None):
        QtWidgets.QMainWindow.__init__(self, parent)
        #self.resize(800,600)

        self.frame1 = QCILViewerWidget(
            viewer=viewer2D,
            shape=(600, 600),
            interactorStyle=vlink.Linked2DInteractorStyle)
        self.frame2 = QCILViewerWidget(
            viewer=viewer2D,
            shape=(600, 600),
            interactorStyle=vlink.Linked2DInteractorStyle)

        # Initially link viewers
        self.linkedViewersSetup()
        self.linker.enable()

        layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight)
        layout.addWidget(self.frame1)
        layout.addWidget(self.frame2)

        cw = QtWidgets.QWidget()
        cw.setLayout(layout)
        self.setCentralWidget(cw)
        self.central_widget = cw

        self.show()
Exemplo n.º 3
0
    def __init__(self, parent=None, viewer=viewer2D):
        QtWidgets.QMainWindow.__init__(self, parent)

        self.frame = QCILViewerWidget(viewer=viewer, shape=(600, 600))

        self.setCentralWidget(self.frame)

        self.show()
Exemplo n.º 4
0
    def __init__(self, parent = None):
        QtWidgets.QMainWindow.__init__(self, parent)
        #self.resize(800,600)
        self._tmpdir = None
        self._menus = {}

        self.SetUpMenus()

        self.frame = QCILViewerWidget(viewer=viewer2D, 
                                      shape=(600,600),
                                      interactorStyle=vlink.Linked2DInteractorStyle)
        self.frame1 = QCILViewerWidget(viewer=viewer3D, 
                                       shape=(600,600),
                                       interactorStyle=vlink.Linked3DInteractorStyle)
        layout = QtWidgets.QHBoxLayout(self)
        layout.addWidget(self.frame)
        layout.addWidget(self.frame1)
        widget = QtWidgets.QWidget(self)
        widget.setLayout(layout)
        # self.setCentralWidget(self.frame)
        self.setCentralWidget(widget)
    
        self.show()
 def __init__(self, parent = None, viewer=viewer2D):
     QtWidgets.QMainWindow.__init__(self, parent)
     
     self.frame = QCILViewerWidget(viewer=viewer, shape=(600,600))
             
     reader = vtk.vtkMetaImageReader()
     reader.SetFileName('head.mha')
     reader.Update()
     
     self.frame.viewer.setInputData(reader.GetOutput())
     
     self.setCentralWidget(self.frame)
 
     self.show()