VTK
VTK : Cut Volume By Plane
cut a volume by a plane and display the cut section. The left renderer contains the original volume object, and the right renderer shows the cross section in the window.
cut a volume by a plane and display the cut section. The left renderer contains the original volume object, and the right renderer shows the cross section in the window.
I create two renderers that show the same 3D model. Make the camera in the right renderer linkage with the left one’s, that means we can get the same view in the right renderer when we modify the status of the camera of the left renderer.
Here is all information of implementations.
Use vtkSurfaceReconstructionFilter to get mesh from the point coordinates.
I use the advancing front surface reconstruction way to get the mesh from point cloud information.
I will show how to scale the string to follow the 3D model cone in the renderer by the following example.
Create class customIteractorStyle which inherited vtkInteractorStyleTrackballCamera
The article shows a few tips in VTK development. There are simple tasks for most developers but the functions can be used in many situations. Convert the length value in the display coordinate system to the new value in the world coordinate system. double DisplayLenToWorldLen(const double &length) { Point p0( Read more…
Let’s add three items to the render window. Draw a rectangle and pick all actors in the rectangle. The class vtkAreaPicker can help us to find these picked actors. I will show how to do it in the following code snippet. main.cpp CustomIteractorStyle.h CustomIteractorStyle.cpp But how to find the actors Read more…
I had tried to show display coordinate bounds of the 3D model in the article VTK: Show Display Bounds. But the result is not good enough because the process that transforms the world coordinate point to display the coordinate point can generate error as we rotate the camera. So I Read more…
Here is a curve in the 3D scene, the sphere represents its center. I want to find the axes of the 3D model just as vtkOBBTree, relative article: Explore The Orientation Of 3D Object. But all points on the curve are in the same plane, so neither vtkOBBTree nor vtkHull Read more…
I planed to show the 3D model’s bounds in the display coordinate and update it if the user rotates and zooms in/out in real-time. I’m curious about if the display bounds touch with the 3D model. The display bounds are shown as a red rectangle in the render window, our Read more…