/usr/include/vtk-6.3/vtkTreeHeatmapItem.h is in libvtk6-dev 6.3.0+dfsg1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkTreeHeatmapItem.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkTreeHeatmapItem - A 2D graphics item for rendering a tree and
// an associated heatmap.
//
// .SECTION Description
// 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
#ifndef vtkTreeHeatmapItem_h
#define vtkTreeHeatmapItem_h
#include "vtkViewsInfovisModule.h" // For export macro
#include "vtkContextItem.h"
#include "vtkNew.h" // For vtkNew ivars
#include "vtkSmartPointer.h" // For vtkSmartPointer ivars
#include <vector> // For lookup tables
#include <map> // For string lookup tables
class vtkDendrogramItem;
class vtkHeatmapItem;
class vtkTable;
class vtkTree;
class VTKVIEWSINFOVIS_EXPORT vtkTreeHeatmapItem : public vtkContextItem
{
public:
static vtkTreeHeatmapItem *New();
vtkTypeMacro(vtkTreeHeatmapItem, vtkContextItem);
virtual void PrintSelf(ostream &os, vtkIndent indent);
// Description:
// 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.
virtual void SetTree(vtkTree *tree);
// Description:
// Get the tree that this item draws.
vtkTree * GetTree();
// Description:
// 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.
virtual void SetColumnTree(vtkTree *tree);
// Description:
// Get the tree that represents the columns of the heatmap (if one has
// been set).
vtkTree * GetColumnTree();
// Description:
// 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.
virtual void SetTable(vtkTable *table);
// Description:
// Get the table that this item draws.
vtkTable * GetTable();
// Description:
// Get/Set the dendrogram contained by this item.
vtkDendrogramItem * GetDendrogram();
void SetDendrogram(vtkDendrogramItem *dendrogram);
// Description:
// Get/Set the heatmap contained by this item.
vtkHeatmapItem * GetHeatmap();
void SetHeatmap(vtkHeatmapItem *heatmap);
// Description:
// Reorder the rows in the table so they match the order of the leaf
// nodes in our tree.
void ReorderTable();
// Description:
// 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 ReverseTableRows();
// Description:
// 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 ReverseTableColumns();
// Description:
// Set which way the tree / heatmap should face within the visualization.
// The default is for both components to be drawn left to right.
void SetOrientation(int orientation);
// Description:
// Get the current orientation.
int GetOrientation();
// Description:
// Get the bounds of this item (xMin, xMax, yMin, Max) in pixel coordinates.
void GetBounds(double bounds[4]);
// Description:
// Get the center point of this item in pixel coordinates.
void GetCenter(double center[2]);
// Description:
// Get the size of this item in pixel coordinates.
void GetSize(double size[2]);
// Description:
// 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.
void CollapseToNumberOfLeafNodes(unsigned int n);
// Description:
// Get/Set how wide the edges of the trees should be. Default is one pixel.
float GetTreeLineWidth();
void SetTreeLineWidth(float width);
// Description:
// Deprecated. Use this->GetDendrogram()->GetPrunedTree() instead.
vtkTree * GetPrunedTree();
// Description:
// Deprecated. Use this->GetDendrogram()->SetColorArray(const char *arrayName)
// instead.
void SetTreeColorArray(const char *arrayName);
//BTX
// Description:
// Returns true if the transform is interactive, false otherwise.
virtual bool Hit(const vtkContextMouseEvent &mouse);
// Description:
// Propagate any double click onto the dendrogram to check if any
// subtrees should be collapsed or expanded.
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &event);
//ETX
protected:
vtkTreeHeatmapItem();
~vtkTreeHeatmapItem();
// Description:
// Paints the tree & associated table as a heatmap.
virtual bool Paint(vtkContext2D *painter);
// Description:
// Mark heatmap rows as hidden when a subtree is collapsed.
void CollapseHeatmapRows();
// Description:
// Mark heatmap columns as hidden when a subtree is collapsed.
void CollapseHeatmapColumns();
vtkSmartPointer<vtkDendrogramItem> Dendrogram;
vtkSmartPointer<vtkDendrogramItem> ColumnDendrogram;
vtkSmartPointer<vtkHeatmapItem> Heatmap;
int Orientation;
private:
vtkTreeHeatmapItem(const vtkTreeHeatmapItem&); // Not implemented
void operator=(const vtkTreeHeatmapItem&); // Not implemented
unsigned long TreeHeatmapBuildTime;
};
#endif
|