9 |
Class that defines the streamline module. |
Class that defines the streamline module. |
10 |
""" |
""" |
11 |
|
|
12 |
def __init__(self, object, source): |
def __init__(self): |
13 |
""" |
""" |
14 |
Initialise the streamline module. |
Initialise the streamline module. |
15 |
|
""" |
16 |
|
|
17 |
|
self.__vtk_stream_line = vtk.vtkStreamLine() |
18 |
|
|
19 |
|
def _setupStreamLineModule(self, object, source): |
20 |
|
""" |
21 |
|
Setup the streamline. |
22 |
|
|
23 |
@type object: vtkUnstructuredGrid, etc |
@type object: vtkUnstructuredGrid, etc |
24 |
@param object: Input for the streamline |
@param object: Input for the streamline |
28 |
|
|
29 |
self.__object = object |
self.__object = object |
30 |
self.__source = source |
self.__source = source |
|
self.__vtk_stream_line = vtk.vtkStreamLine() |
|
|
|
|
|
self.__setupStreamLineModule() |
|
|
|
|
|
def __setupStreamLineModule(self): |
|
|
""" |
|
|
Setup the streamline. |
|
|
""" |
|
31 |
|
|
32 |
self.__setInput() |
self.__setInput() |
33 |
self.__setSource() |
self.__setSource() |
41 |
self.setIntegrationToBothDirections() |
self.setIntegrationToBothDirections() |
42 |
# Default integrator is set to vtkRungeKutta4 |
# Default integrator is set to vtkRungeKutta4 |
43 |
self.setIntegrator(vtk.vtkRungeKutta4()) |
self.setIntegrator(vtk.vtkRungeKutta4()) |
|
self.__vtk_stream_line.Update() |
|
44 |
|
|
45 |
def __setInput(self): |
def __setInput(self): |
46 |
""" |
""" |
102 |
goes) and backward (where the streamline came from). |
goes) and backward (where the streamline came from). |
103 |
""" |
""" |
104 |
|
|
105 |
self.__vtk_stream_line.SetIntegrationDirectionToIntegrateBothDirections() |
self.__vtk_stream_line.\ |
106 |
|
SetIntegrationDirectionToIntegrateBothDirections() |
107 |
|
|
108 |
def setIntegrator(self, integrator): |
def setIntegrator(self, integrator): |
109 |
""" |
""" |
130 |
|
|
131 |
self.__vtk_stream_line.SpeedScalarsOff() |
self.__vtk_stream_line.SpeedScalarsOff() |
132 |
|
|
133 |
def _getOutput(self): |
def _getStreamLineModuleOutput(self): |
134 |
""" |
""" |
135 |
Return the output of the streamline. |
Return the output of the streamline. |
136 |
|
|