vtk

python example app hangs on close

泄露秘密 提交于 2019-12-07 02:49:25
I am relatively new to python and completely new to vtk, so I started with the Camera.py example program from the vtk.org website. Running Enthought Canopy 1.4.1.1975 on Mac OSX 10.9.4 the example program runs but hangs the python interpreter on close with the following error. The kernel (user Python environment) has terminated with error code -11. This may be due to a bug in your code or in the kernel itself. I simplified the example program down to the following and still observe the same behavior. import vtk #Create a renderer, render window, and interactor renderer = vtk.vtkRenderer();

Mac OS X Yosemite下VTK6.1安装及其运行效果测试

安稳与你 提交于 2019-12-06 22:55:42
由于之前的ThinkPad的已经用了4年多了,已逐渐不能满足当下的三维软件开发的要求了。终于在拿到了几个月的工资后,横下心买了个mac,也为今后的移动端开发做下准备。 The Visualization Toolkit (VTK) (http://www.vtk.org/) is an open-source, freely available software system for 3D computer graphics, image processing and visualization. VTK consists of a C++ class library and several interpreted interface layers including Tcl/Tk, Java, and Python. Kitware, whose team created and continues to extend the toolkit, offers professional support and consulting services for VTK. VTK supports a wide variety of visualization algorithms including: scalar, vector, tensor, texture, and

Where can i find vtk documentation for python?

早过忘川 提交于 2019-12-06 17:12:23
问题 I am trying to use VTK from python. I tried to find and could not realy find anything on the web which can be used for documentation. I tried looking at the c++ documentation but the methods are very different. Thanks a lot 回答1: You could see the python examples at VTK's wiki. There is another resource by going to the official nightly documentation and looking for a particular class; in the section examples for many (not all) classes you can find implementations in python (also in c++ and tcl

Simple arrow mayavi/tvtk in mlab weird behaviour (looks like a bug)

谁都会走 提交于 2019-12-06 14:46:18
问题 I am trying to do a simple arrow in mlab to point to different areas on the graph. Consider this example: fig = mlab.figure( bgcolor=(0, 0, 0)) b=visual.Box(x=0, y=10, z=10) visual.set_viewer(fig) b=visual.Box(x=0, y=10, z=10) b2=visual.Box(x=10,y=10,z=10, color=(0,0,1)) a=visual.Arrow(x=10,y=10,z=10, color=(1,0,0)) So in my mind the arrow should appear from the blue box, however it lives it's own misterious life and is located absolutely off. That is very strange that boxes are located and

Embedding VTK object in PyQT5 window

孤人 提交于 2019-12-06 13:46:49
I'm working on a generative design project for 3D models. I need to create a simple QT application that allows the user to view meshes using VTK and includes a few buttons for feedback into the generation algorithms. GUIs are something completely new to me so I'm quite stumped on how to integrate the code from here for a viewer into a wider program. For now I'm merely trying to create a single button and a 3D cone in the viewer. My code so far crashes when run. It uses the QVTKRenderWindowInteractor() object from the link given, with the object directly pasted into the file. try: import sys

How to create a CMakeLists.txt for a project containing CGAL and VTK libraries

天大地大妈咪最大 提交于 2019-12-06 13:30:21
I've written a small programm for evaluating sientific data (3D surface mesh). I do all the geometric calculations with functions provided by the vtk library. The vtkBooleanOperationPolyDataFilter is no robust and crashes randomly. So i decided to performe the boolean operations with functions of the cgal library (tested with some sample data -> no stability problems). Now I want to merge this two projects together. The vtk project CMakeLists.txt: cmake_minimum_required(VERSION 2.8) PROJECT(calcporosity) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(calcporosity MACOSX

How to visualize a sequence of TOF-Sensor data in PCL (with Qt)?

送分小仙女□ 提交于 2019-12-06 13:21:45
I've this TOF-sensor and I want to visualize the sensor's data as a point-cloud in Qt. I converted the data into a pcl::PointCloud and now I want to visualize it. The API of the sensor would emit a picture whenever one was created. And I would send it to the QVTKWidget to visualize it. And I tried it with this snippet of code (which I got from here ): pcl::visualization::PCLVisualizer pvis ("test_vis", false); // 'false' prevents PCLVisualizer's own window to pop up pvis.addPointCloud<pcl::PointXYZ>(pc); // pc is my point cloud vtkSmartPointer<vtkRenderWindow> renderWindow = pvis

Failure installing VTK from PyPI on x86_64

帅比萌擦擦* 提交于 2019-12-06 12:43:01
I know that VTK is now available as a wheel in PyPI ( https://pypi.python.org/pypi/vtk/8.1.0 ) but I am not able to install it. Is there a way around this? When I try this is what I get: $ pip install vtk Collecting vtk Could not find a version that satisfies the requirement vtk (from versions: ) No matching distribution found for vtk I have tried pointing to the wheel's URL but still the same problem. $ pip install https://pypi.python.org/packages/13/7f/735fbc0dd78c91ad3693cfdfe5c91603899fc8e24909f935d46d2fde6559/vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=49c8d620b2affe2dc2284048659115e5

vtk value at x,y,z point

故事扮演 提交于 2019-12-06 11:04:09
I have a vtk file which maps temperature in 3 dimensions. I would like to determine the temperature at a given x, y, z point. I will use the following code in order to load the vtk file ( Reading .vtk file ): int main(int argc, char *argv[]) { // simply set filename here (oh static joy) std::string inputFilename = "setYourPathToVtkFileHere"; // Get all data from the file vtkSmartPointer<vtkGenericDataObjectReader> reader = vtkSmartPointer<vtkGenericDataObjectReader>::New(); reader->SetFileName(inputFilename.c_str()); reader->Update(); // All of the standard data types can be checked and

Configuring a CMake C++/Java Project to work with Eclipse

爱⌒轻易说出口 提交于 2019-12-06 10:55:06
I'm currently trying to set up a VTK project that has pre written Cmake makefiles to work with Eclipse. The code that I need to use is in both C++ and Java, but my main concern right now is actually to be able to translate the existing project into something that Eclipse can understand with all the dependencies etc. Please feel free to ask further questions. Cheers. First of all you need the Eclipse CDT package. Then you need to generate the Eclipse CDT project: cmake -G "Eclipse CDT4 - Unix Makefiles" /path/to/source/dir . The last step you need to do is import the project in the current