MCPcopy Create free account
hub / github.com/Kitware/VTK / run

Method run

Wrapping/Java/vtk/sample/rendering/AwtConeRendering.java:30–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 public static void main(String[] args) {
29 SwingUtilities.invokeLater(new Runnable() {
30 public void run() {
31 // build VTK Pipeline
32 vtkConeSource cone = new vtkConeSource();
33 cone.SetResolution(8);
34
35 vtkPolyDataMapper coneMapper = new vtkPolyDataMapper();
36 coneMapper.SetInputConnection(cone.GetOutputPort());
37
38 vtkActor coneActor = new vtkActor();
39 coneActor.SetMapper(coneMapper);
40
41 // VTK rendering part
42 vtkAwtComponent awtWidget = new vtkAwtComponent();
43 awtWidget.getRenderer().AddActor(coneActor);
44
45 // UI part
46 JFrame frame = new JFrame("SimpleVTK");
47 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
48 frame.getContentPane().setLayout(new BorderLayout());
49 frame.getContentPane().add(awtWidget.getComponent(),
50 BorderLayout.CENTER);
51 frame.setSize(400, 400);
52 frame.setLocationRelativeTo(null);
53 frame.setVisible(true);
54 }
55 });
56 }
57}

Callers

nothing calls this directly

Calls 9

getComponentMethod · 0.95
getRendererMethod · 0.65
setSizeMethod · 0.65
SetResolutionMethod · 0.45
SetInputConnectionMethod · 0.45
GetOutputPortMethod · 0.45
SetMapperMethod · 0.45
AddActorMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected