20#ifndef vtkTanglegramItem_h 
   21#define vtkTanglegramItem_h 
   23#include "vtkViewsInfovisModule.h"  
   29VTK_ABI_NAMESPACE_BEGIN
 
   70  vtkGetStringMacro(Tree1Label);
 
   71  vtkSetStringMacro(Tree1Label);
 
   78  vtkGetStringMacro(Tree2Label);
 
   79  vtkSetStringMacro(Tree2Label);
 
  100  vtkGetMacro(MinimumVisibleFontSize, 
int);
 
  101  vtkSetMacro(MinimumVisibleFontSize, 
int);
 
  111  vtkGetMacro(LabelSizeDifference, 
int);
 
  112  vtkSetMacro(LabelSizeDifference, 
int);
 
  119  vtkGetMacro(CorrespondenceLineWidth, 
float);
 
  120  vtkSetMacro(CorrespondenceLineWidth, 
float);
 
  206  double Tree1Bounds[4];
 
  207  double Tree2Bounds[4];
 
  216  int MinimumVisibleFontSize;
 
  217  int LabelSizeDifference;
 
  218  float CorrespondenceLineWidth;
 
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 tree as a dendrogram.
 
a simple class to control print indentation
 
map scalar values into colors via a lookup table
 
Hold a reference to a vtkObjectBase instance.
 
a vtkAbstractArray subclass for strings
 
A table, which contains similar-typed columns of data.
 
Display two related trees.
 
void RefreshBuffers(vtkContext2D *painter)
Update the bounds of our two dendrograms.
 
void ReorderTree()
Reorder the children of tree #2 to minimize the amount of crossings in our tanglegram.
 
bool MouseDoubleClickEvent(const vtkContextMouseEvent &event) override
Propagate any double click onto the dendrograms to check if any subtrees should be collapsed or expan...
 
void SetTable(vtkTable *table)
Get/Set the table that describes the correspondences between the two trees.
 
int GetOrientation()
Get the current orientation.
 
bool Hit(const vtkContextMouseEvent &mouse) override
Returns true if the transform is interactive, false otherwise.
 
void PaintTreeLabels(vtkContext2D *painter)
Draw the labels of our two dendrograms.
 
void ReorderTreeAtVertex(vtkIdType parent, vtkTree *tree)
Helper function used by ReorderTree.
 
void PositionTree2()
Calculate and set an appropriate position for our second dendrogram.
 
void SetTreeLineWidth(float width)
Get/Set how wide the edges of the trees should be.
 
static vtkTanglegramItem * New()
 
~vtkTanglegramItem() override
 
void GenerateLookupTable()
Initialize the lookup table used to color the lines between the two dendrograms.
 
void PaintCorrespondenceLines(vtkContext2D *painter)
Draw the lines between the corresponding vertices of our two dendrograms.
 
float GetTreeLineWidth()
Get/Set how wide the edges of the trees should be.
 
bool Paint(vtkContext2D *painter) override
Paints the tree & associated table as a heatmap.
 
double GetPositionScoreForVertex(vtkIdType vertex, vtkTree *tree)
Helper function used by ReorderTreeAtVertex.
 
virtual void SetTree1(vtkTree *tree)
Set the first tree.
 
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
 
void SetOrientation(int orientation)
Set which way the tanglegram should face within the visualization.
 
vtkTable * GetTable()
Get/Set the table that describes the correspondences between the two trees.
 
virtual void SetTree2(vtkTree *tree)
Set the second tree.
 
A rooted tree data structure.