• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Views/vtkTreeLayoutView.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkTreeLayoutView.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00031 #ifndef __vtkTreeLayoutView_h
00032 #define __vtkTreeLayoutView_h
00033 
00034 #include "vtkRenderView.h"
00035 
00036 class vtkActor;
00037 class vtkActor2D;
00038 class vtkCoordinate;
00039 class vtkDynamic2DLabelMapper;
00040 class vtkExtractSelectedGraph;
00041 class vtkGraphLayout;
00042 class vtkGraphToPolyData;
00043 class vtkInteractorStyleRubberBand2D;
00044 class vtkKdTreeSelector;
00045 class vtkLookupTable;
00046 class vtkPolyDataMapper;
00047 class vtkTreeLayoutStrategy;
00048 class vtkVertexGlyphFilter;
00049 class vtkViewTheme;
00050 class vtkHardwareSelector;
00051 
00052 class VTK_VIEWS_EXPORT vtkTreeLayoutView : public vtkRenderView
00053 {
00054 public:
00055   static vtkTreeLayoutView *New();
00056   vtkTypeRevisionMacro(vtkTreeLayoutView, vtkRenderView);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058   
00060 
00061   void SetLabelArrayName(const char* name);
00062   const char* GetLabelArrayName();
00064   
00066 
00067   void SetLabelVisibility(bool vis);
00068   bool GetLabelVisibility();
00069   void LabelVisibilityOn();
00070   void LabelVisibilityOff();
00072   
00074 
00075   void SetVertexColorArrayName(const char* name);
00076   const char* GetVertexColorArrayName();
00078   
00080 
00081   void SetColorVertices(bool vis);
00082   bool GetColorVertices();
00083   void ColorVerticesOn();
00084   void ColorVerticesOff();
00086   
00088 
00089   void SetEdgeColorArrayName(const char* name);
00090   const char* GetEdgeColorArrayName();
00092   
00094 
00095   void SetColorEdges(bool vis);
00096   bool GetColorEdges();
00097   void ColorEdgesOn();
00098   void ColorEdgesOff();
00100   
00102 
00105   void SetAngle(double angle);
00106   double GetAngle();
00108 
00110 
00113   void SetRadial(bool radial);
00114   bool GetRadial();
00115   void RadialOn();
00116   void RadialOff();
00118 
00120 
00123   void SetLogSpacingValue(double value);
00124   double GetLogSpacingValue();
00126 
00128 
00131   void SetLeafSpacing(double value);
00132   double GetLeafSpacing();
00134 
00136 
00137   const char* GetDistanceArrayName();
00138   void SetDistanceArrayName(const char* name);
00140 
00142   virtual void SetupRenderWindow(vtkRenderWindow* win);
00143 
00145   virtual void ApplyViewTheme(vtkViewTheme* theme);
00146 
00147 protected:
00148   vtkTreeLayoutView();
00149   ~vtkTreeLayoutView();
00150 
00152 
00153   virtual void ProcessEvents(vtkObject* caller, unsigned long eventId, 
00154     void* callData);
00156   
00158 
00160   virtual void AddInputConnection( int port, int item,
00161     vtkAlgorithmOutput* conn,
00162     vtkAlgorithmOutput* selectionConn);
00164   
00166 
00167   virtual void RemoveInputConnection( int port, int item,
00168     vtkAlgorithmOutput* conn,
00169     vtkAlgorithmOutput* selectionConn);
00171   
00173   virtual void PrepareForRendering();
00174 
00176   void MapToXYPlane(double displayX, double displayY, double &x, double &y);
00177   
00179 
00180   vtkGetStringMacro(VertexColorArrayNameInternal);
00181   vtkSetStringMacro(VertexColorArrayNameInternal);
00182   vtkGetStringMacro(EdgeColorArrayNameInternal);
00183   vtkSetStringMacro(EdgeColorArrayNameInternal);
00185     
00186   char* VertexColorArrayNameInternal;
00187   char* EdgeColorArrayNameInternal;
00188   
00189   // Used for coordinate conversion
00190   vtkCoordinate* Coordinate;
00191 
00192   // Representation objects
00193   vtkGraphLayout*           GraphLayout;
00194   vtkTreeLayoutStrategy*    TreeStrategy;
00195   vtkGraphToPolyData*       GraphToPolyData;
00196   vtkVertexGlyphFilter*     VertexGlyph;
00197   vtkPolyDataMapper*        VertexMapper;
00198   vtkLookupTable*           VertexColorLUT;
00199   vtkActor*                 VertexActor;
00200   vtkPolyDataMapper*        OutlineMapper;
00201   vtkActor*                 OutlineActor;
00202   vtkPolyDataMapper*        EdgeMapper;
00203   vtkLookupTable*           EdgeColorLUT;
00204   vtkActor*                 EdgeActor;
00205   vtkDynamic2DLabelMapper*  LabelMapper;
00206   vtkActor2D*               LabelActor;
00207   
00208   // Selection objects
00209   vtkKdTreeSelector*        KdTreeSelector;
00210   vtkHardwareSelector*      HardwareSelector;
00211   vtkExtractSelectedGraph*  ExtractSelectedGraph;
00212   vtkGraphToPolyData*       SelectionToPolyData;
00213   vtkVertexGlyphFilter*     SelectionVertexGlyph;
00214   vtkPolyDataMapper*        SelectionVertexMapper;
00215   vtkActor*                 SelectionVertexActor;
00216   vtkPolyDataMapper*        SelectionEdgeMapper;
00217   vtkActor*                 SelectionEdgeActor;
00218 
00219 private:
00220   vtkTreeLayoutView(const vtkTreeLayoutView&);  // Not implemented.
00221   void operator=(const vtkTreeLayoutView&);  // Not implemented.
00222 };
00223 
00224 #endif

Generated by  doxygen 1.7.1