Go to the documentation of this file.
29 #ifndef vtkHeatmapItem_h
30 #define vtkHeatmapItem_h
32 #include "vtkViewsInfovisModule.h"
108 vtkSetVector2Macro(Position,
float);
116 vtkGetVector2Macro(Position,
float);
125 vtkGetMacro(CellHeight,
double);
134 vtkGetMacro(CellWidth,
double);
159 vtkGetMacro(RowLabelWidth,
float);
160 vtkGetMacro(ColumnLabelWidth,
float);
288 unsigned long HeatmapBuildTime;
300 std::map< vtkIdType, std::pair< double, double > > ColumnRanges;
301 std::vector< vtkIdType > SceneRowToTableRowMap;
302 std::vector< vtkIdType > SceneColumnToTableColumnMap;
303 std::set<std::string> BlankRows;
309 double SceneBottomLeft[3];
310 double SceneTopRight[3];
312 float ColumnLabelWidth;
316 bool LegendPositionSet;
int GetOrientation()
Get the current heatmap orientation.
data structure to represent mouse events.
std::string GetTooltipText(float x, float y)
Get the value for the cell of the heatmap located at scene position (x, y) This function assumes the ...
void PositionLegends(int orientation)
void GenerateContinuousDataLookupTable()
Setup the default lookup table to use for continuous (not categorical) data.
void MarkRowAsBlank(std::string rowName)
Mark a row as blank, meaning that no cells will be drawn for it.
vtkStringArray * GetRowNames()
Get the table that this item draws.
A table, which contains similar-typed columns of data.
vtkVector2f PositionVector
static vtkHeatmapItem * New()
virtual void SetTable(vtkTable *table)
Set the table that this item draws.
void GenerateCategoricalDataLookupTable()
Setup the default lookup table to use for categorical (not continuous) data.
An array holding vtkVariants.
Class for drawing 2D primitives to a graphical context.
void ComputeLabelWidth(vtkContext2D *painter)
Compute the width of our longest row label and the width of our longest column label.
virtual void GetBounds(double bounds[4])
Get the bounds for this item as (Xmin,Xmax,Ymin,Ymax).
void UpdateVisibleSceneExtent(vtkContext2D *painter)
Calculate the extent of the data that is visible within the window.
void SetOrientation(int orientation)
Set which way the table should face within the visualization.
virtual bool IsDirty()
This function returns a bool indicating whether or not we need to rebuild our cached data before pain...
vtkStringArray * RowNames
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
virtual void PaintBuffers(vtkContext2D *painter)
This function does the bulk of the actual work in rendering our heatmap.
virtual bool MouseMoveEvent(const vtkContextMouseEvent &event)
Display a tooltip when the user mouses over a cell in the heatmap.
void InitializeLookupTables()
Generate a separate vtkLookupTable for each column in the table.
virtual bool Hit(const vtkContextMouseEvent &mouse)
Returns true if the transform is interactive, false otherwise.
double GetTextAngleForOrientation(int orientation)
Get the angle that row labels should be rotated for the correponding heatmap orientation.
virtual bool Paint(vtkContext2D *painter)
Paints the table as a heatmap.
base class for items that are part of a vtkContextScene.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
map scalar values into colors via a lookup table
Legend item to display vtkScalarsToColors.
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &event)
Display a legend for a column of data.
vtkTable * GetTable()
Get the table that this item draws.
vtkVector2f GetPositionVector()
void AccumulateProminentCategoricalDataValues(vtkIdType column)
Helper function.
a vtkAbstractArray subclass for strings
Legend item to display categorical data.
vtkSmartPointer< vtkTable > Table
dynamic, self-adjusting array of bits
A 2D graphics item for rendering a heatmap.
void SetPosition(const vtkVector2f &pos)
Wrapper around std::string to keep symbols short.
void ComputeBounds()
Compute the extent of the heatmap.
virtual void RebuildBuffers()
Generate some data needed for painting.
void PositionColorLegend(int orientation)
bool LineIsVisible(double x0, double y0, double x1, double y1)
Returns true if any part of the line segment defined by endpoints (x0, y0), (x1, y1) falls within the...