Beispiel #1
0
    def __init__(self, parent=None):
        super(VEMainWindow, self).__init__(parent)
        self.setupUi(self)

        self.ren = vtk.vtkRenderer()
        self.ren.SetBackground(0.2, 0.2, 0.2)

        self.i = self.qvtkWidget

        self.renWin = self.i.GetRenderWindow()
        self.renWin.SetAAFrames(5)
        self.renWin.AddRenderer(self.ren)
        self.renWin.Render()

        self.currLineId = 0

        self.polyGeom = sl.readVTP("/data/viscontest/Blade_Geometry.90.vtp")
        self.polyLine = None

        # generate the plot
        fig = Figure(figsize=(600, 600),
                     dpi=72,
                     facecolor=(1, 1, 1),
                     edgecolor=(0, 0, 0))
        self.ax = fig.add_subplot(111)
        self.ax.plot([0, 1])
        # generate the canvas to display the plot
        canvas = FigureCanvas(fig)

        self.canvasWidget = canvas
        self.canvasWidget.setMinimumSize(QSize(400, 0))
        self.canvasWidget.setObjectName("canvasWidget")
        self.horizontalLayout_5.addWidget(self.canvasWidget)
Beispiel #2
0
	def __init__(self, parent=None):
		super(VEMainWindow, self).__init__(parent)
		self.setupUi(self)

		self.ren = vtk.vtkRenderer()
		self.ren.SetBackground(0.2,0.2,0.2)

		self.i = self.qvtkWidget

		self.renWin = self.i.GetRenderWindow()
		self.renWin.SetAAFrames(5)
		self.renWin.AddRenderer(self.ren)
		self.renWin.Render()

		self.currLineId = 0

		self.polyGeom = sl.readVTP("/data/viscontest/Blade_Geometry.90.vtp")
		self.polyLine = None

		# generate the plot
		fig = Figure(figsize=(600,600), dpi=72, facecolor=(1,1,1), edgecolor=(0,0,0))
		self.ax = fig.add_subplot(111)
		self.ax.plot([0,1])
		# generate the canvas to display the plot
		canvas = FigureCanvas(fig)

		self.canvasWidget = canvas
		self.canvasWidget.setMinimumSize(QSize(400, 0))
		self.canvasWidget.setObjectName("canvasWidget")
		self.horizontalLayout_5.addWidget(self.canvasWidget)
Beispiel #3
0
 def on_action_Open_triggered(self):
     (fileName,
      x) = QFileDialog.getOpenFileName(self, unicode("Open VTK File"),
                                       "/data/viscontest/DES_streamlines",
                                       unicode("VTK files (*.vtp *.vtk)"))
     self.poly = sl.readVTP(fileName)
     self.ibox.setHtml("# of lines: %d<br>" %
                       (self.poly.GetNumberOfLines()))
     self.ChangeLine()
     self.RenderLine()
Beispiel #4
0
	def on_action_Open_triggered(self):
		(fileName, x) = QFileDialog.getOpenFileName(self, unicode("Open VTK File"), "/data/viscontest/DES_streamlines", unicode("VTK files (*.vtp *.vtk)"))
		self.poly = sl.readVTP(fileName)
		self.ibox.setHtml("# of lines: %d<br>" % (self.poly.GetNumberOfLines()))
		self.ChangeLine()
		self.RenderLine()