Section: Visualization Toolkit Filtering Classes
To create an instance of class vtkGenericAttributeCollection, simply invoke its constructor as follows
obj = vtkGenericAttributeCollection
obj
is an instance of the vtkGenericAttributeCollection class.
string = obj.GetClassName ()
- Standard type definition and print methods for a VTK class.
int = obj.IsA (string name)
- Standard type definition and print methods for a VTK class.
vtkGenericAttributeCollection = obj.NewInstance ()
- Standard type definition and print methods for a VTK class.
vtkGenericAttributeCollection = obj.SafeDownCast (vtkObject o)
- Standard type definition and print methods for a VTK class.
int = obj.GetNumberOfAttributes ()
- Return the number of attributes (e.g., instances of vtkGenericAttribute)
in the collection.
\post positive_result: result>=0
int = obj.GetNumberOfComponents ()
- Return the number of components. This is the sum of all components
found in all attributes.
\post positive_result: result>=0
int = obj.GetNumberOfPointCenteredComponents ()
- Return the number of components. This is the sum of all components
found in all point centered attributes.
\post positive_result: result>=0
int = obj.GetMaxNumberOfComponents ()
- Maximum number of components encountered among all attributes.
\post positive_result: result>=0
\post valid_result: result<=GetNumberOfComponents()
long = obj.GetActualMemorySize ()
- Actual size of the data in kilobytes; only valid after the pipeline has
updated. It is guaranteed to be greater than or equal to the memory
required to represent the data.
int = obj.IsEmpty ()
- Indicate whether the collection contains any attributes.
\post definition: result==(GetNumberOfAttributes()==0)
vtkGenericAttribute = obj.GetAttribute (int i)
- Return a pointer to the ith instance of vtkGenericAttribute.
\pre not_empty: !IsEmpty()
\pre valid_i: i>=0 && i<GetNumberOfAttributes()
\post result_exists: result!=0
int = obj.FindAttribute (string name)
- Return the index of the attribute named `name'. Return the non-negative
index if found. Return -1 otherwise.
\pre name_exists: name!=0
\post valid_result: (result==-1) || (result>=0) && (result<=GetNumberOfAttributes())
int = obj.GetAttributeIndex (int i)
- Return the index of the first component of attribute `i' in an array of
format attrib0comp0 attrib0comp1 ... attrib4comp0 ...
\pre valid_i: i>=0 && i<GetNumberOfAttributes()
\pre is_point_centered: GetAttribute(i)->GetCentering()==vtkPointCentered
obj.InsertNextAttribute (vtkGenericAttribute a)
- Add the attribute `a' to the end of the collection.
\pre a_exists: a!=0
\post more_items: GetNumberOfAttributes()==old GetNumberOfAttributes()+1
\post a_is_set: GetAttribute(GetNumberOfAttributes()-1)==a
obj.InsertAttribute (int i, vtkGenericAttribute a)
- Replace the attribute at index `i' by `a'.
\pre not_empty: !IsEmpty()
\pre a_exists: a!=0
\pre valid_i: i>=0 && i<GetNumberOfAttributes()
\post same_size: GetNumberOfAttributes()==old GetNumberOfAttributes()
\post item_is_set: GetAttribute(i)==a
obj.RemoveAttribute (int i)
- Remove the attribute at `i'.
\pre not_empty: !IsEmpty()
\pre valid_i: i>=0 && i<GetNumberOfAttributes()
\post fewer_items: GetNumberOfAttributes()==old GetNumberOfAttributes()-1
obj.Reset ()
- Remove all attributes.
\post is_empty: GetNumberOfAttributes()==0
obj.DeepCopy (vtkGenericAttributeCollection other)
- Copy, without reference counting, the other attribute array.
\pre other_exists: other!=0
\pre not_self: other!=this
\post same_size: GetNumberOfAttributes()==other->GetNumberOfAttributes()
obj.ShallowCopy (vtkGenericAttributeCollection other)
- Copy, via reference counting, the other attribute array.
\pre other_exists: other!=0
\pre not_self: other!=this
\post same_size: GetNumberOfAttributes()==other->GetNumberOfAttributes()
long = obj.GetMTime ()
- vtkAttributeCollection is a composite object and needs to check each
member of its collection for modified time.
int = obj.GetActiveAttribute ()
- Index of the attribute to be processed (not necessarily scalar).
\pre not_empty: !IsEmpty()
\post valid_result: result>=0 && result<GetNumberOfAttributes()
int = obj.GetActiveComponent ()
- Component of the active attribute to be processed. -1 means module.
\pre not_empty: GetNumberOfAttributes()>0
\post valid_result: result>=-1 &&
result<GetAttribute(GetActiveAttribute())->GetNumberOfComponents()
obj.SetActiveAttribute (int attribute, int component)
- Set the scalar attribute to be processed. -1 means module.
\pre not_empty: !IsEmpty()
\pre valid_attribute: attribute>=0 && attribute<GetNumberOfAttributes()
\pre valid_component: component>=-1 &&
component<GetAttribute(attribute)->GetNumberOfComponents()
\post is_set: GetActiveAttribute()==attribute &&
GetActiveComponent()==component
int = obj.GetNumberOfAttributesToInterpolate ()
- Number of attributes to interpolate.
\pre not_empty: !IsEmpty()
\post positive_result: result>=0
int = obj.HasAttribute (int size, int attributes, int attribute)
obj.SetAttributesToInterpolate (int size, int attributes)
- Set the attributes to interpolate.
\pre not_empty: !IsEmpty()
\pre positive_size: size>=0
\pre valid_attributes: size>0 implies attributes!=0
\pre valid_attributes_contents: attributes!=0 implies
!HasAttributes(size,attributes,GetActiveAttribute())
\post is_set: (GetNumberOfAttributesToInterpolate()==size)&&
(GetAttributesToInterpolate()==attributes)
obj.SetAttributesToInterpolateToAll ()
- Set the attributes to interpolate.
\pre not_empty: !IsEmpty()
\pre positive_size: size>=0
\pre valid_attributes: size>0 implies attributes!=0
\pre valid_attributes_contents: attributes!=0 implies
!HasAttributes(size,attributes,GetActiveAttribute())
\post is_set: (GetNumberOfAttributesToInterpolate()==size)&&
(GetAttributesToInterpolate()==attributes)