VTK
vtkTreeHeatmapItem.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTreeHeatmapItem.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 =========================================================================*/
38 #ifndef vtkTreeHeatmapItem_h
39 #define vtkTreeHeatmapItem_h
40 
41 #include "vtkViewsInfovisModule.h" // For export macro
42 #include "vtkContextItem.h"
43 
44 #include "vtkNew.h" // For vtkNew ivars
45 #include "vtkSmartPointer.h" // For vtkSmartPointer ivars
46 #include <vector> // For lookup tables
47 #include <map> // For string lookup tables
48 
49 class vtkDendrogramItem;
50 class vtkHeatmapItem;
51 class vtkTable;
52 class vtkTree;
53 
55 {
56 public:
57  static vtkTreeHeatmapItem *New();
59  virtual void PrintSelf(ostream &os, vtkIndent indent);
60 
66  virtual void SetTree(vtkTree *tree);
67 
69  vtkTree * GetTree();
70 
74  virtual void SetColumnTree(vtkTree *tree);
75 
78  vtkTree * GetColumnTree();
79 
84  virtual void SetTable(vtkTable *table);
85 
87  vtkTable * GetTable();
88 
90 
91  vtkDendrogramItem * GetDendrogram();
92  void SetDendrogram(vtkDendrogramItem *dendrogram);
94 
96 
97  vtkHeatmapItem * GetHeatmap();
98  void SetHeatmap(vtkHeatmapItem *heatmap);
100 
103  void ReorderTable();
104 
108  void ReverseTableRows();
109 
112  void ReverseTableColumns();
113 
117  void SetOrientation(int orientation);
118 
120  int GetOrientation();
121 
124  void GetBounds(double bounds[4]);
125 
127  void GetCenter(double center[2]);
128 
130  void GetSize(double size[2]);
131 
139  void CollapseToNumberOfLeafNodes(unsigned int n);
140 
142 
144  float GetTreeLineWidth();
145  void SetTreeLineWidth(float width);
147 
149  vtkTree * GetPrunedTree();
150 
153  void SetTreeColorArray(const char *arrayName);
154 
155  //BTX
156 
158  virtual bool Hit(const vtkContextMouseEvent &mouse);
159 
162  virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &event);
163 
164  //ETX
165 
166 protected:
169 
171  virtual bool Paint(vtkContext2D *painter);
172 
174  void CollapseHeatmapRows();
175 
177  void CollapseHeatmapColumns();
178 
183 
184 private:
185  vtkTreeHeatmapItem(const vtkTreeHeatmapItem&); // Not implemented
186  void operator=(const vtkTreeHeatmapItem&); // Not implemented
187 
188  unsigned long TreeHeatmapBuildTime;
189 };
190 
191 #endif
vtkSmartPointer< vtkDendrogramItem > Dendrogram
A 2D graphics item for rendering a tree as a dendrogram.
base class for items that are part of a vtkContextScene.
virtual bool Paint(vtkContext2D *painter)
A 2D graphics item for rendering a heatmap.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:56
data structure to represent mouse events.
a simple class to control print indentation
Definition: vtkIndent.h:38
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
vtkSmartPointer< vtkHeatmapItem > Heatmap
virtual bool Hit(const vtkContextMouseEvent &mouse)
virtual void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
vtkSmartPointer< vtkDendrogramItem > ColumnDendrogram
A rooted tree data structure.
Definition: vtkTree.h:59
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse)
#define VTKVIEWSINFOVIS_EXPORT
A 2D graphics item for rendering a tree and an associated heatmap.