Show Image By vtkActor2D

I want to show png picture by vtkActor2D rather than vtkImageActor or vtkImageViewer. There is not rotating and scaling for the picture when move mouse and click if the vtkActor2D object works. But how to do it? The following project shows axes and a png picture in the window, the Read more…

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…

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

X