38 #ifndef __vtkTreeHeatmapItem_h
39 #define __vtkTreeHeatmapItem_h
41 #include "vtkViewsInfovisModule.h"
42 #include "vtkContextItem.h"
62 virtual void PrintSelf(ostream &os,
vtkIndent indent);
69 virtual void SetTree(
vtkTree *tree);
78 virtual void SetTable(
vtkTable *table);
87 void CollapseToNumberOfLeafNodes(
unsigned int n);
95 void SetTreeColorArray(
const char *arrayName);
99 virtual bool Hit(
const vtkContextMouseEvent &mouse);
102 virtual bool MouseMoveEvent(
const vtkContextMouseEvent &event);
107 virtual bool MouseDoubleClickEvent(
const vtkContextMouseEvent &event);
117 virtual void RebuildBuffers();
121 virtual void PaintBuffers(vtkContext2D *painter);
125 virtual bool IsDirty();
130 void ComputeMultipliers();
133 void ComputeTreeBounds();
136 void InitializeLookupTables();
139 virtual bool Paint(vtkContext2D *painter);
144 void GenerateLookupTableForStringColumn(
vtkIdType column);
147 void PaintHeatmapWithoutTree(vtkContext2D *painter);
153 bool SetupTextProperty(vtkContext2D *painter);
158 std::string GetTooltipText(
float x,
float y);
161 void CountLeafNodes();
167 vtkIdType GetClosestVertex(
double x,
double y);
185 vtkIdType GetClickedCollapsedSubTree(
double x,
double y);
191 void UpdateVisibleSceneExtent(vtkContext2D *painter);
196 bool LineIsVisible(
double x0,
double y0,
double x1,
double y1);
206 unsigned long TreeHeatmapBuildTime;
213 std::vector< vtkLookupTable * > LookupTables;
214 std::vector< vtkIdType > RowMap;
217 int NumberOfLeafNodes;
221 std::map< int, std::map< std::string, double> > StringToDoubleMaps;
231 double SceneBottomLeft[3];
232 double SceneTopRight[3];
233 bool JustCollapsedOrExpanded;
map scalar values into colors via a lookup table
dynamic, self-adjusting array of double
a simple class to control print indentation
layout a graph in 2 or 3 dimensions
A table, which contains similar-typed columns of data.
prune a subtree out of a vtkTree
A rooted tree data structure.
A 2D graphics item for rendering a tree and an associated heatmap.