FreeMat: vtkCompositeDataIterator

FreeMat

- Main Page
- Related Pages

vtkCompositeDataIterator

Section: Visualization Toolkit Filtering Classes

# Usage

vtkCompositeDataIterator provides an interface for accessing datasets in a collection (vtkCompositeDataIterator).

To create an instance of class vtkCompositeDataIterator, simply invoke its constructor as follows

      obj = vtkCompositeDataIterator

# Methods

The class vtkCompositeDataIterator has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkCompositeDataIterator class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkCompositeDataIterator = obj.NewInstance ()`
- `vtkCompositeDataIterator = obj.SafeDownCast (vtkObject o)`
- `obj.SetDataSet (vtkCompositeDataSet ds)` - Set the composite dataset this iterator is iterating over. Must be set before traversal begins.
- `vtkCompositeDataSet = obj.GetDataSet ()` - Set the composite dataset this iterator is iterating over. Must be set before traversal begins.
- `obj.InitTraversal ()` - Begin iterating over the composite dataset structure.
- `obj.InitReverseTraversal ()` - Begin iterating over the composite dataset structure in reverse order.
- `obj.GoToFirstItem ()` - Move the iterator to the beginning of the collection.
- `obj.GoToNextItem ()` - Move the iterator to the next item in the collection.
- `int = obj.IsDoneWithTraversal ()` - Test whether the iterator is finished with the traversal. Returns 1 for yes, and 0 for no. It is safe to call any of the GetCurrent...() methods only when IsDoneWithTraversal() returns 0.
- `vtkDataObject = obj.GetCurrentDataObject ()` - Returns the current item. Valid only when IsDoneWithTraversal() returns 0.
- `vtkInformation = obj.GetCurrentMetaData ()` - Returns the meta-data associated with the current item. This will allocate a new vtkInformation object is none is already present. Use HasCurrentMetaData to avoid unnecessary creation of vtkInformation objects.
- `int = obj.HasCurrentMetaData ()` - Returns if the a meta-data information object is present for the current item. Return 1 on success, 0 otherwise.
- `obj.SetVisitOnlyLeaves (int )` - If VisitOnlyLeaves is true, the iterator will only visit nodes (sub-datasets) that are not composite. If it encounters a composite data set, it will automatically traverse that composite dataset until it finds non-composite datasets. With this options, it is possible to visit all non-composite datasets in tree of composite datasets (composite of composite of composite for example :-) ) If VisitOnlyLeaves is false, GetCurrentDataObject() may return vtkCompositeDataSet. By default, VisitOnlyLeaves is 1.
- `int = obj.GetVisitOnlyLeaves ()` - If VisitOnlyLeaves is true, the iterator will only visit nodes (sub-datasets) that are not composite. If it encounters a composite data set, it will automatically traverse that composite dataset until it finds non-composite datasets. With this options, it is possible to visit all non-composite datasets in tree of composite datasets (composite of composite of composite for example :-) ) If VisitOnlyLeaves is false, GetCurrentDataObject() may return vtkCompositeDataSet. By default, VisitOnlyLeaves is 1.
- `obj.VisitOnlyLeavesOn ()` - If VisitOnlyLeaves is true, the iterator will only visit nodes (sub-datasets) that are not composite. If it encounters a composite data set, it will automatically traverse that composite dataset until it finds non-composite datasets. With this options, it is possible to visit all non-composite datasets in tree of composite datasets (composite of composite of composite for example :-) ) If VisitOnlyLeaves is false, GetCurrentDataObject() may return vtkCompositeDataSet. By default, VisitOnlyLeaves is 1.
- `obj.VisitOnlyLeavesOff ()` - If VisitOnlyLeaves is true, the iterator will only visit nodes (sub-datasets) that are not composite. If it encounters a composite data set, it will automatically traverse that composite dataset until it finds non-composite datasets. With this options, it is possible to visit all non-composite datasets in tree of composite datasets (composite of composite of composite for example :-) ) If VisitOnlyLeaves is false, GetCurrentDataObject() may return vtkCompositeDataSet. By default, VisitOnlyLeaves is 1.
- `obj.SetTraverseSubTree (int )` - If TraverseSubTree is set to true, the iterator will visit the entire tree structure, otherwise it only visits the first level children. Set to 1 by default.
- `int = obj.GetTraverseSubTree ()` - If TraverseSubTree is set to true, the iterator will visit the entire tree structure, otherwise it only visits the first level children. Set to 1 by default.
- `obj.TraverseSubTreeOn ()` - If TraverseSubTree is set to true, the iterator will visit the entire tree structure, otherwise it only visits the first level children. Set to 1 by default.
- `obj.TraverseSubTreeOff ()` - If TraverseSubTree is set to true, the iterator will visit the entire tree structure, otherwise it only visits the first level children. Set to 1 by default.
- `obj.SetSkipEmptyNodes (int )` - If SkipEmptyNodes is true, then NULL datasets will be skipped. Default is true.
- `int = obj.GetSkipEmptyNodes ()` - If SkipEmptyNodes is true, then NULL datasets will be skipped. Default is true.
- `obj.SkipEmptyNodesOn ()` - If SkipEmptyNodes is true, then NULL datasets will be skipped. Default is true.
- `obj.SkipEmptyNodesOff ()` - If SkipEmptyNodes is true, then NULL datasets will be skipped. Default is true.
- `int = obj.GetCurrentFlatIndex ()` - Flat index is an index obtained by traversing the tree in preorder. This can be used to uniquely identify nodes in the tree. Not valid if IsDoneWithTraversal() returns true.
- `int = obj.GetReverse ()` - Returns if the iteration is in reverse order.