Go to the documentation of this file.
32 #ifndef vtkRenderedGraphRepresentation_h
33 #define vtkRenderedGraphRepresentation_h
35 #include "vtkViewsInfovisModule.h"
86 vtkBooleanMacro(VertexLabelVisibility,
bool);
89 vtkSetStringMacro(VertexHoverArrayName);
90 vtkGetStringMacro(VertexHoverArrayName);
95 vtkSetMacro(HideVertexLabelsOnInteraction,
bool)
96 vtkGetMacro(HideVertexLabelsOnInteraction,
bool)
97 vtkBooleanMacro(HideVertexLabelsOnInteraction,
bool)
103 virtual
void SetEdgeLabelArrayName(const
char*
name);
104 virtual const
char* GetEdgeLabelArrayName();
105 virtual
void SetEdgeLabelPriorityArrayName(const
char*
name);
106 virtual const
char* GetEdgeLabelPriorityArrayName();
107 virtual
void SetEdgeLabelVisibility(
bool b);
108 virtual
bool GetEdgeLabelVisibility();
109 vtkBooleanMacro(EdgeLabelVisibility,
bool);
112 vtkSetStringMacro(EdgeHoverArrayName);
113 vtkGetStringMacro(EdgeHoverArrayName);
118 vtkSetMacro(HideEdgeLabelsOnInteraction,
bool)
119 vtkGetMacro(HideEdgeLabelsOnInteraction,
bool)
120 vtkBooleanMacro(HideEdgeLabelsOnInteraction,
bool)
126 virtual
void SetVertexIconArrayName(const
char*
name);
127 virtual const
char* GetVertexIconArrayName();
128 virtual
void SetVertexIconPriorityArrayName(const
char*
name);
129 virtual const
char* GetVertexIconPriorityArrayName();
130 virtual
void SetVertexIconVisibility(
bool b);
131 virtual
bool GetVertexIconVisibility();
132 vtkBooleanMacro(VertexIconVisibility,
bool);
133 virtual
void AddVertexIconType(const
char*
name,
int type);
134 virtual
void ClearVertexIconTypes();
135 virtual
void SetUseVertexIconTypeMap(
bool b);
136 virtual
bool GetUseVertexIconTypeMap();
137 vtkBooleanMacro(UseVertexIconTypeMap,
bool);
138 virtual
void SetVertexIconAlignment(
int align);
139 virtual
int GetVertexIconAlignment();
140 virtual
void SetVertexSelectedIcon(
int icon);
141 virtual
int GetVertexSelectedIcon();
142 virtual
void SetVertexDefaultIcon(
int icon);
143 virtual
int GetVertexDefaultIcon();
156 virtual
void SetVertexIconSelectionMode(
int mode);
157 virtual
int GetVertexIconSelectionMode();
158 virtual
void SetVertexIconSelectionModeToSelectedIcon()
159 { this->SetVertexIconSelectionMode(0); }
161 { this->SetVertexIconSelectionMode(1); }
163 { this->SetVertexIconSelectionMode(2); }
165 { this->SetVertexIconSelectionMode(3); }
177 vtkBooleanMacro(EdgeIconVisibility,
bool);
182 vtkBooleanMacro(UseEdgeIconTypeMap,
bool);
191 vtkBooleanMacro(ColorVerticesByArray,
bool);
200 vtkBooleanMacro(ColorEdgesByArray,
bool);
209 vtkBooleanMacro(EnableVerticesByArray,
bool);
218 vtkBooleanMacro(EnableEdgesByArray,
bool);
224 vtkBooleanMacro(EdgeVisibility,
bool);
245 vtkGetStringMacro(LayoutStrategyName);
252 { this->SetLayoutStrategy(
"Random"); }
254 { this->SetLayoutStrategy(
"Force Directed"); }
256 { this->SetLayoutStrategy(
"Simple 2D"); }
258 { this->SetLayoutStrategy(
"Clustering 2D"); }
260 { this->SetLayoutStrategy(
"Community 2D"); }
262 { this->SetLayoutStrategy(
"Fast 2D"); }
264 { this->SetLayoutStrategy(
"Pass Through"); }
266 { this->SetLayoutStrategy(
"Circular"); }
268 { this->SetLayoutStrategy(
"Tree"); }
270 { this->SetLayoutStrategy(
"Cosmic Tree"); }
272 { this->SetLayoutStrategy(
"Cone"); }
274 { this->SetLayoutStrategy(
"Span Tree"); }
281 const char* xarr,
const char* yarr =
nullptr,
const char* zarr =
nullptr);
296 double leafSpacing = 0.9,
297 double logSpacing = 1.0);
310 const char* nodeSizeArrayName,
311 bool sizeLeafNodesOnly =
true,
325 { this->SetEdgeLayoutStrategy(
"Arc Parallel"); }
327 { this->SetEdgeLayoutStrategy(
"Pass Through"); }
341 vtkGetStringMacro(EdgeLayoutStrategyName);
366 vtkBooleanMacro(Scaling,
bool);
473 vtkSetStringMacro(VertexColorArrayNameInternal);
474 vtkGetStringMacro(VertexColorArrayNameInternal);
477 vtkSetStringMacro(EdgeColorArrayNameInternal);
478 vtkGetStringMacro(EdgeColorArrayNameInternal);
481 vtkSetStringMacro(ScalingArrayNameInternal);
482 vtkGetStringMacro(ScalingArrayNameInternal);
485 vtkSetStringMacro(LayoutStrategyName);
487 vtkSetStringMacro(EdgeLayoutStrategyName);
map vtkPolyData to graphics primitives
vtkSmartPointer< vtkEdgeCenters > EdgeCenters
vtkSmartPointer< vtkGraphToGlyphs > OutlineGlyph
char * VertexHoverArrayName
convert a vtkGraph to vtkPolyData
void ApplyViewTheme(vtkViewTheme *theme) override
Apply a theme to this representation.
virtual void SetLayoutStrategyToAssignCoordinates(const char *xarr, const char *yarr=nullptr, const char *zarr=nullptr)
Set the layout strategy to use coordinates from arrays.
draw vtkPolyData onto the image plane
virtual void SetEdgeIconAlignment(int align)
virtual const char * GetEdgeIconPriorityArrayName()
A view containing a renderer.
virtual const char * GetVertexColorArrayName()
virtual bool GetEdgeScalarBarVisibility()
void SetLayoutStrategyToPassThrough()
vtkRenderedGraphRepresentation()
virtual void SetVertexScalarBarVisibility(bool b)
Vertex/edge scalar bar visibility.
virtual vtkEdgeLayoutStrategy * GetEdgeLayoutStrategy()
actor that draws 2D data with texture support
Adds an attribute array with the degree of each vertex.
char * EdgeColorArrayNameInternal
vtkSmartPointer< vtkScalarBarWidget > EdgeScalarBar
virtual void SetEdgeScalarBarVisibility(bool b)
virtual void SetScaling(bool b)
Set whether to scale vertex glyphs.
virtual int GetGlyphType()
void SetLayoutStrategyToForceDirected()
abstract superclass for all graph layout strategies
vtkSmartPointer< vtkApplyColors > ApplyColors
Internal filter classes.
vtkSmartPointer< vtkPolyDataMapper > EdgeMapper
vtkSmartPointer< vtkActor > OutlineActor
virtual void SetEdgeLayoutStrategyToGeo(double explodeFactor=0.2)
Set the edge layout strategy to a geospatial arced strategy appropriate for vtkGeoView.
void SetLayoutStrategyToClustering2D()
char * VertexColorArrayNameInternal
vtkSelection * ConvertSelection(vtkView *view, vtkSelection *sel) override
Convert the selection to a type appropriate for sharing with other representations through vtkAnnotat...
virtual const char * GetEdgeIconArrayName()
vtkSmartPointer< vtkPolyDataMapper > OutlineMapper
virtual void SetEdgeIconArrayName(const char *name)
virtual void SetColorEdgesByArray(bool b)
vtkSmartPointer< vtkScalarBarWidget > VertexScalarBar
bool HideEdgeLabelsOnInteraction
virtual bool GetEdgeIconVisibility()
apply colors to a data set.
void SetLayoutStrategyToCommunity2D()
vtkSmartPointer< vtkPointSetToLabelHierarchy > VertexLabelHierarchy
vtkSmartPointer< vtkPointSetToLabelHierarchy > EdgeLabelHierarchy
virtual void SetVertexColorArrayName(const char *name)
data object that represents a "selection" in VTK.
virtual const char * GetEnabledEdgesArrayName()
virtual const char * GetScalingArrayName()
virtual void AddEdgeIconType(const char *name, int type)
Filter that generates a polydata consisting of quads with texture coordinates referring to a set of i...
virtual const char * GetEdgeColorArrayName()
char * EdgeLayoutStrategyName
vtkSmartPointer< vtkPolyDataMapper > VertexMapper
virtual void SetEdgeLayoutStrategy(const char *name)
Set the edge layout strategy by name.
char * ScalingArrayNameInternal
bool RemoveFromView(vtkView *view) override
vtkSmartPointer< vtkPolyDataMapper2D > VertexIconMapper
virtual vtkTextProperty * GetVertexLabelTextProperty()
virtual void SetLayoutStrategyToTree(bool radial, double angle=90, double leafSpacing=0.9, double logSpacing=1.0)
Set the layout strategy to a tree layout.
Perturbs vertices that are coincident.
The superclass for all views.
create glyphs for graph vertices
convert a vtkGraph a set of points.
virtual int GetEdgeIconAlignment()
Sets theme colors for a graphical view.
char * EdgeHoverArrayName
bool AddToView(vtkView *view) override
Called by the view to add/remove this representation.
virtual vtkScalarBarWidget * GetVertexScalarBar()
Obtain the scalar bar widget used to draw a legend for the vertices/edges.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Connect inputs to internal pipeline.
void SetLayoutStrategyToCosmicTree()
virtual void SetEdgeIconVisibility(bool b)
vtkSmartPointer< vtkActor > VertexActor
virtual void SetVertexIconSelectionModeToSelectedOffset()
virtual void SetEnabledEdgesArrayName(const char *name)
void SetLayoutStrategyToSimple2D()
vtkSmartPointer< vtkGraphToPoints > VertexIconPoints
virtual void SetVertexIconSelectionModeToIgnoreSelection()
virtual bool GetEdgeVisibility()
vtkSmartPointer< vtkGraphToPolyData > GraphToPoly
virtual bool GetVertexScalarBarVisibility()
virtual bool GetColorVerticesByArray()
represents an object (geometry & properties) in a rendered scene
bool HideVertexLabelsOnInteraction
a simple class to control print indentation
virtual void SetScalingArrayName(const char *name)
Set the glyph scaling array name.
String class that stores Unicode text.
vtkSmartPointer< vtkGraphToPoints > GraphToPoints
virtual bool GetEnableVerticesByArray()
virtual void SetLayoutStrategy(const char *name)
Get/set the layout strategy by name.
virtual void SetEdgeColorArrayName(const char *name)
build a label hierarchy for a graph or point set.
virtual vtkGraphLayoutStrategy * GetLayoutStrategy()
vtkUnicodeString GetHoverTextInternal(vtkSelection *sel) override
Subclasses may override this method to generate the hover text.
virtual void SetEnableVerticesByArray(bool b)
virtual void SetEdgeLayoutStrategy(vtkEdgeLayoutStrategy *strategy)
Set/get the graph layout strategy.
vtkSmartPointer< vtkTransformCoordinateSystems > VertexIconTransform
vtkSmartPointer< vtkEdgeLayout > EdgeLayout
Superclass for mapping scalar values to colors.
virtual bool IsLayoutComplete()
Whether the current graph layout is complete.
void SetLayoutStrategyToFast2D()
void ComputeSelectedGraphBounds(double bounds[6])
Compute the bounding box of the selected subgraph.
virtual vtkScalarBarWidget * GetEdgeScalarBar()
virtual void SetVertexLabelPriorityArrayName(const char *name)
virtual bool GetScaling()
void SetLayoutStrategyToSpanTree()
vtkSmartPointer< vtkApplyIcons > ApplyVertexIcons
virtual void SetLayoutStrategy(vtkGraphLayoutStrategy *strategy)
Set/get the graph layout strategy.
represent text properties.
virtual void SetVertexLabelArrayName(const char *name)
map scalar values into colors via a lookup table
vtkSmartPointer< vtkGraphToGlyphs > VertexGlyph
vtkSmartPointer< vtkGraphLayout > Layout
virtual bool GetVertexLabelVisibility()
virtual void SetUseEdgeIconTypeMap(bool b)
virtual void SetEdgeIconPriorityArrayName(const char *name)
virtual void ClearEdgeIconTypes()
virtual void SetVertexIconSelectionModeToAnnotationIcon()
virtual void SetGlyphType(int type)
Set the graph vertex glyph type.
Removes the rows/edges/vertices of input data flagged by ann.
virtual void SetEnableEdgesByArray(bool b)
vtkSmartPointer< vtkIconGlyphFilter > VertexIconGlyph
virtual void UpdateLayout()
Performs another iteration on the graph layout.
virtual void SetLayoutStrategyToCosmicTree(const char *nodeSizeArrayName, bool sizeLeafNodesOnly=true, int layoutDepth=0, vtkIdType layoutRoot=-1)
Set the layout strategy to a cosmic tree layout.
vtkSmartPointer< vtkPerturbCoincidentVertices > Coincident
~vtkRenderedGraphRepresentation() override
void SetLayoutStrategyToTree()
virtual bool GetColorEdgesByArray()
void SetEdgeLayoutStrategyToArcParallel()
concrete dataset represents vertices, lines, polygons, and triangle strips
void SetEdgeSelection(bool b)
vtkSmartPointer< vtkRemoveHiddenData > RemoveHiddenGraph
virtual const char * GetVertexLabelPriorityArrayName()
abstract superclass for all edge layout strategies
void SetLayoutStrategyToCircular()
virtual void SetColorVerticesByArray(bool b)
virtual void SetEnabledVerticesArrayName(const char *name)
virtual void SetVertexLabelTextProperty(vtkTextProperty *p)
void PrepareForRendering(vtkRenderView *view) override
The view will call this method before every render.
generate points at center of edges
virtual const char * GetEnabledVerticesArrayName()
char * LayoutStrategyName
void SetLayoutStrategyToCone()
virtual void SetVertexLabelVisibility(bool b)
void SetEdgeLayoutStrategyToPassThrough()
vtkSmartPointer< vtkActor > EdgeActor
vtkSmartPointer< vtkTexturedActor2D > VertexIconActor
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
layout a graph in 2 or 3 dimensions
vtkSmartPointer< vtkPolyData > EmptyPolyData
void SetLayoutStrategyToRandom()
Set predefined layout strategies.
virtual bool GetEnableEdgesByArray()
vtkSmartPointer< vtkVertexDegree > VertexDegree
virtual const char * GetVertexLabelArrayName()
virtual void SetEdgeVisibility(bool b)
virtual bool GetUseEdgeIconTypeMap()
apply icons to a data set.
static vtkRenderedGraphRepresentation * New()