VTK
vtkGraphLayoutView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGraphLayoutView.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
48 #ifndef vtkGraphLayoutView_h
49 #define vtkGraphLayoutView_h
50 
51 #include "vtkViewsInfovisModule.h" // For export macro
52 #include "vtkRenderView.h"
53 
57 class vtkViewTheme;
58 
59 class VTKVIEWSINFOVIS_EXPORT vtkGraphLayoutView : public vtkRenderView
60 {
61 public:
64  void PrintSelf(ostream& os, vtkIndent indent);
65 
67 
70  void SetVertexLabelArrayName(const char* name);
71  const char* GetVertexLabelArrayName();
73 
75 
78  void SetEdgeLabelArrayName(const char* name);
79  const char* GetEdgeLabelArrayName();
81 
83 
86  void SetVertexLabelVisibility(bool vis);
88  vtkBooleanMacro(VertexLabelVisibility, bool);
90 
92 
97  vtkBooleanMacro(HideVertexLabelsOnInteraction, bool);
99 
101 
104  void SetEdgeVisibility(bool vis);
106  vtkBooleanMacro(EdgeVisibility, bool);
108 
110 
113  void SetEdgeLabelVisibility(bool vis);
115  vtkBooleanMacro(EdgeLabelVisibility, bool);
117 
119 
124  vtkBooleanMacro(HideEdgeLabelsOnInteraction, bool);
126 
128 
132  void SetVertexColorArrayName(const char* name);
133  const char* GetVertexColorArrayName();
135 
137 
140  void SetColorVertices(bool vis);
142  vtkBooleanMacro(ColorVertices, bool);
144 
146 
149  void SetEdgeColorArrayName(const char* name);
150  const char* GetEdgeColorArrayName();
152 
154 
157  void SetColorEdges(bool vis);
159  vtkBooleanMacro(ColorEdges, bool);
161 
163 
166  void SetEdgeSelection(bool vis);
168  vtkBooleanMacro(EdgeSelection, bool);
170 
172 
175  void SetEnabledEdgesArrayName(const char* name);
178 
180 
183  void SetEnableEdgesByArray(bool vis);
186 
188 
194 
196 
199  void SetEnableVerticesByArray(bool vis);
202 
204 
207  void SetScalingArrayName(const char* name);
208  const char* GetScalingArrayName();
210 
212 
215  void SetScaledGlyphs(bool arg);
217  vtkBooleanMacro(ScaledGlyphs, bool);
219 
221 
239  void SetLayoutStrategy(const char* name);
241  { this->SetLayoutStrategy("Random"); }
243  { this->SetLayoutStrategy("Force Directed"); }
245  { this->SetLayoutStrategy("Simple 2D"); }
247  { this->SetLayoutStrategy("Clustering 2D"); }
249  { this->SetLayoutStrategy("Community 2D"); }
251  { this->SetLayoutStrategy("Fast 2D"); }
253  { this->SetLayoutStrategy("Pass Through"); }
255  { this->SetLayoutStrategy("Circular"); }
257  { this->SetLayoutStrategy("Tree"); }
259  { this->SetLayoutStrategy("Cosmic Tree"); }
261  { this->SetLayoutStrategy("Cone"); }
263  { this->SetLayoutStrategy("Span Tree"); }
264  const char* GetLayoutStrategyName();
266 
268 
276 
278 
285  void SetEdgeLayoutStrategy(const char* name);
287  { this->SetEdgeLayoutStrategy("Arc Parallel"); }
289  { this->SetEdgeLayoutStrategy("Pass Through"); }
292 
294 
302 
308  void AddIconType(char *type, int index);
309 
314 
319  void SetIconAlignment(int alignment);
320 
322 
325  void SetIconVisibility(bool b);
327  vtkBooleanMacro(IconVisibility, bool);
329 
331 
334  void SetIconArrayName(const char* name);
335  const char* GetIconArrayName();
337 
339 
342  void SetGlyphType(int type);
345 
347 
350  virtual void SetVertexLabelFontSize(const int size);
351  virtual int GetVertexLabelFontSize();
353 
355 
358  virtual void SetEdgeLabelFontSize(const int size);
359  virtual int GetEdgeLabelFontSize();
361 
363 
369 
371 
377 
382 
389  virtual int IsLayoutComplete();
390 
401  virtual void UpdateLayout();
402 
403 protected:
406 
408 
414  // Called to process events. Overrides behavior in vtkRenderView.
415  virtual void ProcessEvents(vtkObject* caller, unsigned long eventId, void* callData);
417 
418 private:
419  vtkGraphLayoutView(const vtkGraphLayoutView&) VTK_DELETE_FUNCTION;
420  void operator=(const vtkGraphLayoutView&) VTK_DELETE_FUNCTION;
421  bool VertexLabelsRequested;
422  bool EdgeLabelsRequested;
423  bool Interacting;
424 };
425 
426 #endif
vtkGraphLayoutView::GetHideEdgeLabelsOnInteraction
bool GetHideEdgeLabelsOnInteraction()
vtkGraphLayoutView::GetHideVertexLabelsOnInteraction
bool GetHideVertexLabelsOnInteraction()
vtkGraphLayoutView::SetScaledGlyphs
void SetScaledGlyphs(bool arg)
Whether to use scaled glyphs or not.
vtkGraphLayoutView::SetVertexLabelFontSize
virtual void SetVertexLabelFontSize(const int size)
The size of the font used for vertex labeling.
vtkGraphLayoutView::GetGlyphType
int GetGlyphType()
vtkGraphLayoutView::New
static vtkGraphLayoutView * New()
vtkGraphLayoutView::SetEdgeVisibility
void SetEdgeVisibility(bool vis)
Whether to show the edges at all.
vtkGraphLayoutView::SetLayoutStrategyToRandom
void SetLayoutStrategyToRandom()
Definition: vtkGraphLayoutView.h:240
vtkRenderView
A view containing a renderer.
Definition: vtkRenderView.h:62
vtkGraphLayoutView::SetEdgeLabelFontSize
virtual void SetEdgeLabelFontSize(const int size)
The size of the font used for edge labeling.
vtkGraphLayoutView::SetHideVertexLabelsOnInteraction
void SetHideVertexLabelsOnInteraction(bool vis)
Whether to hide vertex labels during mouse interactions.
vtkGraphLayoutView::ZoomToSelection
void ZoomToSelection()
Reset the camera based on the bounds of the selected region.
vtkRenderView::Interacting
bool Interacting
Definition: vtkRenderView.h:292
vtkX3D::type
@ type
Definition: vtkX3D.h:516
vtkGraphLayoutView::GetVertexLabelVisibility
bool GetVertexLabelVisibility()
vtkGraphLayoutView::SetEdgeLayoutStrategy
void SetEdgeLayoutStrategy(const char *name)
The layout strategy to use when performing the edge layout.
vtkGraphLayoutView::SetLayoutStrategyToClustering2D
void SetLayoutStrategyToClustering2D()
Definition: vtkGraphLayoutView.h:246
vtkGraphLayoutStrategy
abstract superclass for all graph layout strategies
Definition: vtkGraphLayoutStrategy.h:46
vtkGraphLayoutView::SetLayoutStrategyToCommunity2D
void SetLayoutStrategyToCommunity2D()
Definition: vtkGraphLayoutView.h:248
vtkGraphLayoutView::GetColorEdges
bool GetColorEdges()
vtkGraphLayoutView::~vtkGraphLayoutView
~vtkGraphLayoutView()
vtkGraphLayoutView::SetScalingArrayName
void SetScalingArrayName(const char *name)
The array used for scaling (if ScaledGlyphs is ON)
vtkGraphLayoutView::SetIconAlignment
void SetIconAlignment(int alignment)
Specify where the icons should be placed in relation to the vertex.
vtkGraphLayoutView::SetColorVertices
void SetColorVertices(bool vis)
Whether to color vertices.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkGraphLayoutView::SetLayoutStrategyToForceDirected
void SetLayoutStrategyToForceDirected()
Definition: vtkGraphLayoutView.h:242
vtkGraphLayoutView::IsLayoutComplete
virtual int IsLayoutComplete()
Is the graph layout complete? This method is useful for when the strategy is iterative and the applic...
vtkGraphLayoutView::GetVertexScalarBarVisibility
bool GetVertexScalarBarVisibility()
vtkGraphLayoutView::SetHideEdgeLabelsOnInteraction
void SetHideEdgeLabelsOnInteraction(bool vis)
Whether to hide edge labels during mouse interactions.
vtkGraphLayoutView::SetVertexScalarBarVisibility
void SetVertexScalarBarVisibility(bool vis)
Whether the scalar bar for vertices is visible.
vtkGraphLayoutView::GetIconVisibility
bool GetIconVisibility()
vtkGraphLayoutView::SetEdgeLabelArrayName
void SetEdgeLabelArrayName(const char *name)
The array to use for edge labeling.
vtkRenderView.h
vtkGraphLayoutView::CreateDefaultRepresentation
virtual vtkDataRepresentation * CreateDefaultRepresentation(vtkAlgorithmOutput *conn)
Overrides behavior in vtkView to create a vtkRenderedGraphRepresentation by default.
vtkRenderedGraphRepresentation
Definition: vtkRenderedGraphRepresentation.h:71
vtkGraphLayoutView::GetScalingArrayName
const char * GetScalingArrayName()
vtkGraphLayoutView::SetEdgeLayoutStrategyToPassThrough
void SetEdgeLayoutStrategyToPassThrough()
Definition: vtkGraphLayoutView.h:288
vtkGraphLayoutView::SetLayoutStrategyToCircular
void SetLayoutStrategyToCircular()
Definition: vtkGraphLayoutView.h:254
vtkGraphLayoutView::ClearIconTypes
void ClearIconTypes()
Clear all icon mappings.
vtkGraphLayoutView
Lays out and displays a graph.
Definition: vtkGraphLayoutView.h:60
vtkGraphLayoutView::GetEdgeLabelFontSize
virtual int GetEdgeLabelFontSize()
vtkGraphLayoutView::UpdateLayout
virtual void UpdateLayout()
This method is useful for when the strategy is iterative and the application wants to show the iterat...
vtkGraphLayoutView::SetLayoutStrategyToPassThrough
void SetLayoutStrategyToPassThrough()
Definition: vtkGraphLayoutView.h:252
vtkGraphLayoutView::SetEnabledVerticesArrayName
void SetEnabledVerticesArrayName(const char *name)
The array to use for coloring vertices.
vtkGraphLayoutView::GetEdgeLayoutStrategy
vtkEdgeLayoutStrategy * GetEdgeLayoutStrategy()
The layout strategy to use when performing the edge layout.
vtkGraphLayoutView::SetEnableEdgesByArray
void SetEnableEdgesByArray(bool vis)
Whether to color edges.
vtkViewTheme
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:49
vtkGraphLayoutView::GetEdgeVisibility
bool GetEdgeVisibility()
vtkGraphLayoutView::SetEnabledEdgesArrayName
void SetEnabledEdgesArrayName(const char *name)
The array to use for coloring edges.
vtkGraphLayoutView::SetEdgeColorArrayName
void SetEdgeColorArrayName(const char *name)
The array to use for coloring edges.
vtkDataRepresentation
The superclass for all representations.
Definition: vtkDataRepresentation.h:70
vtkGraphLayoutView::GetEnableVerticesByArray
int GetEnableVerticesByArray()
vtkGraphLayoutView::GetGraphRepresentation
virtual vtkRenderedGraphRepresentation * GetGraphRepresentation()
vtkGraphLayoutView::GetEnabledEdgesArrayName
const char * GetEnabledEdgesArrayName()
vtkGraphLayoutView::SetVertexColorArrayName
void SetVertexColorArrayName(const char *name)
The array to use for coloring vertices.
vtkGraphLayoutView::SetIconArrayName
void SetIconArrayName(const char *name)
The array used for assigning icons.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkGraphLayoutView::SetLayoutStrategy
void SetLayoutStrategy(vtkGraphLayoutStrategy *s)
vtkGraphLayoutView::GetEdgeLabelVisibility
bool GetEdgeLabelVisibility()
vtkGraphLayoutView::GetEdgeSelection
bool GetEdgeSelection()
vtkGraphLayoutView::SetGlyphType
void SetGlyphType(int type)
The type of glyph to use for the vertices.
vtkGraphLayoutView::SetLayoutStrategy
void SetLayoutStrategy(const char *name)
The layout strategy to use when performing the graph layout.
vtkGraphLayoutView::ProcessEvents
virtual void ProcessEvents(vtkObject *caller, unsigned long eventId, void *callData)
Called to process events.
vtkGraphLayoutView::GetEdgeScalarBarVisibility
bool GetEdgeScalarBarVisibility()
vtkGraphLayoutView::SetVertexLabelArrayName
void SetVertexLabelArrayName(const char *name)
The array to use for vertex labeling.
vtkX3D::size
@ size
Definition: vtkX3D.h:253
vtkGraphLayoutView::SetLayoutStrategyToTree
void SetLayoutStrategyToTree()
Definition: vtkGraphLayoutView.h:256
vtkGraphLayoutView::GetVertexColorArrayName
const char * GetVertexColorArrayName()
vtkGraphLayoutView::GetEdgeColorArrayName
const char * GetEdgeColorArrayName()
vtkGraphLayoutView::GetVertexLabelArrayName
const char * GetVertexLabelArrayName()
vtkGraphLayoutView::GetEnabledVerticesArrayName
const char * GetEnabledVerticesArrayName()
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkGraphLayoutView::SetLayoutStrategyToCone
void SetLayoutStrategyToCone()
Definition: vtkGraphLayoutView.h:260
vtkGraphLayoutView::GetIconArrayName
const char * GetIconArrayName()
vtkGraphLayoutView::GetEnableEdgesByArray
int GetEnableEdgesByArray()
vtkGraphLayoutView::SetEdgeLabelVisibility
void SetEdgeLabelVisibility(bool vis)
Whether to show edge labels.
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGraphLayoutView::SetIconVisibility
void SetIconVisibility(bool b)
Whether icons are visible (default off).
vtkGraphLayoutView::GetLayoutStrategy
vtkGraphLayoutStrategy * GetLayoutStrategy()
The layout strategy to use when performing the graph layout.
vtkGraphLayoutView::SetEdgeLayoutStrategy
void SetEdgeLayoutStrategy(vtkEdgeLayoutStrategy *s)
vtkGraphLayoutView::SetLayoutStrategyToFast2D
void SetLayoutStrategyToFast2D()
Definition: vtkGraphLayoutView.h:250
vtkGraphLayoutView::SetEdgeScalarBarVisibility
void SetEdgeScalarBarVisibility(bool vis)
Whether the scalar bar for edges is visible.
vtkGraphLayoutView::vtkGraphLayoutView
vtkGraphLayoutView()
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:40
vtkGraphLayoutView::SetEdgeLayoutStrategyToArcParallel
void SetEdgeLayoutStrategyToArcParallel()
Definition: vtkGraphLayoutView.h:286
vtkGraphLayoutView::SetColorEdges
void SetColorEdges(bool vis)
Whether to color edges.
vtkGraphLayoutView::GetVertexLabelFontSize
virtual int GetVertexLabelFontSize()
vtkGraphLayoutView::SetLayoutStrategyToSimple2D
void SetLayoutStrategyToSimple2D()
Definition: vtkGraphLayoutView.h:244
vtkGraphLayoutView::GetEdgeLabelArrayName
const char * GetEdgeLabelArrayName()
vtkGraphLayoutView::SetLayoutStrategyToCosmicTree
void SetLayoutStrategyToCosmicTree()
Definition: vtkGraphLayoutView.h:258
vtkEdgeLayoutStrategy
abstract superclass for all edge layout strategies
Definition: vtkEdgeLayoutStrategy.h:37
vtkGraphLayoutView::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkGraphLayoutView::SetLayoutStrategyToSpanTree
void SetLayoutStrategyToSpanTree()
Definition: vtkGraphLayoutView.h:262
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkGraphLayoutView::GetColorVertices
bool GetColorVertices()
vtkGraphLayoutView::SetEnableVerticesByArray
void SetEnableVerticesByArray(bool vis)
Whether to color vertices.
vtkGraphLayoutView::GetLayoutStrategyName
const char * GetLayoutStrategyName()
vtkGraphLayoutView::SetVertexLabelVisibility
void SetVertexLabelVisibility(bool vis)
Whether to show vertex labels.
vtkGraphLayoutView::GetScaledGlyphs
bool GetScaledGlyphs()
vtkGraphLayoutView::AddIconType
void AddIconType(char *type, int index)
Associate the icon at index "index" in the vtkTexture to all vertices containing "type" as a value in...
vtkGraphLayoutView::GetEdgeLayoutStrategyName
const char * GetEdgeLayoutStrategyName()
vtkGraphLayoutView::SetEdgeSelection
void SetEdgeSelection(bool vis)
Whether edges are selectable.