VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkHeatmapItem Class Reference

A 2D graphics item for rendering a heatmap. More...

#include <vtkHeatmapItem.h>

Inheritance diagram for vtkHeatmapItem:
Inheritance graph
[legend]
Collaboration diagram for vtkHeatmapItem:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkContextItem Superclass
enum  { LEFT_TO_RIGHT, UP_TO_DOWN, RIGHT_TO_LEFT, DOWN_TO_UP }

Public Member Functions

virtual int IsA (const char *type)
vtkHeatmapItemNewInstance () const
virtual void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetTable (vtkTable *table)
vtkTableGetTable ()
void SetOrientation (int orientation)
int GetOrientation ()
double GetTextAngleForOrientation (int orientation)
virtual void GetBounds (double bounds[4])
void MarkRowAsBlank (std::string rowName)
virtual bool Paint (vtkContext2D *painter)
virtual bool Hit (const vtkContextMouseEvent &mouse)
virtual bool MouseMoveEvent (const vtkContextMouseEvent &event)
virtual bool MouseDoubleClickEvent (const vtkContextMouseEvent &event)
virtual void SetPosition (float, float)
void SetPosition (float[2])
void SetPosition (const vtkVector2f &pos)
virtual floatGetPosition ()
virtual void GetPosition (float &, float &)
virtual void GetPosition (float[2])
vtkVector2f GetPositionVector ()
virtual double GetCellHeight ()
virtual void SetCellHeight (double)
virtual double GetCellWidth ()
virtual void SetCellWidth (double)
virtual float GetRowLabelWidth ()
virtual float GetColumnLabelWidth ()

Static Public Member Functions

static vtkHeatmapItemNew ()
static int IsTypeOf (const char *type)
static vtkHeatmapItemSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkHeatmapItem ()
 ~vtkHeatmapItem ()
virtual void RebuildBuffers ()
virtual void PaintBuffers (vtkContext2D *painter)
virtual bool IsDirty ()
void InitializeLookupTables ()
void AccumulateProminentCategoricalDataValues (vtkIdType column)
void GenerateContinuousDataLookupTable ()
void GenerateCategoricalDataLookupTable ()
std::string GetTooltipText (float x, float y)
void UpdateVisibleSceneExtent (vtkContext2D *painter)
bool LineIsVisible (double x0, double y0, double x1, double y1)
void ComputeBounds ()
void ComputeLabelWidth (vtkContext2D *painter)
void PositionColorLegend (int orientation)
void PositionLegends (int orientation)

Protected Attributes

vtkVector2f PositionVector
floatPosition
vtkSmartPointer< vtkTableTable

Detailed Description

A 2D graphics item for rendering a heatmap.

This item draws a heatmap as a part of a vtkContextScene.

.SEE ALSO vtkTable

Tests:
vtkHeatmapItem (Tests)

Definition at line 50 of file vtkHeatmapItem.h.


Member Typedef Documentation

Reimplemented from vtkContextItem.

Definition at line 54 of file vtkHeatmapItem.h.


Member Enumeration Documentation

anonymous enum

Enum for Orientation.

Enumerator:
LEFT_TO_RIGHT 
UP_TO_DOWN 
RIGHT_TO_LEFT 
DOWN_TO_UP 

Definition at line 120 of file vtkHeatmapItem.h.


Constructor & Destructor Documentation


Member Function Documentation

