26#ifndef vtkHeatmapItem_h
27#define vtkHeatmapItem_h
30#include "vtkViewsInfovisModule.h"
122 vtkGetMacro(CellHeight,
double);
123 vtkSetMacro(CellHeight,
double);
131 vtkGetMacro(CellWidth,
double);
132 vtkSetMacro(CellWidth,
double);
156 vtkGetMacro(RowLabelWidth,
float);
157 vtkGetMacro(ColumnLabelWidth,
float);
285 unsigned long HeatmapBuildTime;
297 std::map<vtkIdType, std::pair<double, double>> ColumnRanges;
298 std::vector<vtkIdType> SceneRowToTableRowMap;
299 std::vector<vtkIdType> SceneColumnToTableColumnMap;
300 std::set<std::string> BlankRows;
306 double SceneBottomLeft[3];
307 double SceneTopRight[3];
309 float ColumnLabelWidth;
313 bool LegendPositionSet;
dynamic, self-adjusting array of bits
Legend item to display categorical data.
Legend item to display vtkScalarsToColors.
Class for drawing 2D primitives to a graphical context.
base class for items that are part of a vtkContextScene.
data structure to represent mouse events.
A 2D graphics item for rendering a heatmap.
int GetOrientation()
Get the current heatmap orientation.
double GetTextAngleForOrientation(int orientation)
Get the angle that row labels should be rotated for the corresponding heatmap orientation.
~vtkHeatmapItem() override
virtual void RebuildBuffers()
Generate some data needed for painting.
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...
void PositionLegends(int orientation)
bool MouseDoubleClickEvent(const vtkContextMouseEvent &event) override
Display a legend for a column of data.
vtkSmartPointer< vtkTable > Table
virtual void SetTable(vtkTable *table)
Set the table that this item draws.
void PositionColorLegend(int orientation)
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 ...
vtkStringArray * GetRowNames()
Get the table that this item draws.
void SetOrientation(int orientation)
Set which way the table should face within the visualization.
bool MouseMoveEvent(const vtkContextMouseEvent &event) override
Display a tooltip when the user mouses over a cell in the heatmap.
vtkVector2f GetPositionVector()
Get position of the heatmap.
vtkStringArray * RowNames
vtkTable * GetTable()
Get the table that this item draws.
void SetPosition(const vtkVector2f &pos)
Set the position of the heatmap.
void MarkRowAsBlank(const std::string &rowName)
Mark a row as blank, meaning that no cells will be drawn for it.
void AccumulateProminentCategoricalDataValues(vtkIdType column)
Helper function.
void UpdateVisibleSceneExtent(vtkContext2D *painter)
Calculate the extent of the data that is visible within the window.
vtkVector2f PositionVector
virtual void PaintBuffers(vtkContext2D *painter)
This function does the bulk of the actual work in rendering our heatmap.
void ComputeBounds()
Compute the extent of the heatmap.
static vtkHeatmapItem * New()
virtual void GetBounds(double bounds[4])
Get the bounds for this item as (Xmin,Xmax,Ymin,Ymax).
void InitializeLookupTables()
Generate a separate vtkLookupTable for each column in the table.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool Hit(const vtkContextMouseEvent &mouse) override
Returns true if the transform is interactive, false otherwise.
void GenerateContinuousDataLookupTable()
Setup the default lookup table to use for continuous (not categorical) data.
bool Paint(vtkContext2D *painter) override
Paints the table as a heatmap.
void GenerateCategoricalDataLookupTable()
Setup the default lookup table to use for categorical (not continuous) data.
void ComputeLabelWidth(vtkContext2D *painter)
Compute the width of our longest row label and the width of our longest column label.
virtual bool IsDirty()
This function returns a bool indicating whether or not we need to rebuild our cached data before pain...
a simple class to control print indentation
map scalar values into colors via a lookup table
Wrapper around std::string to keep symbols short.
a vtkAbstractArray subclass for strings
A table, which contains similar-typed columns of data.
An array holding vtkVariants.