VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
vtkTanglegramItem Class Reference

Display two related trees. More...

#include <vtkTanglegramItem.h>

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

List of all members.

Public Types

typedef vtkContextItem Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkTanglegramItemNewInstance () const
virtual void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetTree1 (vtkTree *tree)
virtual void SetTree2 (vtkTree *tree)
void SetOrientation (int orientation)
int GetOrientation ()
virtual bool Hit (const vtkContextMouseEvent &mouse)
virtual bool MouseDoubleClickEvent (const vtkContextMouseEvent &event)
vtkTableGetTable ()
void SetTable (vtkTable *table)
virtual char * GetTree1Label ()
virtual void SetTree1Label (const char *)
virtual char * GetTree2Label ()
virtual void SetTree2Label (const char *)
virtual int GetMinimumVisibleFontSize ()
virtual void SetMinimumVisibleFontSize (int)
virtual int GetLabelSizeDifference ()
virtual void SetLabelSizeDifference (int)
virtual float GetCorrespondenceLineWidth ()
virtual void SetCorrespondenceLineWidth (float)
float GetTreeLineWidth ()
void SetTreeLineWidth (float width)

Static Public Member Functions

static vtkTanglegramItemNew ()
static int IsTypeOf (const char *type)
static vtkTanglegramItemSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkTanglegramItem ()
 ~vtkTanglegramItem ()
void RefreshBuffers (vtkContext2D *painter)
void PositionTree2 ()
void PaintCorrespondenceLines (vtkContext2D *painter)
void PaintTreeLabels (vtkContext2D *painter)
void ReorderTree ()
void ReorderTreeAtVertex (vtkIdType parent, vtkTree *tree)
double GetPositionScoreForVertex (vtkIdType vertex, vtkTree *tree)
void GenerateLookupTable ()
virtual bool Paint (vtkContext2D *painter)

Detailed Description

Display two related trees.

This item draws two trees with connections between their leaf nodes. Use SetTable() to specify what leaf nodes correspond to one another between the two trees. See the documentation for this function for more details on how this table should be formatted.

.SEE ALSO vtkTree vtkTable vtkDendrogramItem vtkNewickTreeReader

Tests:
vtkTanglegramItem (Tests)

Definition at line 45 of file vtkTanglegramItem.h.


Member Typedef Documentation

Reimplemented from vtkContextItem.

Definition at line 49 of file vtkTanglegramItem.h.


Constructor & Destructor Documentation


Member Function Documentation

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

Reimplemented from vtkObject.

static int vtkTanglegramItem::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 vtkTanglegramItem::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* vtkTanglegramItem::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkContextItem.

Reimplemented from vtkContextItem.

virtual void vtkTanglegramItem::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 vtkTanglegramItem::SetTree1 ( vtkTree tree) [virtual]

Set the first tree

virtual void vtkTanglegramItem::SetTree2 ( vtkTree tree) [virtual]

Set the second tree

Get/Set the table that describes the correspondences between the two trees. The first column should contain the names of the leaf nodes from tree #1. The columns of this table should be named after the leaf nodes of tree #2. A non-zero cell should be used to create a connection between the two trees. Different numbers in the table will result in connections being drawn in different colors.

Get/Set the table that describes the correspondences between the two trees. The first column should contain the names of the leaf nodes from tree #1. The columns of this table should be named after the leaf nodes of tree #2. A non-zero cell should be used to create a connection between the two trees. Different numbers in the table will result in connections being drawn in different colors.

virtual char* vtkTanglegramItem::GetTree1Label ( ) [virtual]

Get/Set the label for tree #1.

virtual void vtkTanglegramItem::SetTree1Label ( const char *  ) [virtual]

Get/Set the label for tree #1.

virtual char* vtkTanglegramItem::GetTree2Label ( ) [virtual]

Get/Set the label for tree #2.

virtual void vtkTanglegramItem::SetTree2Label ( const char *  ) [virtual]

Get/Set the label for tree #2.

void vtkTanglegramItem::SetOrientation ( int  orientation)

Set which way the tanglegram should face within the visualization. The default is for tree #1 to be drawn left to right.

Get the current orientation.

Get/Set the smallest font size that is still considered legible. If the current zoom level requires our vertex labels to be smaller than this size the labels will not be drawn at all. Default value is 8 pt.

virtual void vtkTanglegramItem::SetMinimumVisibleFontSize ( int  ) [virtual]

Get/Set the smallest font size that is still considered legible. If the current zoom level requires our vertex labels to be smaller than this size the labels will not be drawn at all. Default value is 8 pt.

Get/Set how much larger the dendrogram labels should be compared to the vertex labels. Because the vertex labels automatically resize based on zoom levels, this is a relative (not absolute) size. Default value is 4 pts larger than the vertex labels.

virtual void vtkTanglegramItem::SetLabelSizeDifference ( int  ) [virtual]

Get/Set how much larger the dendrogram labels should be compared to the vertex labels. Because the vertex labels automatically resize based on zoom levels, this is a relative (not absolute) size. Default value is 4 pts larger than the vertex labels.

Get/Set how wide the correspondence lines should be. Default is two pixels.

Get/Set how wide the correspondence lines should be. Default is two pixels.

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

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

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

Returns true if the transform is interactive, false otherwise.

Reimplemented from vtkAbstractContextItem.

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

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

Reimplemented from vtkAbstractContextItem.

void vtkTanglegramItem::RefreshBuffers ( vtkContext2D painter) [protected]

Update the bounds of our two dendrograms.

void vtkTanglegramItem::PositionTree2 ( ) [protected]

Calculate and set an appropriate position for our second dendrogram.

Draw the lines between the corresponding vertices of our two dendrograms.

void vtkTanglegramItem::PaintTreeLabels ( vtkContext2D painter) [protected]

Draw the labels of our two dendrograms.

void vtkTanglegramItem::ReorderTree ( ) [protected]

Reorder the children of tree #2 to minimize the amount of crossings in our tanglegram.

void vtkTanglegramItem::ReorderTreeAtVertex ( vtkIdType  parent,
vtkTree tree 
) [protected]

Helper function used by ReorderTree. Rearrange the children of the specified parent vertex in order to minimize tanglegram crossings.

Helper function used by ReorderTreeAtVertex. Get the average height of the vertices that correspond to the vertex parameter. This information is used to determine what order sibling vertices should have within the tree.

Initialize the lookup table used to color the lines between the two dendrograms.

virtual bool vtkTanglegramItem::Paint ( vtkContext2D painter) [protected, virtual]

Paints the tree & associated table as a heatmap.

Reimplemented from vtkAbstractContextItem.


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