vtk

Buffer function for python 3+

寵の児 提交于 2020-12-05 06:17:12
问题 I'm trying to open a vtk window using vtk_show, but my Ipython console crashes every time i do this, apparently this is because Ipython can't display an external window, which is exactly what vtk_show does. I searched on google for a solution, but it's written for python2 (i'm using python 3.6.3). Here's the solution i found: import vtk from IPython.display import Image def vtk_show(renderer, width=400, height=300): """ Takes vtkRenderer instance and returns an IPython Image with the

Buffer function for python 3+

跟風遠走 提交于 2020-12-05 06:16:06
问题 I'm trying to open a vtk window using vtk_show, but my Ipython console crashes every time i do this, apparently this is because Ipython can't display an external window, which is exactly what vtk_show does. I searched on google for a solution, but it's written for python2 (i'm using python 3.6.3). Here's the solution i found: import vtk from IPython.display import Image def vtk_show(renderer, width=400, height=300): """ Takes vtkRenderer instance and returns an IPython Image with the

QVTKWidget not displaying objects wall's

一曲冷凌霜 提交于 2020-06-26 07:05:12
问题 I'm using the integration Qt-VTK widget (QVTKWidget) and the VTK objects i want to visualize do not display the way they supposed to. I have modified the code of the CylinderRenderingPropertiesExample located on VTKExamples site. The code #include "mainwindow.h" #include "ui_mainwindow.h" #include <vtkCylinderSource.h> #include <vtkPolyDataMapper.h> #include <vtkActor.h> #include <vtkRenderer.h> #include <vtkRenderWindow.h> #include <vtkRenderWindowInteractor.h> #include <vtkProperty.h>

Python TkInter: Creating a Window which runs my custom code

可紊 提交于 2020-06-17 09:27:50
问题 I am Creating a python custom code to Visualise scientific/medical data in 3D. This code should be implemented in the GUI I am creating with TKInter, so as to visualise these data sets directly in the GUI. If I already have the code written up is there a way I can run this code in my GUI and subsequently open and run the visualisation window directly in the TKInter GUI ??? Is it possible to create custom windows inside with TKInter which contain more complex code and allow the user to