VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Views/Infovis/vtkTreeHeatmapItem.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkTreeHeatmapItem.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00038 #ifndef vtkTreeHeatmapItem_h
00039 #define vtkTreeHeatmapItem_h
00040 
00041 #include "vtkViewsInfovisModule.h" // For export macro
00042 #include "vtkContextItem.h"
00043 
00044 #include "vtkNew.h" // For vtkNew ivars
00045 #include "vtkSmartPointer.h" // For vtkSmartPointer ivars
00046 #include <vector>   // For lookup tables
00047 #include <map>      // For string lookup tables
00048 
00049 class vtkDendrogramItem;
00050 class vtkHeatmapItem;
00051 class vtkTable;
00052 class vtkTree;
00053 
00054 class VTKVIEWSINFOVIS_EXPORT vtkTreeHeatmapItem : public vtkContextItem
00055 {
00056 public:
00057   static vtkTreeHeatmapItem *New();
00058   vtkTypeMacro(vtkTreeHeatmapItem, vtkContextItem);
00059   virtual void PrintSelf(ostream &os, vtkIndent indent);
00060 
00066   virtual void SetTree(vtkTree *tree);
00067 
00069   vtkTree * GetTree();
00070 
00074   virtual void SetColumnTree(vtkTree *tree);
00075 
00078   vtkTree * GetColumnTree();
00079 
00084   virtual void SetTable(vtkTable *table);
00085 
00087   vtkTable * GetTable();
00088 
00090 
00091   vtkDendrogramItem * GetDendrogram();
00092   void SetDendrogram(vtkDendrogramItem *dendrogram);
00094 
00096 
00097   vtkHeatmapItem * GetHeatmap();
00098   void SetHeatmap(vtkHeatmapItem *heatmap);
00100 
00103   void ReorderTable();
00104 
00108   void ReverseTableRows();
00109 
00112   void ReverseTableColumns();
00113 
00117   void SetOrientation(int orientation);
00118 
00120   int GetOrientation();
00121 
00124   void GetBounds(double bounds[4]);
00125 
00127   void GetCenter(double center[2]);
00128 
00130   void GetSize(double size[2]);
00131 
00139   void CollapseToNumberOfLeafNodes(unsigned int n);
00140 
00142 
00144   float GetTreeLineWidth();
00145   void SetTreeLineWidth(float width);
00147 
00149   vtkTree * GetPrunedTree();
00150 
00153   void SetTreeColorArray(const char *arrayName);
00154 
00155   //BTX
00156 
00158   virtual bool Hit(const vtkContextMouseEvent &mouse);
00159 
00162   virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &event);
00163 
00164   //ETX
00165 
00166 protected:
00167   vtkTreeHeatmapItem();
00168   ~vtkTreeHeatmapItem();
00169 
00171   virtual bool Paint(vtkContext2D *painter);
00172 
00174   void CollapseHeatmapRows();
00175 
00177   void CollapseHeatmapColumns();
00178 
00179   vtkSmartPointer<vtkDendrogramItem> Dendrogram;
00180   vtkSmartPointer<vtkDendrogramItem> ColumnDendrogram;
00181   vtkSmartPointer<vtkHeatmapItem> Heatmap;
00182   int Orientation;
00183 
00184 private:
00185   vtkTreeHeatmapItem(const vtkTreeHeatmapItem&); // Not implemented
00186   void operator=(const vtkTreeHeatmapItem&); // Not implemented
00187 
00188   unsigned long TreeHeatmapBuildTime;
00189 };
00190 
00191 #endif