void ReadandShowVTKFile ()
{
vtkSmartPointer<vtkRenderer > aRenderer =
vtkSmartPointer<vtkRenderer >::New();
vtkSmartPointer<vtkRenderWindow > renWin =
vtkSmartPointer<vtkRenderWindow >::New();
renWin->AddRenderer (aRenderer);
vtkSmartPointer<vtkRenderWindowInteractor > iren =
vtkSmartPointer<vtkRenderWindowInteractor >::New();
iren->SetRenderWindow (renWin);
vtkSmartPointer<vtkPolyDataReader > vtkReader = vtkSmartPointer<vtkPolyDataReader >::New();
vtkReader->SetFileName ("polyline.vtk");
vtkSmartPointer<vtkPolyDataMapper > skinMapper = vtkSmartPointer<vtkPolyDataMapper >::New();
skinMapper->SetInputConnection (vtkReader-> GetOutputPort());
skinMapper->ScalarVisibilityOff ();
vtkSmartPointer<vtkActor > skin =
vtkSmartPointer<vtkActor >::New();
skin->SetMapper (skinMapper);
vtkSmartPointer<vtkCamera > aCamera =
vtkSmartPointer<vtkCamera >::New();
aCamera->SetViewUp (, , -);
aCamera->SetPosition (, , );
aCamera->SetFocalPoint (, , );
aCamera->ComputeViewPlaneNormal ();
aCamera->Azimuth (30.0);
aCamera->Elevation (30.0);
aCamera->Dolly (1.5);
aRenderer->AddActor (skin);
aRenderer->SetActiveCamera (aCamera);
aRenderer->ResetCamera ();
aRenderer->SetBackground (., ., .);
aRenderer->ResetCameraClippingRange ();
renWin->Render ();
iren->Initialize ();
iren->Start ();
}