VTK  9.7.1
vtkTreeHeatmapItem.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
27 #ifndef vtkTreeHeatmapItem_h
28 #define vtkTreeHeatmapItem_h
29 
30 #include "vtkContextItem.h"
31 #include "vtkViewsInfovisModule.h" // For export macro
32 
33 #include "vtkNew.h" // For vtkNew ivars
34 #include "vtkSmartPointer.h" // For vtkSmartPointer ivars
35 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
36 #include <map> // For string lookup tables
37 #include <vector> // For lookup tables
38 
39 VTK_ABI_NAMESPACE_BEGIN
40 class vtkDendrogramItem;
41 class vtkHeatmapItem;
42 class vtkTable;
43 class vtkTree;
44 
45 class VTKVIEWSINFOVIS_EXPORT VTK_MARSHALAUTO vtkTreeHeatmapItem : public vtkContextItem
46 {
47 public:
48  static vtkTreeHeatmapItem* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
60  virtual void SetTree(vtkTree* tree);
61 
66  vtkTree* GetTree();
67 
74  virtual void SetColumnTree(vtkTree* tree);
75 
81  vtkTree* GetColumnTree();
82 
89  virtual void SetTable(vtkTable* table);
90 
95  vtkTable* GetTable();
96 
98 
101  vtkDendrogramItem* GetDendrogram();
102  void SetDendrogram(vtkDendrogramItem* dendrogram);
104 
106 
109  vtkDendrogramItem* GetColumnDendrogram();
110  void SetColumnDendrogram(vtkDendrogramItem* dendrogram);
112 
114 
117  vtkHeatmapItem* GetHeatmap();
118  void SetHeatmap(vtkHeatmapItem* heatmap);
120 
125  void ReorderTable();
126 
132  void ReverseTableRows();
133 
139  void ReverseTableColumns();
140 
145  void SetOrientation(int orientation);
146 
150  int GetOrientation();
151 
155  void GetBounds(double bounds[4]);
156 
160  void GetCenter(double center[2]);
161 
165  void GetSize(double size[2]);
166 
176  void CollapseToNumberOfLeafNodes(unsigned int n);
177 
179 
182  float GetTreeLineWidth();
183  void SetTreeLineWidth(float width);
185 
189  vtkTree* GetPrunedTree();
190 
195  void SetTreeColorArray(const char* arrayName);
196 
200  bool Hit(const vtkContextMouseEvent& mouse) override;
201 
206  bool MouseDoubleClickEvent(const vtkContextMouseEvent& event) override;
207 
208 protected:
210  ~vtkTreeHeatmapItem() override;
211 
215  bool Paint(vtkContext2D* painter) override;
216 
220  void CollapseHeatmapRows();
221 
225  void CollapseHeatmapColumns();
226 
230  int Orientation;
231 
232 private:
233  vtkTreeHeatmapItem(const vtkTreeHeatmapItem&) = delete;
234  void operator=(const vtkTreeHeatmapItem&) = delete;
235 
236  vtkMTimeType TreeHeatmapBuildTime;
237 };
238 
239 VTK_ABI_NAMESPACE_END
240 #endif
void GetBounds(T a, double bds[6])
A 2D graphics item for rendering a tree as a dendrogram.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
base class for items that are part of a vtkContextScene.
#define VTK_MARSHAL_EXCLUDE_REASON_IS_REDUNDANT
A 2D graphics item for rendering a heatmap.
Hold a reference to a vtkObjectBase instance.
Definition: vtkMeta.h:23
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:49
data structure to represent mouse events.
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_MARSHALEXCLUDE(reason)
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:59
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
A rooted tree data structure.
Definition: vtkTree.h:46
A 2D graphics item for rendering a tree and an associated heatmap.