VTK
dox/Views/Infovis/vtkTreeAreaView.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkTreeAreaView.h
00005 
00006   -------------------------------------------------------------------------
00007   Copyright 2008 Sandia Corporation.
00008   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00009   the U.S. Government retains certain rights in this software.
00010   -------------------------------------------------------------------------
00011 
00012   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00013   All rights reserved.
00014   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00015 
00016   This software is distributed WITHOUT ANY WARRANTY; without even
00017   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00018   PURPOSE.  See the above copyright notice for more information.
00019 
00020 =========================================================================*/
00021 
00039 #ifndef __vtkTreeAreaView_h
00040 #define __vtkTreeAreaView_h
00041 
00042 #include "vtkViewsInfovisModule.h" // For export macro
00043 #include "vtkRenderView.h"
00044 
00045 class vtkAreaLayoutStrategy;
00046 class vtkGraph;
00047 class vtkLabeledDataMapper;
00048 class vtkPolyDataAlgorithm;
00049 class vtkRenderedTreeAreaRepresentation;
00050 class vtkTree;
00051 
00052 class VTKVIEWSINFOVIS_EXPORT vtkTreeAreaView : public vtkRenderView
00053 {
00054 public:
00055   static vtkTreeAreaView *New();
00056   vtkTypeMacro(vtkTreeAreaView, vtkRenderView);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00062   vtkDataRepresentation* SetTreeFromInputConnection(vtkAlgorithmOutput* conn);
00063   vtkDataRepresentation* SetTreeFromInput(vtkTree* input);
00064   vtkDataRepresentation* SetGraphFromInputConnection(vtkAlgorithmOutput* conn);
00065   vtkDataRepresentation* SetGraphFromInput(vtkGraph* input);
00067 
00069 
00070   void SetAreaLabelArrayName(const char* name);
00071   const char* GetAreaLabelArrayName();
00073 
00075 
00076   void SetAreaSizeArrayName(const char* name);
00077   const char* GetAreaSizeArrayName();
00079 
00081 
00083   void SetLabelPriorityArrayName(const char* name);
00084   const char* GetLabelPriorityArrayName();
00086 
00088 
00089   void SetEdgeLabelArrayName(const char* name);
00090   const char* GetEdgeLabelArrayName();
00092 
00094 
00096   void SetAreaHoverArrayName(const char* name);
00097   const char* GetAreaHoverArrayName();
00099 
00101 
00102   void SetAreaLabelVisibility(bool vis);
00103   bool GetAreaLabelVisibility();
00104   vtkBooleanMacro(AreaLabelVisibility, bool);
00106 
00108 
00109   void SetEdgeLabelVisibility(bool vis);
00110   bool GetEdgeLabelVisibility();
00111   vtkBooleanMacro(EdgeLabelVisibility, bool);
00113 
00115 
00116   void SetAreaColorArrayName(const char* name);
00117   const char* GetAreaColorArrayName();
00119 
00121 
00122   void SetColorAreas(bool vis);
00123   bool GetColorAreas();
00124   vtkBooleanMacro(ColorAreas, bool);
00126 
00128 
00129   void SetEdgeColorArrayName(const char* name);
00130   const char* GetEdgeColorArrayName();
00132 
00134   void SetEdgeColorToSplineFraction();
00135 
00137 
00138   void SetShrinkPercentage(double value);
00139   double GetShrinkPercentage();
00141 
00143 
00144   void SetColorEdges(bool vis);
00145   bool GetColorEdges();
00146   vtkBooleanMacro(ColorEdges, bool);
00148 
00150 
00151   void SetBundlingStrength(double strength);
00152   double GetBundlingStrength();
00154 
00156 
00157   virtual void SetAreaLabelFontSize(const int size);
00158   virtual int GetAreaLabelFontSize();
00160 
00162 
00163   virtual void SetEdgeLabelFontSize(const int size);
00164   virtual int GetEdgeLabelFontSize();
00166 
00168 
00169   virtual void SetLayoutStrategy(vtkAreaLayoutStrategy* strategy);
00170   virtual vtkAreaLayoutStrategy* GetLayoutStrategy();
00172 
00174 
00175   virtual void SetUseRectangularCoordinates(bool rect);
00176   virtual bool GetUseRectangularCoordinates();
00177   vtkBooleanMacro(UseRectangularCoordinates, bool);
00179 
00181 
00182   virtual void SetEdgeScalarBarVisibility(bool b);
00183   virtual bool GetEdgeScalarBarVisibility();
00185 
00186 protected:
00187   vtkTreeAreaView();
00188   ~vtkTreeAreaView();
00189 
00191 
00194   virtual void SetAreaToPolyData(vtkPolyDataAlgorithm* areaToPoly);
00195   virtual vtkPolyDataAlgorithm* GetAreaToPolyData();
00197 
00199 
00201   virtual void SetAreaLabelMapper(vtkLabeledDataMapper* mapper);
00202   virtual vtkLabeledDataMapper* GetAreaLabelMapper();
00204 
00206 
00208   virtual vtkDataRepresentation* CreateDefaultRepresentation(vtkAlgorithmOutput* conn);
00209   virtual vtkRenderedTreeAreaRepresentation* GetTreeAreaRepresentation();
00211 
00212 private:
00213   vtkTreeAreaView(const vtkTreeAreaView&);  // Not implemented.
00214   void operator=(const vtkTreeAreaView&);  // Not implemented.
00215 };
00216 
00217 #endif