9 |
Class that defines the tube wrapped around the streamlines. |
Class that defines the tube wrapped around the streamlines. |
10 |
""" |
""" |
11 |
|
|
12 |
def __init__(self, object): |
def __init__(self): |
13 |
""" |
""" |
14 |
Initialise the tube. |
Initialise the tube. |
15 |
""" |
""" |
16 |
|
|
|
self.__object = object |
|
17 |
self.__vtk_tube = vtk.vtkTubeFilter() |
self.__vtk_tube = vtk.vtkTubeFilter() |
18 |
|
|
19 |
self.__setupTube() |
def _setupTube(self, object): |
|
|
|
|
def __setupTube(self): |
|
20 |
""" |
""" |
21 |
Setup the tube. |
Setup the tube. |
22 |
|
|
23 |
|
@type object: vtkPolyData, etc |
24 |
|
@param object: Input for the tube |
25 |
""" |
""" |
26 |
|
|
27 |
|
self.__object = object |
28 |
|
|
29 |
self.__setInput() |
self.__setInput() |
30 |
# Default radius of the tube is 0.02. |
# Default radius of the tube is 0.02. |
31 |
self.setTubeRadius(0.02) |
self.setTubeRadius(0.02) |
32 |
# Default number of sides for the tube is 12. |
# Default number of sides for the tube is 12. |
33 |
self.setTubeNumberOfSides(12) |
self.setTubeNumberOfSides(12) |
34 |
self.setTubeRadiusToVaryByVector() |
self.setTubeRadiusToVaryByVector() |
|
self.__vtk_tube.Update() |
|
35 |
|
|
36 |
def __setInput(self): |
def __setInput(self): |
37 |
""" |
""" |
75 |
|
|
76 |
self.__vtk_tube.SetVaryRadiusToVaryRadiusByScalar() |
self.__vtk_tube.SetVaryRadiusToVaryRadiusByScalar() |
77 |
|
|
78 |
def _getOutput(self): |
def _getTubeOutput(self): |
79 |
""" |
""" |
80 |
Return the output of the tube. |
Return the output of the tube. |
81 |
|
|