Polydata And Image Converter

convert polydata to image data #include <vtkVersion.h> #include <vtkImageData.h> #include <vtkImageMapper3D.h> #include <vtkImageStencil.h> #include <vtkImageStencilData.h> #include <vtkImageToImageStencil.h> #include <vtkJPEGReader.h> #include <vtkPointData.h> #include <vtkSmartPointer.h> #include <vtkRenderWindow.h> #include <vtkRenderWindowInteractor.h> #include <vtkInteractorStyleImage.h> #include <vtkRenderer.h> #include <vtkImageActor.h> #include <vtkPolyDataToImageStencil.h> #include <vtkPolyData.h> #include <vtkSTLReader.h> #include Read more…

Explore Scale A Plane And Keep Position

The article shows a way to enlarge a plane and keep its original position, scale it and translate it back. #include <iostream> #include <vtkSmartPointer.h> #include <vtkProperty.h> #include <vtkPolyData.h> #include <vtkTriangleFilter.h> #include <vtkRegularPolygonSource.h> #include <vtkPolyDataMapper.h> #include <vtkActor.h> #include <vtkRenderWindow.h> #include <vtkRenderer.h> Read more…

Explore How To Rotate Object And Keep It Facing Camera

The following code comes from vtkFollower, we used it to make the original axes always face the camera. #include <iostream> #include <vtkSmartPointer.h> #include <vtkProperty.h> #include <vtkPolyData.h> #include <vtkTriangleFilter.h> #include <vtkRegularPolygonSource.h> #include <vtkPolyDataMapper.h> #include <vtkActor.h> #include <vtkRenderWindow.h> #include <vtkRenderer.h> #include <vtkRenderWindowInteractor.h> Read more…

Explore The Orientation Of 3D Object

The algorithm vtkOBBTree::ComputeOBB can help us to calculate the three axes defining the orientation of the OBB(oriented bounding box). It is very useful for us to get the model’s spatial features. #include <iostream> #include <vtkSmartPointer.h> #include <vtkSphereSource.h> #include <vtkActor.h> #include Read more…

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X