VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkTreeHeatmapItem Class Reference

A 2D graphics item for rendering a tree and an associated heatmap. More...

#include <vtkTreeHeatmapItem.h>

Inheritance diagram for vtkTreeHeatmapItem:
[legend]
Collaboration diagram for vtkTreeHeatmapItem:
[legend]

Public Types

typedef vtkContextItem Superclass
 
- Public Types inherited from vtkContextItem
typedef vtkAbstractContextItem Superclass
 
- Public Types inherited from vtkAbstractContextItem
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkTreeHeatmapItemNewInstance () const
 
virtual void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void SetTree (vtkTree *tree)
 
vtkTreeGetTree ()
 
virtual void SetColumnTree (vtkTree *tree)
 
vtkTreeGetColumnTree ()
 
virtual void SetTable (vtkTable *table)
 
vtkTableGetTable ()
 
void ReorderTable ()
 
void ReverseTableRows ()
 
void ReverseTableColumns ()
 
void SetOrientation (int orientation)
 
int GetOrientation ()
 
void GetBounds (double bounds[4])
 
void GetCenter (double center[2])
 
void GetSize (double size[2])
 
void CollapseToNumberOfLeafNodes (unsigned int n)
 
vtkTreeGetPrunedTree ()
 
void SetTreeColorArray (const char *arrayName)
 
virtual bool Hit (const vtkContextMouseEvent &mouse)
 
virtual bool MouseDoubleClickEvent (const vtkContextMouseEvent &event)
 
vtkDendrogramItemGetDendrogram ()
 
void SetDendrogram (vtkDendrogramItem *dendrogram)
 
vtkHeatmapItemGetHeatmap ()
 
void SetHeatmap (vtkHeatmapItem *heatmap)
 
float GetTreeLineWidth ()
 
void SetTreeLineWidth (float width)
 
- Public Member Functions inherited from vtkContextItem
vtkContextItemNewInstance () const
 
virtual double GetOpacity ()
 
virtual void SetOpacity (double)
 
- Public Member Functions inherited from vtkAbstractContextItem
vtkAbstractContextItemNewInstance () const
 
virtual void Update ()
 
virtual bool PaintChildren (vtkContext2D *painter)
 
virtual void ReleaseGraphicsResources ()
 
unsigned int AddItem (vtkAbstractContextItem *item)
 
bool RemoveItem (vtkAbstractContextItem *item)
 
bool RemoveItem (unsigned int index)
 
vtkAbstractContextItemGetItem (unsigned int index)
 
unsigned int GetItemIndex (vtkAbstractContextItem *item)
 
unsigned int GetNumberOfItems ()
 
void ClearItems ()
 
unsigned int Raise (unsigned int index)
 
unsigned int Lower (unsigned int index)
 
virtual vtkAbstractContextItemGetPickedItem (const vtkContextMouseEvent &mouse)
 
virtual bool MouseEnterEvent (const vtkContextMouseEvent &mouse)
 
virtual bool MouseMoveEvent (const vtkContextMouseEvent &mouse)
 
virtual bool MouseLeaveEvent (const vtkContextMouseEvent &mouse)
 
virtual bool MouseButtonPressEvent (const vtkContextMouseEvent &mouse)
 
virtual bool MouseButtonReleaseEvent (const vtkContextMouseEvent &mouse)
 
virtual bool MouseWheelEvent (const vtkContextMouseEvent &mouse, int delta)
 
virtual bool KeyPressEvent (const vtkContextKeyEvent &key)
 
virtual void SetScene (vtkContextScene *scene)
 
virtual void SetParent (vtkAbstractContextItem *parent)
 
virtual vtkVector2f MapToParent (const vtkVector2f &point)
 
virtual vtkVector2f MapFromParent (const vtkVector2f &point)
 
virtual vtkVector2f MapToScene (const vtkVector2f &point)
 
virtual vtkVector2f MapFromScene (const vtkVector2f &point)
 
virtual unsigned int StackAbove (unsigned int index, unsigned int under)
 
virtual unsigned int StackUnder (unsigned int child, unsigned int above)
 
virtual bool KeyReleaseEvent (const vtkContextKeyEvent &key)
 
vtkContextSceneGetScene ()
 
vtkAbstractContextItemGetParent ()
 
virtual bool GetVisible ()
 
virtual void SetVisible (bool)
 
