21 |
""" |
""" |
22 |
|
|
23 |
Common.__init__(self, scene, data_collector) |
Common.__init__(self, scene, data_collector) |
24 |
self.vtk_contour = None |
self.vtk_contour = vtk.vtkContourFilter() |
25 |
self.setContour() |
self.setContour() |
26 |
|
|
27 |
Common.setMapper(self, "self.vtk_contour.GetOutput()", lut) |
Common.setMapperInput(self, self.vtk_contour.GetOutput(), lut) |
28 |
Common.setActor(self) |
Common.setActorInput(self) |
29 |
Common.addActor(self) |
Common.addActor(self) |
30 |
|
|
31 |
def setContour(self): |
def setContour(self): |
33 |
Set up the contour and its input. |
Set up the contour and its input. |
34 |
""" |
""" |
35 |
|
|
|
self.vtk_contour = vtk.vtkContourFilter() |
|
36 |
self.vtk_contour.SetInput(self.data_collector.getReader().GetOutput()) |
self.vtk_contour.SetInput(self.data_collector.getReader().GetOutput()) |
37 |
|
|
38 |
def setValue(self, contour_number, value): |
def setValue(self, contour_number, value): |
62 |
self.vtk_contour.GenerateValues(number_contours, min_range, max_range) |
self.vtk_contour.GenerateValues(number_contours, min_range, max_range) |
63 |
|
|
64 |
from contour import Contour |
from contour import Contour |
65 |
from geo import Plane |
from plane import Plane |
66 |
|
|
67 |
class ContourOnPlane(Contour, Plane): |
class ContourOnPlane(Contour, Plane): |
68 |
""" |
""" |
78 |
@param data_collector: Source of data for visualization |
@param data_collector: Source of data for visualization |
79 |
""" |
""" |
80 |
|
|
81 |
Common.__init__(self, scene, data_collector) |
self.data_collector = data_collector |
82 |
self.setContour() |
self.vtk_contour = vtk.vtkContourFilter() |
83 |
|
Contour.setContour(self) |
84 |
|
|
85 |
Plane.__init__(self, scene, data_collector, |
Plane.__init__(self, scene, data_collector, |
86 |
"self.vtk_contour.GetOutput()") |
self.vtk_contour.GetOutput(), lut) |