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

Diff of /trunk/pyvisi/py_src/datacollector.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 977 by gross, Thu Feb 15 23:57:02 2007 UTC revision 978 by jongui, Fri Feb 16 07:02:18 2007 UTC
# Line 50  class DataCollector: Line 50  class DataCollector:
50          """          """
51                  if self.__source == Source.XML:                  if self.__source == Source.XML:
52             self.__vtk_xml_reader.SetFileName(file_name)             self.__vtk_xml_reader.SetFileName(file_name)
            self.__output = self.__vtk_xml_reader.GetOutput()  
53    
54             # NOTE: Update must be called after SetFileName to make the reader             # NOTE: Update must be called after SetFileName to make the reader
55             # up to date. Otherwise, some output values may be incorrect.             # up to date. Otherwise, some output values may be incorrect.
56             self.__vtk_xml_reader.Update()             self.__vtk_xml_reader.Update()
57               self.__output = self.__vtk_xml_reader.GetOutput()
58                  else:                  else:
59                     raise ValueError("source type %s does not support setFileName"%self.__source)                     raise ValueError("source type %s does not support setFileName"%self.__source)
60    
# Line 107  class DataCollector: Line 107  class DataCollector:
107          @return: Scalar range          @return: Scalar range
108          """          """
109            
         #self._getOutput().GetPointData().SetActiveScalars("temp")  
110          return self._getOutput().GetPointData().GetScalars().GetRange(-1)          return self._getOutput().GetPointData().GetScalars().GetRange(-1)
111    
112      def _getVectorRange(self):      def _getVectorRange(self):
# Line 137  class DataCollector: Line 136  class DataCollector:
136          @return: Tensor range          @return: Tensor range
137          """          """
138    
139          return self._getOutput().GetPointData().GetTensors().GetRange()          return self._getOutput().GetPointData().GetTensors().GetRange(-1)
140    
141      def _getOutput(self):      def _getOutput(self):
142          """          """

Legend:
Removed from v.977  
changed lines
  Added in v.978

  ViewVC Help
Powered by ViewVC 1.1.26