1 |
""" |
2 |
@author: John NGUI |
3 |
""" |
4 |
|
5 |
import vtk |
6 |
|
7 |
class Outline: |
8 |
""" |
9 |
Class that defines an outline. |
10 |
""" |
11 |
|
12 |
def __init__(self, object): |
13 |
""" |
14 |
Initialise the outline. |
15 |
|
16 |
@type object: vtkDataSet (i.e. vtkUnstructuredGrid, vtkPolyData, etc) |
17 |
@param object: Data source to outline |
18 |
""" |
19 |
|
20 |
self.__object = object |
21 |
self.__vtk_outline = vtk.vtkOutlineFilter() |
22 |
self.__setupOutline() |
23 |
|
24 |
def __setupOutline(self): |
25 |
""" |
26 |
Setup the outline. |
27 |
""" |
28 |
|
29 |
self.__vtk_outline.SetInput(self.__object) |
30 |
self.__output = self.__vtk_outline.GetOutput() |
31 |
|
32 |
|
33 |
def _getOutput(self): |
34 |
""" |
35 |
Return the output of the outline. |
36 |
|
37 |
@rtype: vtkPolyData |
38 |
@return: Polyognal data |
39 |
""" |
40 |
|
41 |
return self.__output |
42 |
|