virtual bool GetInteractive ()
 
virtual void SetInteractive (bool)
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkTreeHeatmapItemNew ()
 
static int IsTypeOf (const char *type)
 
static vtkTreeHeatmapItemSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkContextItem
static int IsTypeOf (const char *type)
 
static vtkContextItemSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAbstractContextItem
static int IsTypeOf (const char *type)
 
static vtkAbstractContextItemSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkTreeHeatmapItem ()
 
 ~vtkTreeHeatmapItem ()
 
virtual bool Paint (vtkContext2D *painter)
 
void CollapseHeatmapRows ()
 
void CollapseHeatmapColumns ()
 
- Protected Member Functions inherited from vtkContextItem
 vtkContextItem ()
 
 ~vtkContextItem ()
 
- Protected Member Functions inherited from vtkAbstractContextItem
 vtkAbstractContextItem ()
 
 ~vtkAbstractContextItem ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkSmartPointer< vtkDendrogramItemDendrogram
 
vtkSmartPointer< vtkDendrogramItemColumnDendrogram
 
vtkSmartPointer< vtkHeatmapItemHeatmap
 
int Orientation
 
- Protected Attributes inherited from vtkContextItem
double Opacity
 
- Protected Attributes inherited from vtkAbstractContextItem
vtkContextSceneScene
 
vtkAbstractContextItemParent
 
vtkContextScenePrivateChildren
 
bool Visible
 
bool Interactive
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

A 2D graphics item for rendering a tree and an associated heatmap.

This item draws a tree and a heatmap as a part of a vtkContextScene. The input tree's vertex data must contain at least two arrays. The first required array is a vtkStringArray called "node name". This array corresponds to the first column of the input table. The second required array is a scalar array called "node weight". This array is used by vtkTreeLayoutStrategy to set any particular node's distance from the root of the tree.

The vtkNewickTreeReader automatically initializes both of these required arrays in its output tree.

.SEE ALSO vtkDendrogramItem vtkHeatmapItem vtkTree vtkTable vtkNewickTreeReader

Tests:
vtkTreeHeatmapItem (Tests)

Definition at line 54 of file vtkTreeHeatmapItem.h.

Member Typedef Documentation

Definition at line 58 of file vtkTreeHeatmapItem.h.

Constructor & Destructor Documentation

vtkTreeHeatmapItem::vtkTreeHeatmapItem ( )
protected
vtkTreeHeatmapItem::~vtkTreeHeatmapItem ( )
protected

Member Function Documentation

static vtkTreeHeatmapItem* vtkTreeHeatmapItem::New ( )
static
static int vtkTreeHeatmapItem::IsTypeOf ( const char *  type)
static
virtual int vtkTreeHeatmapItem::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.

static vtkTreeHeatmapItem* vtkTreeHeatmapItem::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkTreeHeatmapItem::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkContextItem.

vtkTreeHeatmapItem* vtkTreeHeatmapItem::NewInstance ( ) const
virtual void vtkTreeHeatmapItem::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 vtkTreeHeatmapItem::SetTree ( vtkTree tree)
virtual

Set the tree that this item draws. Note that this tree's vertex data must contain a vtkStringArray called "node name". Additionally, this array must contain the same values as the first column of the input table. See SetTable for more information. The vtkNewickTreeReader automatically creates this required array for you.

vtkTree* vtkTreeHeatmapItem::GetTree ( )

Get the tree that this item draws.

virtual void vtkTreeHeatmapItem::SetColumnTree ( vtkTree tree)
virtual

Set a tree to be drawn for the columns of the heatmap. This tree's vertex data must contain a vtkStringArray called "node name" that corresponds to the names of the columns in the heatmap.

vtkTree* vtkTreeHeatmapItem::GetColumnTree ( )

Get the tree that represents the columns of the heatmap (if one has been set).

virtual void vtkTreeHeatmapItem::SetTable ( vtkTable table)
virtual

Set the table that this item draws. The first column of the table must contain the names of the rows. These names, in turn, must correspond with the nodes names in the input tree. See SetTree for more information.

vtkTable* vtkTreeHeatmapItem::GetTable ( )

Get the table that this item draws.

vtkDendrogramItem* vtkTreeHeatmapItem::GetDendrogram ( )

Get/Set the dendrogram contained by this item.

void vtkTreeHeatmapItem::SetDendrogram ( vtkDendrogramItem dendrogram)

