All functions prefixed with "RT" shall be called only from render thread.
31 vtkSmartPointer<vtkStructuredGridGeometryFilter>geometry =
32 vtkSmartPointer<vtkStructuredGridGeometryFilter>::New();
33 geometry->SetInputDataObject(
gridfunc);
38 warp->SetInputConnection(geometry->GetOutputPort());
42 vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
44 mapper->SetInputConnection(
warp->GetOutputPort());
46 mapper->SetInputConnection(geometry->GetOutputPort());
50 vtkSmartPointer<vtkActor> surfplot = vtkSmartPointer<vtkActor>::New();
51 surfplot->SetMapper(mapper);
52 mapper->SetLookupTable(
lut);
53 mapper->UseLookupTableScalarRangeOn();
57 vtkSmartPointer<vtkOutlineFilter> outlinefilter = vtkSmartPointer<vtkOutlineFilter>::New();
59 outlinefilter->SetInputConnection(
warp->GetOutputPort());
61 outlinefilter->SetInputConnection(geometry->GetOutputPort());
63 vtkSmartPointer<vtkPolyDataMapper>outlineMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
64 outlineMapper->SetInputConnection(outlinefilter->GetOutputPort());
65 vtkSmartPointer<vtkActor>
outline = vtkSmartPointer<vtkActor>::New();
66 outline->SetMapper(outlineMapper);
67 outline->GetProperty()->SetColor(0, 0, 0);
70 vtkSmartPointer<vtkAxesActor>
axes = vtkSmartPointer<vtkAxesActor>::New();
71 axes->SetShaftTypeToCylinder();
72 axes->SetNormalizedShaftLength( 0.85, 0.85, 0.85);
73 axes->SetNormalizedTipLength( 0.15, 0.15, 0.15);
74 axes->SetCylinderRadius( 0.500 * axes->GetCylinderRadius() );
75 axes->SetConeRadius( 1.025 * axes->GetConeRadius() );
76 axes->SetSphereRadius( 1.500 * axes->GetSphereRadius() );
77 vtkSmartPointer<vtkTextProperty> text_prop_ax = axes->GetXAxisCaptionActor2D()->
78 GetCaptionTextProperty();
79 text_prop_ax->SetColor(0.0, 0.0, 0.0);
80 text_prop_ax->SetFontFamilyToArial();
81 text_prop_ax->SetFontSize(8);
82 axes->GetYAxisCaptionActor2D()->SetCaptionTextProperty(text_prop_ax);
83 axes->GetZAxisCaptionActor2D()->SetCaptionTextProperty(text_prop_ax);
vtkSmartPointer< vtkWarpScalar > warp
vtkSmartPointer< vtkStructuredGrid > gridfunc
vtkSmartPointer< vtkLookupTable > lut
vtkSmartPointer< vtkScalarBarActor > BuildColorBar(vtkSmartPointer< vtkPolyDataMapper > mapper, int irank=0)