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

Method SimpleVTK

Wrapping/Java/vtk/sample/SimpleVTK.java:41–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39
40 // -----------------------------------------------------------------
41 public SimpleVTK() {
42 super(new BorderLayout());
43
44 // build VTK Pipeline
45 vtkConeSource cone = new vtkConeSource();
46 cone.SetResolution(8);
47
48 vtkPolyDataMapper coneMapper = new vtkPolyDataMapper();
49 coneMapper.SetInputConnection(cone.GetOutputPort());
50
51 vtkActor coneActor = new vtkActor();
52 coneActor.SetMapper(coneMapper);
53
54 renWin = new vtkPanel();
55 renWin.GetRenderer().AddActor(coneActor);
56
57 // Add Java UI components
58 exitButton = new JButton("Exit");
59 exitButton.addActionListener(this);
60
61 add(renWin, BorderLayout.CENTER);
62 add(exitButton, BorderLayout.SOUTH);
63 }
64
65 /** An ActionListener that listens to the button. */
66 public void actionPerformed(ActionEvent e) {

Callers

nothing calls this directly

Calls 7

SetResolutionMethod · 0.45
SetInputConnectionMethod · 0.45
GetOutputPortMethod · 0.45
SetMapperMethod · 0.45
AddActorMethod · 0.45
GetRendererMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected