VTK
|
A 2D graphics item for rendering a tree and an associated heatmap. More...
#include <vtkTreeHeatmapItem.h>
Public Types | |
typedef vtkContextItem | Superclass |
Public Types inherited from vtkContextItem | |
typedef vtkAbstractContextItem | Superclass |
Public Types inherited from vtkAbstractContextItem | |
typedef vtkObject | Superclass |
Public Types inherited from vtkObject | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkTreeHeatmapItem * | NewInstance () const |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | SetTree (vtkTree *tree) |
vtkTree * | GetTree () |
virtual void | SetColumnTree (vtkTree *tree) |
vtkTree * | GetColumnTree () |
virtual void | SetTable (vtkTable *table) |
vtkTable * | GetTable () |
void | ReorderTable () |
void | ReverseTableRows () |
void | ReverseTableColumns () |
void | SetOrientation (int orientation) |
int | GetOrientation () |
void | GetBounds (double bounds[4]) |
void | GetCenter (double center[2]) |
void | GetSize (double size[2]) |
void | CollapseToNumberOfLeafNodes (unsigned int n) |
vtkTree * | GetPrunedTree () |
void | SetTreeColorArray (const char *arrayName) |
virtual bool | Hit (const vtkContextMouseEvent &mouse) |
virtual bool | MouseDoubleClickEvent (const vtkContextMouseEvent &event) |
vtkDendrogramItem * | GetDendrogram () |
void | SetDendrogram (vtkDendrogramItem *dendrogram) |
vtkHeatmapItem * | GetHeatmap () |
void | SetHeatmap (vtkHeatmapItem *heatmap) |
float | GetTreeLineWidth () |
void | SetTreeLineWidth (float width) |
Public Member Functions inherited from vtkContextItem | |
vtkContextItem * | NewInstance () const |
virtual double | GetOpacity () |
virtual void | SetOpacity (double) |
Public Member Functions inherited from vtkAbstractContextItem | |
vtkAbstractContextItem * | NewInstance () const |
virtual void | Update () |
virtual bool | PaintChildren (vtkContext2D *painter) |
virtual void | ReleaseGraphicsResources () |
unsigned int | AddItem (vtkAbstractContextItem *item) |
bool | RemoveItem (vtkAbstractContextItem *item) |
bool | RemoveItem (unsigned int index) |
vtkAbstractContextItem * | GetItem (unsigned int index) |
unsigned int | GetItemIndex (vtkAbstractContextItem *item) |
unsigned int | GetNumberOfItems () |
void | ClearItems () |
unsigned int | Raise (unsigned int index) |
unsigned int | Lower (unsigned int index) |
virtual vtkAbstractContextItem * | GetPickedItem (const vtkContextMouseEvent &mouse) |
virtual bool | MouseEnterEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseMoveEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseLeaveEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseButtonPressEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseButtonReleaseEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseWheelEvent (const vtkContextMouseEvent &mouse, int delta) |
virtual bool | KeyPressEvent (const vtkContextKeyEvent &key) |
virtual void | SetScene (vtkContextScene *scene) |
virtual void | SetParent (vtkAbstractContextItem *parent) |
virtual vtkVector2f | MapToParent (const vtkVector2f &point) |
virtual vtkVector2f | MapFromParent (const vtkVector2f &point) |
virtual vtkVector2f | MapToScene (const vtkVector2f &point) |
virtual vtkVector2f | MapFromScene (const vtkVector2f &point) |
virtual unsigned int | StackAbove (unsigned int index, unsigned int under) |
virtual unsigned int | StackUnder (unsigned int child, unsigned int above) |
virtual bool | KeyReleaseEvent (const vtkContextKeyEvent &key) |
vtkContextScene * | GetScene () |
vtkAbstractContextItem * | GetParent () |
virtual bool | GetVisible () |
virtual void | SetVisible (bool) |
virtual bool | GetInteractive () |
virtual void | SetInteractive (bool) |
Public Member Functions inherited from vtkObject | |
vtkObject * | NewInstance () const |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static vtkTreeHeatmapItem * | New () |
static int | IsTypeOf (const char *type) |
static vtkTreeHeatmapItem * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkContextItem | |
static int | IsTypeOf (const char *type) |
static vtkContextItem * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkAbstractContextItem | |
static int | IsTypeOf (const char *type) |
static vtkAbstractContextItem * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkObject | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
Static Public Member Functions inherited from vtkObjectBase | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Protected Attributes | |
vtkSmartPointer< vtkDendrogramItem > | Dendrogram |
vtkSmartPointer< vtkDendrogramItem > | ColumnDendrogram |
vtkSmartPointer< vtkHeatmapItem > | Heatmap |
int | Orientation |
Protected Attributes inherited from vtkContextItem | |
double | Opacity |
Protected Attributes inherited from vtkAbstractContextItem | |
vtkContextScene * | Scene |
vtkAbstractContextItem * | Parent |
vtkContextScenePrivate * | Children |
bool | Visible |
bool | Interactive |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
A 2D graphics item for rendering a tree and an associated heatmap.
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
Definition at line 54 of file vtkTreeHeatmapItem.h.
Definition at line 58 of file vtkTreeHeatmapItem.h.
|
protected |
|
protected |
|
static |
|
static |
|
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 |
|
protectedvirtual |
Reimplemented from vtkContextItem.
vtkTreeHeatmapItem* vtkTreeHeatmapItem::NewInstance | ( | ) | const |
|
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 |
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.
vtkTree* vtkTreeHeatmapItem::GetTree | ( | ) |
Get the tree that this item draws.
|
virtual |
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.
vtkTree* vtkTreeHeatmapItem::GetColumnTree | ( | ) |
Get the tree that represents the columns of the heatmap (if one has been set).
|
virtual |
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.
vtkTable* vtkTreeHeatmapItem::GetTable | ( | ) |
Get the table that this item draws.
vtkDendrogramItem* vtkTreeHeatmapItem::GetDendrogram | ( | ) |
Get/Set the dendrogram contained by this item.
void vtkTreeHeatmapItem::SetDendrogram | ( | vtkDendrogramItem * | dendrogram | ) |
Get/Set the dendrogram contained by this item.
vtkHeatmapItem* vtkTreeHeatmapItem::GetHeatmap | ( | ) |
Get/Set the heatmap contained by this item.
void vtkTreeHeatmapItem::SetHeatmap | ( | vtkHeatmapItem * | heatmap | ) |
Get/Set the heatmap contained by this item.
void vtkTreeHeatmapItem::ReorderTable | ( | ) |
Reorder the rows in the table so they match the order of the leaf nodes in our tree.
void vtkTreeHeatmapItem::ReverseTableRows | ( | ) |
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 vtkTreeHeatmapItem::ReverseTableColumns | ( | ) |
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 vtkTreeHeatmapItem::SetOrientation | ( | int | orientation | ) |
Set which way the tree / heatmap should face within the visualization. The default is for both components to be drawn left to right.
int vtkTreeHeatmapItem::GetOrientation | ( | ) |
Get the current orientation.
void vtkTreeHeatmapItem::GetBounds | ( | double | bounds[4] | ) |
Get the bounds of this item (xMin, xMax, yMin, Max) in pixel coordinates.
void vtkTreeHeatmapItem::GetCenter | ( | double | center[2] | ) |
Get the center point of this item in pixel coordinates.
void vtkTreeHeatmapItem::GetSize | ( | double | size[2] | ) |
Get the size of this item in pixel coordinates.
void vtkTreeHeatmapItem::CollapseToNumberOfLeafNodes | ( | unsigned int | n | ) |
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.
float vtkTreeHeatmapItem::GetTreeLineWidth | ( | ) |
Get/Set how wide the edges of the trees should be. Default is one pixel.
void vtkTreeHeatmapItem::SetTreeLineWidth | ( | float | width | ) |
Get/Set how wide the edges of the trees should be. Default is one pixel.
vtkTree* vtkTreeHeatmapItem::GetPrunedTree | ( | ) |
Deprecated. Use this->GetDendrogram()->GetPrunedTree() instead.
void vtkTreeHeatmapItem::SetTreeColorArray | ( | const char * | arrayName | ) |
Deprecated. Use this->GetDendrogram()->SetColorArray(const char arrayName) instead.
|
virtual |
Returns true if the transform is interactive, false otherwise.
Reimplemented from vtkAbstractContextItem.
|
virtual |
Propagate any double click onto the dendrogram to check if any subtrees should be collapsed or expanded.
Reimplemented from vtkAbstractContextItem.
|
protectedvirtual |
Paints the tree & associated table as a heatmap.
Reimplemented from vtkAbstractContextItem.
|
protected |
Mark heatmap rows as hidden when a subtree is collapsed.
|
protected |
Mark heatmap columns as hidden when a subtree is collapsed.
|
protected |
Definition at line 179 of file vtkTreeHeatmapItem.h.
|
protected |
Definition at line 180 of file vtkTreeHeatmapItem.h.
|
protected |
Definition at line 181 of file vtkTreeHeatmapItem.h.
|
protected |
Definition at line 182 of file vtkTreeHeatmapItem.h.