static vtkHeatmapItem* vtkHeatmapItem::New ( ) [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

static int vtkHeatmapItem::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkContextItem.

virtual int vtkHeatmapItem::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkContextItem.

Reimplemented from vtkContextItem.

virtual vtkObjectBase* vtkHeatmapItem::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkContextItem.

Reimplemented from vtkContextItem.

virtual void vtkHeatmapItem::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkContextItem.

virtual void vtkHeatmapItem::SetTable ( vtkTable table) [virtual]

Set the table that this item draws. The first column of the table must contain the names of the rows.

Get the table that this item draws.

void vtkHeatmapItem::SetOrientation ( int  orientation)

Set which way the table should face within the visualization.

Get the current heatmap orientation.

Get the angle that row labels should be rotated for the correponding heatmap orientation. For the default orientation (LEFT_TO_RIGHT), this is 0 degrees.

virtual void vtkHeatmapItem::SetPosition ( float  ,
float   
) [virtual]

Set the position of the heatmap.

Set the position of the heatmap.

Set the position of the heatmap.

virtual float* vtkHeatmapItem::GetPosition ( ) [virtual]

Get position of the heatmap.

virtual void vtkHeatmapItem::GetPosition ( float ,
float  
) [virtual]

Get position of the heatmap.

virtual void vtkHeatmapItem::GetPosition ( float  [2]) [virtual]

Get position of the heatmap.

Get position of the heatmap.

virtual double vtkHeatmapItem::GetCellHeight ( ) [virtual]

Get/Set the height of the cells in our heatmap. Default is 18 pixels.

virtual void vtkHeatmapItem::SetCellHeight ( double  ) [virtual]

Get/Set the height of the cells in our heatmap. Default is 18 pixels.

virtual double vtkHeatmapItem::GetCellWidth ( ) [virtual]

Get/Set the width of the cells in our heatmap. Default is 36 pixels.

virtual void vtkHeatmapItem::SetCellWidth ( double  ) [virtual]

Get/Set the width of the cells in our heatmap. Default is 36 pixels.

virtual void vtkHeatmapItem::GetBounds ( double  bounds[4]) [virtual]

Get the bounds for this item as (Xmin,Xmax,Ymin,Ymax).

void vtkHeatmapItem::MarkRowAsBlank ( std::string  rowName)

Mark a row as blank, meaning that no cells will be drawn for it. Used by vtkTreeHeatmapItem to represent missing data.

virtual bool vtkHeatmapItem::Paint ( vtkContext2D painter) [virtual]

Paints the table as a heatmap.

Reimplemented from vtkAbstractContextItem.

virtual float vtkHeatmapItem::GetRowLabelWidth ( ) [virtual]

Get the width of the largest row or column label drawn by this heatmap.

Get the width of the largest row or column label drawn by this heatmap.

virtual bool vtkHeatmapItem::Hit ( const vtkContextMouseEvent mouse) [virtual]

Returns true if the transform is interactive, false otherwise.

Reimplemented from vtkAbstractContextItem.

virtual bool vtkHeatmapItem::MouseMoveEvent ( const vtkContextMouseEvent event) [virtual]

Display a tooltip when the user mouses over a cell in the heatmap.

Reimplemented from vtkAbstractContextItem.

virtual bool vtkHeatmapItem::MouseDoubleClickEvent ( const vtkContextMouseEvent event) [virtual]

Display a legend for a column of data.

Reimplemented from vtkAbstractContextItem.

virtual void vtkHeatmapItem::RebuildBuffers ( ) [protected, virtual]

Generate some data needed for painting. We cache this information as it only needs to be generated when the input data changes.

virtual void vtkHeatmapItem::PaintBuffers ( vtkContext2D painter) [protected, virtual]

This function does the bulk of the actual work in rendering our heatmap.

virtual bool vtkHeatmapItem::IsDirty ( ) [protected, virtual]

This function returns a bool indicating whether or not we need to rebuild our cached data before painting.

Generate a separate vtkLookupTable for each column in the table.

Helper function. Find the prominent, distinct values in the specified column of strings and add it to our "master list" of categorical values. This list is then used to generate a vtkLookupTable for all categorical data within the heatmap.

Setup the default lookup table to use for continuous (not categorical) data.

Setup the default lookup table to use for categorical (not continuous) data.

std::string vtkHeatmapItem::GetTooltipText ( float  x,
float  y 
) [protected]

Get the value for the cell of the heatmap located at scene position (x, y) This function assumes the caller has already determined that (x, y) falls within the heatmap.

void vtkHeatmapItem::UpdateVisibleSceneExtent ( vtkContext2D painter) [protected]

Calculate the extent of the data that is visible within the window. This information is used to ensure that we only draw details that will be seen by the user. This improves rendering speed, particularly for larger data.

bool vtkHeatmapItem::LineIsVisible ( double  x0,
double  y0,
double  x1,
double  y1 
) [protected]

Returns true if any part of the line segment defined by endpoints (x0, y0), (x1, y1) falls within the extent of the currently visible scene. Returns false otherwise.

void vtkHeatmapItem::ComputeBounds ( ) [protected]

Compute the extent of the heatmap. This does not include the text labels.

void vtkHeatmapItem::ComputeLabelWidth ( vtkContext2D painter) [protected]

Compute the width of our longest row label and the width of our longest column label. These values are used by GetBounds().

void vtkHeatmapItem::PositionColorLegend ( int  orientation) [protected]
void vtkHeatmapItem::PositionLegends ( int  orientation) [protected]

Member Data Documentation

Definition at line 144 of file vtkHeatmapItem.h.

Definition at line 145 of file vtkHeatmapItem.h.

Definition at line 208 of file vtkHeatmapItem.h.


The documentation for this class was generated from the following file: