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

Method start

Web/Python/vtkmodules/web/dataset_builder.py:80–114  ·  view source on GitHub ↗
(self, renderWindow=None, renderer=None)

Source from the content-addressed store, hash-verified

78 self.renderWindow.Render()
79
80 def start(self, renderWindow=None, renderer=None):
81 if renderWindow:
82 # Keep track of renderWindow and renderer
83 self.renderWindow = renderWindow
84 self.renderer = renderer
85
86 # Initialize image capture
87 self.imageCapture.SetRenderWindow(renderWindow)
88
89 # Handle camera if any
90 if self.cameraDescription:
91 if self.cameraDescription["type"] == "spherical":
92 self.camera = create_spherical_camera(
93 renderer,
94 self.dataHandler,
95 self.cameraDescription["phi"],
96 self.cameraDescription["theta"],
97 )
98 elif self.cameraDescription["type"] == "cylindrical":
99 self.camera = create_cylindrical_camera(
100 renderer,
101 self.dataHandler,
102 self.cameraDescription["phi"],
103 self.cameraDescription["translation"],
104 )
105
106 # Update background color
107 bgColor = renderer.GetBackground()
108 bgColorString = "rgb(%d, %d, %d)" % tuple(
109 int(bgColor[i] * 255) for i in range(3)
110 )
111 self.dataHandler.addMetaData("backgroundColor", bgColorString)
112
113 # Update file patterns
114 self.dataHandler.updateBasePattern()
115
116 def stop(self):
117 self.dataHandler.writeDataDescriptor()

Callers 15

LookupMethod · 0.45
GetSanitizedBlockNameFunction · 0.45
GenerateSimpleLabelMethod · 0.45
InternalCreateTimerMethod · 0.45
OffscreenMethod · 0.45
_start_test_threadFunction · 0.45
startMethod · 0.45
startMethod · 0.45
mainFunction · 0.45
deep_equalMethod · 0.45
reindentFunction · 0.45
ExtractWordsFromStringFunction · 0.45

Calls 6

create_spherical_cameraFunction · 0.90
addMetaDataMethod · 0.80
updateBasePatternMethod · 0.80
rangeClass · 0.50
SetRenderWindowMethod · 0.45

Tested by 4

OffscreenMethod · 0.36
_start_test_threadFunction · 0.36
testThreadedSpeedMethod · 0.36
mainMethod · 0.36