VTK
|
Display two related trees. More...
#include <vtkTanglegramItem.h>
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
Definition at line 45 of file vtkTanglegramItem.h.
Reimplemented from vtkContextItem.
Definition at line 49 of file vtkTanglegramItem.h.
vtkTanglegramItem::vtkTanglegramItem | ( | ) | [protected] |
vtkTanglegramItem::~vtkTanglegramItem | ( | ) | [protected] |
static vtkTanglegramItem* vtkTanglegramItem::New | ( | ) | [static] |
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.
static vtkTanglegramItem* vtkTanglegramItem::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkContextItem.
virtual vtkObjectBase* vtkTanglegramItem::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkContextItem.
vtkTanglegramItem* vtkTanglegramItem::NewInstance | ( | ) | const |
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.
void vtkTanglegramItem::SetTable | ( | vtkTable * | table | ) |
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.
virtual int vtkTanglegramItem::GetMinimumVisibleFontSize | ( | ) | [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.
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.
virtual int vtkTanglegramItem::GetLabelSizeDifference | ( | ) | [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.
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.
virtual float vtkTanglegramItem::GetCorrespondenceLineWidth | ( | ) | [virtual] |
Get/Set how wide the correspondence lines should be. Default is two pixels.
virtual void vtkTanglegramItem::SetCorrespondenceLineWidth | ( | float | ) | [virtual] |
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.
void vtkTanglegramItem::SetTreeLineWidth | ( | float | width | ) |
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.
void vtkTanglegramItem::PaintCorrespondenceLines | ( | vtkContext2D * | painter | ) | [protected] |
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.
double vtkTanglegramItem::GetPositionScoreForVertex | ( | vtkIdType | vertex, |
vtkTree * | tree | ||
) | [protected] |
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.
void vtkTanglegramItem::GenerateLookupTable | ( | ) | [protected] |
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.