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 =========================================================================*/
39 #ifndef vtkTreeHeatmapItem_h
40 #define vtkTreeHeatmapItem_h
41 
42 #include "vtkViewsInfovisModule.h" // For export macro
43 #include "vtkContextItem.h"
44 
45 #include "vtkNew.h" // For vtkNew ivars
46 #include "vtkSmartPointer.h" // For vtkSmartPointer ivars
47 #include <vector> // For lookup tables
48 #include <map> // For string lookup tables
49 
50 class vtkDendrogramItem;
51 class vtkHeatmapItem;
52 class vtkTable;
53 class vtkTree;
54 
55 class VTKVIEWSINFOVIS_EXPORT vtkTreeHeatmapItem : public vtkContextItem
56 {
57 public:
58  static vtkTreeHeatmapItem *New();
60  void PrintSelf(ostream &os, vtkIndent indent) override;
61 
69  virtual void SetTree(vtkTree *tree);
70 
74  vtkTree * GetTree();
75 
81  virtual void SetColumnTree(vtkTree *tree);
82 
87  vtkTree * GetColumnTree();
88 
94  virtual void SetTable(vtkTable *table);
95 
99  vtkTable * GetTable();
100 
102 
105  vtkDendrogramItem * GetDendrogram();
106  void SetDendrogram(vtkDendrogramItem *dendrogram);
108 
110 
113  vtkHeatmapItem * GetHeatmap();
114  void SetHeatmap(vtkHeatmapItem *heatmap);
116 
121  void ReorderTable();
122 
128  void ReverseTableRows();
129 
135  void ReverseTableColumns();
136 
141  void SetOrientation(int orientation);
142 
146  int GetOrientation();
147 
151  void GetBounds(double bounds[4]);
152 
156  void GetCenter(double center[2]);
157 
161  void GetSize(double size[2]);
162 
172  void CollapseToNumberOfLeafNodes(unsigned int n);
173 
175 
178  float GetTreeLineWidth();
179  void SetTreeLineWidth(float width);
181 
185  vtkTree * GetPrunedTree();
186 
191  void SetTreeColorArray(const char *arrayName);
192 
196  bool Hit(const vtkContextMouseEvent &mouse) override;
197 
202  bool MouseDoubleClickEvent(const vtkContextMouseEvent &event) override;
203 
204 protected:
206  ~vtkTreeHeatmapItem() override;
207 
211  bool Paint(vtkContext2D *painter) override;
212 
216  void CollapseHeatmapRows();
217 
221  void CollapseHeatmapColumns();
222 
227 
228 private:
229  vtkTreeHeatmapItem(const vtkTreeHeatmapItem&) = delete;
230  void operator=(const vtkTreeHeatmapItem&) = delete;
231 
232  vtkMTimeType TreeHeatmapBuildTime;
233 };
234 
235 #endif
vtkSmartPointer< vtkDendrogramItem > Dendrogram
A 2D graphics item for rendering a tree as a dendrogram.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
base class for items that are part of a vtkContextScene.
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
A 2D graphics item for rendering a heatmap.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:58
data structure to represent mouse events.
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkSmartPointer< vtkHeatmapItem > Heatmap
virtual bool Hit(const vtkContextMouseEvent &mouse)
Return true if the supplied x, y coordinate is inside the item.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkSmartPointer< vtkDendrogramItem > ColumnDendrogram
A rooted tree data structure.
Definition: vtkTree.h:60
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse)
Mouse button double click event.
A 2D graphics item for rendering a tree and an associated heatmap.