00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkTreeMapView.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 -------------------------------------------------------------------------*/ 00035 #ifndef __vtkTreeMapView_h 00036 #define __vtkTreeMapView_h 00037 00038 #include "vtkRenderView.h" 00039 00040 class vtkActor; 00041 class vtkActor2D; 00042 class vtkAlgorithmOutput; 00043 class vtkBoxLayoutStrategy; 00044 class vtkLabeledTreeMapDataMapper; 00045 class vtkLookupTable; 00046 class vtkPolyDataMapper; 00047 class vtkRenderWindow; 00048 class vtkSliceAndDiceLayoutStrategy; 00049 class vtkSquarifyLayoutStrategy; 00050 class vtkTreeFieldAggregator; 00051 class vtkTreeLevelsFilter; 00052 class vtkTreeMapLayout; 00053 class vtkTreeMapToPolyData; 00054 00055 class VTK_VIEWS_EXPORT vtkTreeMapView : public vtkRenderView 00056 { 00057 public: 00058 static vtkTreeMapView *New(); 00059 vtkTypeRevisionMacro(vtkTreeMapView, vtkRenderView); 00060 void PrintSelf(ostream& os, vtkIndent indent); 00061 00063 00064 void SetColorArrayName(const char* name); 00065 const char* GetColorArrayName(); 00067 00069 00070 void SetSizeArrayName(const char* name); 00071 const char* GetSizeArrayName(); 00073 00075 00077 void SetLabelArrayName(const char* name); 00078 const char* GetLabelArrayName(); 00080 00082 00084 void SetHoverArrayName(const char* name); 00085 const char* GetHoverArrayName(); 00087 00089 00090 void SetLayoutStrategy(const char* name); 00091 void SetLayoutStrategyToBox(); 00092 void SetLayoutStrategyToSliceAndDice(); 00093 void SetLayoutStrategyToSquarify(); 00095 00097 00099 void SetBorderPercentage(double pcent); 00100 double GetBorderPercentage(); 00102 00104 00105 void SetFontSizeRange(const int maxSize, const int minSize, const int delta=4); 00106 void GetFontSizeRange(int range[3]); 00108 00110 virtual void SetupRenderWindow(vtkRenderWindow* win); 00111 00113 virtual void ApplyViewTheme(vtkViewTheme* theme); 00114 00115 protected: 00116 vtkTreeMapView(); 00117 ~vtkTreeMapView(); 00118 00120 virtual void AddInputConnection(vtkAlgorithmOutput* conn); 00121 00123 virtual void RemoveInputConnection(vtkAlgorithmOutput* conn); 00124 00126 00127 virtual void ProcessEvents(vtkObject* caller, unsigned long eventId, 00128 void* callData); 00130 00132 virtual void PrepareForRendering(); 00133 00135 00136 vtkSetStringMacro(ColorArrayNameInternal); 00137 vtkGetStringMacro(ColorArrayNameInternal); 00139 00140 // Representation objects 00141 char* ColorArrayNameInternal; 00142 vtkTreeLevelsFilter* TreeLevelsFilter; 00143 vtkTreeFieldAggregator* TreeFieldAggregator; 00144 vtkTreeMapLayout* TreeMapLayout; 00145 vtkBoxLayoutStrategy* BoxLayout; 00146 vtkSliceAndDiceLayoutStrategy* SliceAndDiceLayout; 00147 vtkSquarifyLayoutStrategy* SquarifyLayout; 00148 vtkTreeMapToPolyData* TreeMapToPolyData; 00149 vtkPolyDataMapper* TreeMapMapper; 00150 vtkActor* TreeMapActor; 00151 vtkLabeledTreeMapDataMapper* LabelMapper; 00152 vtkActor2D* LabelActor; 00153 vtkLookupTable* ColorLUT; 00154 00155 private: 00156 vtkTreeMapView(const vtkTreeMapView&); // Not implemented. 00157 void operator=(const vtkTreeMapView&); // Not implemented. 00158 }; 00159 00160 #endif