vtk

Adding RenderWindowControl to tool box

Deadly 提交于 2021-02-19 07:31:39
问题 I am trying to use Kitware ActiViz.NET. I have installed it using nuget. But I can't seem to find RenderWindowControl on the toolbox. I have been trying to add it manually this way: invoke "Choose Items..." and in the following dialog click on button "Browse...", navigate to your ActiViz.NET installation folder, browse to /bin folder, select "Kitware.VTK.dll". Click OK. Now you should see in your ToolBox a new control named RenderWindowControl. But I get "The file "C:\programfiles\activiz.net

building opencv with sfm module issues

元气小坏坏 提交于 2021-02-11 13:26:55
问题 I am trying to build opencv with sfm modules I've built and installed gflags then glog and the ceres-solver. Yet the make logs says: Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags . Even though in earlier lines it says it finds both to these directories. I've also built and installed VTK though for some reason it doesn't find it even when I manually select the build directory. Below is the relevant section of my CMake log: VTK is not found. Please set

building opencv with sfm module issues

天大地大妈咪最大 提交于 2021-02-11 13:26:36
问题 I am trying to build opencv with sfm modules I've built and installed gflags then glog and the ceres-solver. Yet the make logs says: Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags . Even though in earlier lines it says it finds both to these directories. I've also built and installed VTK though for some reason it doesn't find it even when I manually select the build directory. Below is the relevant section of my CMake log: VTK is not found. Please set

Rendering a gltf/glb file in jupyter notebook using vtk and k3d

断了今生、忘了曾经 提交于 2021-02-08 03:41:36
问题 I have explored the available methods of how to render a gltf/glb file inline in a jupyter notebook to keep the viewer callback interactivity intact. I have eventually ended up using vtk and k3d to achieve this. The two hurdles I have are: How to use the vtkGLTFReader() to get vtkPolyData objects from the glb and render these in k3d? SOLUTION : See method posted in the comments. How to display colors/textures embedded in the gltf/glb to show them in k3d? 回答1: Here is the code to get

Retrieving facets and point from VTK file in python

落爺英雄遲暮 提交于 2021-02-07 14:31:31
问题 I have a vtk file containing a 3d model, I would like to extract the point coordinates and the facets. Here is a minimal working example: import vtk import numpy from vtk.util.numpy_support import vtk_to_numpy reader = vtk.vtkPolyDataReader() reader.SetFileName('test.vtk') reader.Update() polydata = reader.GetOutput() points = polydata.GetPoints() array = points.GetData() numpy_nodes = vtk_to_numpy(array) This works as numpy_nodes contains the x,y,z coordinates of all points, but I am at loss

mix VTK and SWIG Python

混江龙づ霸主 提交于 2021-02-07 09:33:47
问题 Here is my class: #include <vtkPolyData> class VTKUtilities Mesh3D MeshfromVTKPolyData(vtkPolyData* pdmesh) { Mesh3D mesh; //... //my conversion code to do the actual conversion //... return mesh; } I tried wrapping this to python by SWIG but I try to call my function in python like this: import VTKUtilities import vtk pd = vtk.vtkPolyData() VTKUtilities.MeshfromVTKPolyData(pd) I get errors like : NotImplementedError: Wrong number of arguments... for VTKUtilities_MeshfromVTKPolyData ...

Is there a way to fill one side of the gyroid surface by using Mayavi?

心不动则不痛 提交于 2021-02-05 09:22:31
问题 I'm using Mayavi to plot an iso-surface of a gyroid. My problem is that I need a more solid structure by filling one side of the two generated areas. In the following pictures, you can see how my generated iso-surface looks like and how it should look like after filling one side. My generated iso-surface: How it should look like: The iso-surface can be generated by the following equation: U = sin(2*pi * x/a) * cos(2*pi * y/a) + sin(2*pi * y/a) * cos(2*pi * z/a) \ + sin(2*pi * z/a) * cos(2*pi

Is there a way to fill one side of the gyroid surface by using Mayavi?

我的梦境 提交于 2021-02-05 09:22:26
问题 I'm using Mayavi to plot an iso-surface of a gyroid. My problem is that I need a more solid structure by filling one side of the two generated areas. In the following pictures, you can see how my generated iso-surface looks like and how it should look like after filling one side. My generated iso-surface: How it should look like: The iso-surface can be generated by the following equation: U = sin(2*pi * x/a) * cos(2*pi * y/a) + sin(2*pi * y/a) * cos(2*pi * z/a) \ + sin(2*pi * z/a) * cos(2*pi

Removing point clouds inside a given box

拜拜、爱过 提交于 2021-01-29 20:00:52
问题 I would like to implement a code where I can remove certain points of the point clouds inside a given box. This is what I have so far: void removePoints(){ pcl::CropBox<pcl::PointXYZI> boxFilter; float x_min = -0.15, y_min = -0.5, z_min = -0.7; float x_max = +1, y_max = +2, z_max = +5; boxFilter.setMin(Eigen::Vector4f(x_min, y_min, z_min, 1.0)); boxFilter.setMax(Eigen::Vector4f(x_max, y_max, z_max, 1.0)); boxFilter.setInputCloud(cloud); boxFilter.filter(*newCloud); viewer-

How to Embed a VTK Plot in GTK GLArea Widget

社会主义新天地 提交于 2021-01-29 15:21:25
问题 How a VTK 3D plot can be plotted in a GTK GLArea widget? The examples that I found so far are for GTK2 widgets and they do not work for GTK3. System and software information: Python: 3.8.6 (x64) - GTK3 - vtk: 8.2 (x64) - Windows 10 (x64) 来源: https://stackoverflow.com/questions/65517233/how-to-embed-a-vtk-plot-in-gtk-glarea-widget