/[escript]/trunk/pyvisi/py_src/mask.py
ViewVC logotype

Annotation of /trunk/pyvisi/py_src/mask.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1053 - (hide annotations)
Thu Mar 22 01:14:43 2007 UTC (15 years, 5 months ago) by jongui
File MIME type: text/x-python
File size: 596 byte(s)
Removed the use of StructuredPointsProbe and replaced it with MaskPoints in the Velocity module. StructuredPointsProbe does NOT work well in all instances.
1 jongui 1053 """
2     @author: John NGUI
3     """
4    
5     import vtk
6    
7     class MaskPoints:
8    
9     def __init__(self, object):
10     self.__object = object
11     self.__vtk_mask_points = vtk.vtkMaskPoints
12    
13     self.__setupMaskPoints()
14    
15     def __setupMaskPoints(self):
16     self.__setInput()
17     self.randomOn()
18    
19     def __setInput(self):
20     self.__vtk_mask_points.SetInput(self.__object)
21    
22     def setRatio(self, ratio):
23     self.__vtk_mask_points.SetOnRation(ratio)
24    
25     def randomOn(self):
26     self.__vtk_mask_points.RandomModeOn()
27    
28     def randomOff(self):
29     self.__vtk_mask_points.RandomModeOff()
30    
31     def _getOutput(self):
32     return self.__vtk_mask_points.GetOutput()

  ViewVC Help
Powered by ViewVC 1.1.26