56 |
self.__addRenderer() |
self.__addRenderer() |
57 |
self.setBackground(Color.WHITE) # Default background color is white. |
self.setBackground(Color.WHITE) # Default background color is white. |
58 |
|
|
59 |
|
|
60 |
# Default title bar. |
# Default title bar. |
61 |
self.setTitleBar("Earth Systems Science Computational Centre (ESSCC)") |
self.setTitleBar("Earth Systems Science Computational Centre (ESSCC)") |
62 |
self.__setSize(self.__x_size, self.__y_size) |
self.__setSize(self.__x_size, self.__y_size) |
168 |
""" |
""" |
169 |
Enables the offline rendering (no window comes up). |
Enables the offline rendering (no window comes up). |
170 |
""" |
""" |
|
|
|
171 |
# Enables the offscreen rendering. |
# Enables the offscreen rendering. |
172 |
self.__vtk_render_window.OffScreenRenderingOn() |
self.__vtk_render_window.OffScreenRenderingOn() |
173 |
|
|
176 |
Setup the window to image filter to convert the output from the render |
Setup the window to image filter to convert the output from the render |
177 |
window into an image. |
window into an image. |
178 |
""" |
""" |
|
|
|
179 |
self.__vtk_window_to_image = vtk.vtkWindowToImageFilter() |
self.__vtk_window_to_image = vtk.vtkWindowToImageFilter() |
180 |
self.__vtk_window_to_image.SetInput(self.__vtk_render_window) |
self.__vtk_window_to_image.SetInput(self.__vtk_render_window) |
181 |
self.__vtk_image_writer = self.__getImageWriter() |
self.__vtk_image_writer = self.__getImageWriter() |
235 |
""" |
""" |
236 |
Render the object using either the online, offline or display mode. |
Render the object using either the online, offline or display mode. |
237 |
""" |
""" |
|
|
|
238 |
for i in range(0, len(self.__visualization_modules)): |
for i in range(0, len(self.__visualization_modules)): |
239 |
#self.__visualization_modules[i]._render() |
#self.__visualization_modules[i]._render() |
240 |
self.__visualization_modules[i]._render(self) |
self.__visualization_modules[i]._render(self) |