VTK
|
"Collapses" vertices onto their neighbors. More...
#include <vtkCollapseGraph.h>
Public Types | |
typedef vtkGraphAlgorithm | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkCollapseGraph * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | SetGraphConnection (vtkAlgorithmOutput *) |
Convenience function provided for setting the graph input. | |
void | SetSelectionConnection (vtkAlgorithmOutput *) |
Convenience function provided for setting the selection input. | |
Static Public Member Functions | |
static vtkCollapseGraph * | New () |
static int | IsTypeOf (const char *type) |
static vtkCollapseGraph * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkCollapseGraph () | |
~vtkCollapseGraph () | |
int | FillInputPortInformation (int port, vtkInformation *info) |
int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
"Collapses" vertices onto their neighbors.
vtkCollapseGraph "collapses" vertices onto their neighbors, while maintaining connectivity. Two inputs are required - a graph (directed or undirected), and a vertex selection that can be converted to indices.
Conceptually, each of the vertices specified in the input selection expands, "swallowing" adacent vertices. Edges to-or-from the "swallowed" vertices become edges to-or-from the expanding vertices, maintaining the overall graph connectivity.
In the case of directed graphs, expanding vertices only swallow vertices that are connected via out edges. This rule provides intuitive behavior when working with trees, so that "child" vertices collapse into their parents when the parents are part of the input selection.
Input port 0: graph Input port 1: selection
Definition at line 48 of file vtkCollapseGraph.h.
Reimplemented from vtkGraphAlgorithm.
Definition at line 52 of file vtkCollapseGraph.h.
vtkCollapseGraph::vtkCollapseGraph | ( | ) | [protected] |
vtkCollapseGraph::~vtkCollapseGraph | ( | ) | [protected] |
static vtkCollapseGraph* vtkCollapseGraph::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkGraphAlgorithm.
static int vtkCollapseGraph::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkGraphAlgorithm.
virtual int vtkCollapseGraph::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkGraphAlgorithm.
static vtkCollapseGraph* vtkCollapseGraph::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkGraphAlgorithm.
virtual vtkObjectBase* vtkCollapseGraph::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkGraphAlgorithm.
vtkCollapseGraph* vtkCollapseGraph::NewInstance | ( | ) | const |
Reimplemented from vtkGraphAlgorithm.
void vtkCollapseGraph::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkGraphAlgorithm.
Convenience function provided for setting the graph input.
Convenience function provided for setting the selection input.
int vtkCollapseGraph::FillInputPortInformation | ( | int | port, |
vtkInformation * | info | ||
) | [protected, virtual] |
Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.
Reimplemented from vtkGraphAlgorithm.
int vtkCollapseGraph::RequestData | ( | vtkInformation * | request, |
vtkInformationVector ** | inputVector, | ||
vtkInformationVector * | outputVector | ||
) | [protected, virtual] |
This is called by the superclass. This is the method you should override.
Reimplemented from vtkGraphAlgorithm.