Back to index

salome-paravis  6.5.0
Public Member Functions | Public Attributes | Properties
paravisSM.FieldDataInformation Class Reference

List of all members.

Public Member Functions

def __init__
def GetFieldData
def GetNumberOfArrays
def GetArray
def __len__
def __getitem__
def keys
def values
def iteritems
def items
def has_key
def __iter__
def __getattr__

Public Attributes

 Proxy
 OutputPort
 FieldData

Properties

 NumberOfArrays = property(GetNumberOfArrays, None, None, "Returns the number of arrays.")

Detailed Description

Meta-data for a field of an output object (point data, cell data etc...).
Provides easy access to the arrays using the slice interface:
> narrays = len(field_info)
> for i in range(narrays):
>   array_info = field_info[i]

Full slice interface is supported:
> arrays = field_info[0:5:3]
where arrays is a list.

Array access by name is also possible:
> array_info = field_info['Temperature']

The number of arrays can also be accessed using the NumberOfArrays
property.

Definition at line 1353 of file paravisSM.py.


Constructor & Destructor Documentation

def paravisSM.FieldDataInformation.__init__ (   self,
  proxy,
  idx,
  field 
)

Definition at line 1370 of file paravisSM.py.

01370 
01371     def __init__(self, proxy, idx, field):
01372         self.Proxy = proxy
01373         self.OutputPort = idx
01374         self.FieldData = field


Member Function Documentation

def paravisSM.FieldDataInformation.__getattr__ (   self,
  name 
)
Forwards unknown attributes to the underlying
vtkPVDataSetAttributesInformation

Definition at line 1450 of file paravisSM.py.

01450 
01451     def __getattr__(self, name):
01452         """Forwards unknown attributes to the underlying
01453         vtkPVDataSetAttributesInformation"""
01454         array = self.GetArray(name)
01455         if array: return array
01456         raise AttributeError("class has no attribute %s" % name)
01457         return None

Here is the call graph for this function:

def paravisSM.FieldDataInformation.__getitem__ (   self,
  idx 
)
Implements the [] operator. Accepts an array name.

Definition at line 1401 of file paravisSM.py.

01401 
01402     def __getitem__(self, idx):
01403         """Implements the [] operator. Accepts an array name."""
01404         if isinstance(idx, slice):
01405             indices = idx.indices(self.GetNumberOfArrays())
01406             retVal = []
01407             for i in range(*indices):
01408                 retVal.append(self.GetArray(i))
01409             return retVal
01410         return self.GetArray(idx)

Here is the call graph for this function:

Implementation of the dictionary API

Definition at line 1446 of file paravisSM.py.

01446 
01447     def __iter__(self):
01448         """Implementation of the dictionary API"""
01449         return FieldDataInformationIterator(self)

Here is the caller graph for this function:

Returns the number of arrays.

Definition at line 1397 of file paravisSM.py.

01397 
01398     def __len__(self):
01399         """Returns the number of arrays."""
01400         return self.GetNumberOfArrays()

Here is the call graph for this function:

def paravisSM.FieldDataInformation.GetArray (   self,
  idx 
)
Given an index or a string, returns an array information.
Raises IndexError if the index is out of bounds.

Definition at line 1385 of file paravisSM.py.

01385 
01386     def GetArray(self, idx):
01387         """Given an index or a string, returns an array information.
01388         Raises IndexError if the index is out of bounds."""
01389         self.Proxy.UpdatePipeline()
01390         if not self.GetFieldData().GetArrayInformation(idx):
01391             return None
01392         if isinstance(idx, str):
01393             return ArrayInformation(self.Proxy, self, idx)
01394         elif idx >= len(self) or idx < 0:
01395             raise IndexError
01396         return ArrayInformation(self.Proxy, self, self.GetFieldData().GetArrayInformation(idx).GetName())

Here is the call graph for this function:

Here is the caller graph for this function:

Convenience method to get the underlying
vtkPVDataSetAttributesInformation

Definition at line 1375 of file paravisSM.py.

01375 
01376     def GetFieldData(self):
01377         """Convenience method to get the underlying
01378         vtkPVDataSetAttributesInformation"""
01379         return getattr(self.Proxy.GetDataInformation(self.OutputPort), "Get%sInformation" % self.FieldData)()

Here is the caller graph for this function:

Returns the number of arrays.

Definition at line 1380 of file paravisSM.py.

01380 
01381     def GetNumberOfArrays(self):
01382         """Returns the number of arrays."""
01383         self.Proxy.UpdatePipeline()
01384         return self.GetFieldData().GetNumberOfArrays()

Here is the call graph for this function:

Here is the caller graph for this function:

def paravisSM.FieldDataInformation.has_key (   self,
  key 
)
Implementation of the dictionary API

Definition at line 1440 of file paravisSM.py.

01440 
01441     def has_key(self, key):
01442         """Implementation of the dictionary API"""
01443         if self.GetArray(key):
01444             return True
01445         return False

Here is the call graph for this function:

Implementation of the dictionary API

Definition at line 1431 of file paravisSM.py.

01431 
01432     def items(self):
01433         """Implementation of the dictionary API"""
01434         itms = []
01435         narrays = self.GetNumberOfArrays()
01436         for i in range(narrays):
01437             ai = self.GetArray(i)
01438             itms.append((ai.GetName(), ai))
01439         return itms

Here is the call graph for this function:

Implementation of the dictionary API

Definition at line 1427 of file paravisSM.py.

01427 
01428     def iteritems(self):
01429         """Implementation of the dictionary API"""
01430         return FieldDataInformationIterator(self, True)

Implementation of the dictionary API

Definition at line 1411 of file paravisSM.py.

01411 
01412     def keys(self):
01413         """Implementation of the dictionary API"""
01414         kys = []
01415         narrays = self.GetNumberOfArrays()
01416         for i in range(narrays):
01417             kys.append(self.GetArray(i).GetName())
01418         return kys

Here is the call graph for this function:

Implementation of the dictionary API

Definition at line 1419 of file paravisSM.py.

01419 
01420     def values(self):
01421         """Implementation of the dictionary API"""
01422         vals = []
01423         narrays = self.GetNumberOfArrays()
01424         for i in range(narrays):
01425             vals.append(self.GetArray(i))
01426         return vals

Here is the call graph for this function:


Member Data Documentation

Definition at line 1373 of file paravisSM.py.

Definition at line 1372 of file paravisSM.py.

Definition at line 1371 of file paravisSM.py.


Property Documentation

paravisSM.FieldDataInformation.NumberOfArrays = property(GetNumberOfArrays, None, None, "Returns the number of arrays.") [static]

Definition at line 1458 of file paravisSM.py.


The documentation for this class was generated from the following file: