Explore Interaction Of vtkAbstractWidget By vtkHandleWidget Example

vtkAbstractWidget has its mechanism to handle interactive events. Here is a simple demo indicates the differences between the responses of widget and vtkInteractorStyleTrackballCamera. Example Code: int main() { vtkSmartPointer<vtkConeSource> cone = vtkSmartPointer<vtkConeSource>::New(); cone->Update(); vtkSmartPointer<vtkPolyDataMapper> coneMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); coneMapper->SetInputData( cone->GetOutput() ); coneMapper->Update(); vtkSmartPointer<vtkActor> coneActor = vtkSmartPointer<vtkActor>::New(); coneActor->SetMapper( coneMapper ); vtkSmartPointer<vtkPointHandleRepresentation3D> handleRep Read more…

Chinese Huangdi

Huangdi, the Yellow Emperor, is a Chinese ancestor and culture hero. It’s said that he has two possible last names, Gongsun or Ji, both have the style of Chinese dynasty Zhou. According to the record, the man could speak after dozens of days of birth, he was smart, charismatic, brave Read more…

VTK – How To Show Bounding Box For A 3D Model

It’s a simple job for us to make bounding box visible in traditional VTK render window. We can SetCurrentRenderer for renderWindowInteractor->GetInteractorStyle() and press P to show it. #include <iostream> #include <vtkSmartPointer.h> #include <vtkSphereSource.h> #include <vtkActor.h> #include <vtkConeSource.h> #include <vtkRenderer.h> #include <vtkRenderWindow.h> #include <vtkPolyDataMapper.h> #include <vtkProperty.h> #include <vtkRenderWindowInteractor.h> #include <vtkLight.h> #include Read more…

Git Apply/Am Patch File

Create Patch Files Create simple Email-format files which contain commit content with git. For example, $ git format-patch -M origin/master -5 0001-remove-debug-dir.patch 0002-adjust-height.patch 0003-use-splitter-as-stackWidget-page.patch 0004-Make-gif-resize.patch 0005-add-resize-event.patch The patch file has UNIX mailbox format context which is convenient for e-mail submission or for use with git am, we can use command Read more…

VTK – Saving High-Resolution Image

The article describes method Tiled Rendering refers to VTKUsersGuide The class vtkRenderLargeImage breaks up the whole rendering into separated parts. The different pieces are handled and combined into a final large image. The interface SetMagnification of vtkRenderLargeImage control how much to larger the original image. vtkRenderLargeImage renderLarge renderLarge SetInput ren Read more…

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

X