Configure TBB – VTK Environment For Mac

Development environment: VTK-8.1.1 macOS Catalina 10.15 Python 2.7.10 Configure variables about Qt in CMake GUi fristly. Some details are in the following script file configure.sh. cmake ./ -G “Unix Makefiles” \ -DVTK_USE_QVTK:BOOL=ON \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DVTK_USE_GUISUPPORT:BOOL=ON \ -DVTK_QT_VERSION=5 \ -DModule_vtkGUISupportQt:BOOL=ON \ -DModule_vtkGUISupportQtOpenGL:BOOL=ON \ -DModule_vtkGUISupportQtSQL:BOOL=ON \ -DModule_vtkGUISupportQtWebkit:BOOL=OFF \ -DModule_vtkRenderingQt:BOOL=ON \ -DModule_vtkViewsQt:BOOL=ON Read more…

Create And Export Curve

I write a small project to create a curve that can be changed and export. The class vtkContourWidget is used to re-construct the curve, vtkXMLPolyDataWriter object helps us to store the polydata. All details for the project had been pushed to GitHub, link: CreateCurve If you fork the repository and Read more…

Store Polydata By vtkXMLPolyDataWriter

Store Polydata Some Special polydata can’t be stored by vtkSTLWriter. The following polydata contains points and a line in its structure, it can’t be saved by vtkSTLWriter, but vtkXMLPolyDataWriter works. vtkObject::GlobalWarningDisplayOn(); int numPts = 10; vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New(); int offset = numPts / 4; for (int i = 0; Read more…

What Does The vtkImageData Looks Like

What does the vtkImageData look like? It has a multi-layered point set. In the following example, I show all points in a vtkImageData object in the left reader and its polydata in the right render. #define vtkSPtr vtkSmartPointer #define vtkSPtrNew(Var, Type) vtkSPtr<Type> Var = vtkSPtr<Type>::New(); unsigned char inval = 255; Read more…

Why Concatenate User Transform When Scale Object

I write the reason why concatenate transform and its inversed transform for offTrans in scale operation based on the article Rotate, Translate And Scale For Camera vtkSPtrNew( scaleTrans, vtkTransform ); scaleTrans->Scale( factor, factor, 1 ); scaleTrans->Update(); vtkSPtrNew( offTrans, vtkTransform ); offTrans->Concatenate( worldTrans ); offTrans->Concatenate( scaleTrans ); offTrans->Concatenate( worldInversedTrans ); offTrans->Update(); Read more…

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 <vtkImageProperty.h> #include <vtkSphereSource.h> #define vSP vtkSmartPointer #define vSPNew(Var, Type) vSP<Type> Read more…

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

X