Get/Set the dendrogram contained by this item.

vtkHeatmapItem* vtkTreeHeatmapItem::GetHeatmap ( )

Get/Set the heatmap contained by this item.

void vtkTreeHeatmapItem::SetHeatmap ( vtkHeatmapItem heatmap)

Get/Set the heatmap contained by this item.

void vtkTreeHeatmapItem::ReorderTable ( )

Reorder the rows in the table so they match the order of the leaf nodes in our tree.

void vtkTreeHeatmapItem::ReverseTableRows ( )

Reverse the order of the rows in our input table. This is used to simplify the table layout for DOWN_TO_UP and RIGHT_TO_LEFT orientations.

void vtkTreeHeatmapItem::ReverseTableColumns ( )

Reverse the order of the rows in our input table. This is used to simplify the table layout for DOWN_TO_UP and UP_TO_DOWN orientations.

void vtkTreeHeatmapItem::SetOrientation ( int  orientation)

Set which way the tree / heatmap should face within the visualization. The default is for both components to be drawn left to right.

int vtkTreeHeatmapItem::GetOrientation ( )

Get the current orientation.

void vtkTreeHeatmapItem::GetBounds ( double  bounds[4])

Get the bounds of this item (xMin, xMax, yMin, Max) in pixel coordinates.

void vtkTreeHeatmapItem::GetCenter ( double  center[2])

Get the center point of this item in pixel coordinates.

void vtkTreeHeatmapItem::GetSize ( double  size[2])

Get the size of this item in pixel coordinates.

void vtkTreeHeatmapItem::CollapseToNumberOfLeafNodes ( unsigned int  n)

Collapse subtrees until there are only n leaf nodes left in the tree. The leaf nodes that remain are those that are closest to the root. Any subtrees that were collapsed prior to this function being called may be re-expanded. Use this function instead of this->GetDendrogram->CollapseToNumberOfLeafNodes(), as this function also handles the hiding of heatmap rows that correspond to newly collapsed subtrees.

float vtkTreeHeatmapItem::GetTreeLineWidth ( )

Get/Set how wide the edges of the trees should be. Default is one pixel.

void vtkTreeHeatmapItem::SetTreeLineWidth ( float  width)

Get/Set how wide the edges of the trees should be. Default is one pixel.

vtkTree* vtkTreeHeatmapItem::GetPrunedTree ( )

Deprecated. Use this->GetDendrogram()->GetPrunedTree() instead.

void vtkTreeHeatmapItem::SetTreeColorArray ( const char *  arrayName)

Deprecated. Use this->GetDendrogram()->SetColorArray(const char arrayName) instead.

virtual bool vtkTreeHeatmapItem::Hit ( const vtkContextMouseEvent mouse)
virtual

Returns true if the transform is interactive, false otherwise.

Reimplemented from vtkAbstractContextItem.

virtual bool vtkTreeHeatmapItem::MouseDoubleClickEvent ( const vtkContextMouseEvent event)
virtual

Propagate any double click onto the dendrogram to check if any subtrees should be collapsed or expanded.

Reimplemented from vtkAbstractContextItem.

virtual bool vtkTreeHeatmapItem::Paint ( vtkContext2D painter)
protectedvirtual

Paints the tree & associated table as a heatmap.

Reimplemented from vtkAbstractContextItem.

void vtkTreeHeatmapItem::CollapseHeatmapRows ( )
protected

Mark heatmap rows as hidden when a subtree is collapsed.

void vtkTreeHeatmapItem::CollapseHeatmapColumns ( )
protected

Mark heatmap columns as hidden when a subtree is collapsed.

Member Data Documentation

vtkSmartPointer<vtkDendrogramItem> vtkTreeHeatmapItem::Dendrogram
protected

Definition at line 179 of file vtkTreeHeatmapItem.h.

vtkSmartPointer<vtkDendrogramItem> vtkTreeHeatmapItem::ColumnDendrogram
protected

Definition at line 180 of file vtkTreeHeatmapItem.h.

vtkSmartPointer<vtkHeatmapItem> vtkTreeHeatmapItem::Heatmap
protected

Definition at line 181 of file vtkTreeHeatmapItem.h.

int vtkTreeHeatmapItem::Orientation
protected

Definition at line 182 of file vtkTreeHeatmapItem.h.


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