27 #ifndef vtkDendrogramItem_h
28 #define vtkDendrogramItem_h
31 #include "vtkViewsInfovisModule.h"
39 VTK_ABI_NAMESPACE_BEGIN
59 virtual void SetTree(
vtkTree* tree);
72 void CollapseToNumberOfLeafNodes(
unsigned int n);
84 void SetColorArray(
const char* arrayName);
93 vtkSetMacro(ExtendLeafNodes,
bool);
94 vtkGetMacro(ExtendLeafNodes,
bool);
95 vtkBooleanMacro(ExtendLeafNodes,
bool);
107 int GetOrientation();
121 double GetTextAngleForOrientation(
int orientation);
128 vtkSetMacro(DrawLabels,
bool);
129 vtkGetMacro(DrawLabels,
bool);
130 vtkBooleanMacro(DrawLabels,
bool);
137 vtkSetVector2Macro(
Position,
float);
145 vtkGetVector2Macro(
Position,
float);
154 vtkGetMacro(LeafSpacing,
double);
155 vtkSetMacro(LeafSpacing,
double);
170 virtual void GetBounds(
double bounds[4]);
180 float GetLabelWidth();
198 vtkGetMacro(LineWidth,
float);
199 vtkSetMacro(LineWidth,
float);
207 vtkSetMacro(DisplayNumberOfCollapsedLeafNodes,
bool);
208 vtkGetMacro(DisplayNumberOfCollapsedLeafNodes,
bool);
209 vtkBooleanMacro(DisplayNumberOfCollapsedLeafNodes,
bool);
287 virtual void RebuildBuffers();
298 virtual bool IsDirty();
304 void ComputeMultipliers();
309 void ComputeBounds();
314 void CountLeafNodes();
324 vtkIdType GetClosestVertex(
double x,
double y);
352 vtkIdType GetClickedCollapsedSubTree(
double x,
double y);
367 bool LineIsVisible(
double x0,
double y0,
double x1,
double y1);
376 void PositionColorLegend();
395 int NumberOfLeafNodes;
402 double SceneBottomLeft[3];
403 double SceneTopRight[3];
407 bool ExtendLeafNodes;
409 bool DisplayNumberOfCollapsedLeafNodes;
410 bool LegendPositionSet;
415 VTK_ABI_NAMESPACE_END
vtkSmartPointer< vtkTree > LayoutTree
Wrapper around std::string to keep symbols short.
void GetBounds(T a, double bds[6])
A 2D graphics item for rendering a tree as a dendrogram.
vtkSmartPointer< vtkTree > Tree
vtkTypeUInt32 vtkMTimeType
base class for items that are part of a vtkContextScene.
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
struct Position_t Position
map scalar values into colors via a lookup table
Legend item to display vtkScalarsToColors.
dynamic, self-adjusting array of double
Class for drawing 2D primitives to a graphical context.
data structure to represent mouse events.
a simple class to control print indentation
layout a graph in 2 or 3 dimensions
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool operator()(WeightedVertex &v1, WeightedVertex &v2)
vtkVector2f PositionVector
virtual bool Hit(const vtkContextMouseEvent &mouse)
Return true if the supplied x, y coordinate is inside the item.
prune a subtree out of a vtkTree
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
A rooted tree data structure.
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse)
Mouse button double click event.