File: vtkTreeMapView.h

package info (click to toggle)
paraview 3.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 124,600 kB
  • ctags: 133,728
  • sloc: cpp: 958,817; ansic: 509,658; tcl: 45,787; xml: 23,401; python: 19,574; perl: 3,112; yacc: 1,787; java: 1,517; sh: 665; asm: 471; lex: 400; makefile: 168; objc: 28
file content (148 lines) | stat: -rw-r--r-- 5,089 bytes parent folder | download
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
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    $RCSfile: vtkTreeMapView.h,v $

  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.

=========================================================================*/
/*----------------------------------------------------------------------------
 Copyright (c) Sandia Corporation
 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
----------------------------------------------------------------------------*/
// .NAME vtkTreeMapView - Displays a tree as a tree map.
//
// .SECTION Description
// vtkTreeMapView shows a vtkTree in a tree map, where each vertex in the
// tree is represented by a box.  Child boxes are contained within the
// parent box, and may be colored and sized by various parameters.

#ifndef __vtkTreeMapView_h
#define __vtkTreeMapView_h

#include "vtkRenderView.h"

class vtkActor;
class vtkActor2D;
class vtkAlgorithmOutput;
class vtkBoxLayoutStrategy;
class vtkLabeledTreeMapDataMapper;
class vtkLookupTable;
class vtkPolyDataMapper;
class vtkRenderWindow;
class vtkSliceAndDiceLayoutStrategy;
class vtkSquarifyLayoutStrategy;
class vtkTreeFieldAggregator;
class vtkTreeLevelsFilter;
class vtkTreeMapLayout;
class vtkTreeMapToPolyData;

class VTK_VIEWS_EXPORT vtkTreeMapView : public vtkRenderView
{
public:
  static vtkTreeMapView *New();
  vtkTypeRevisionMacro(vtkTreeMapView, vtkRenderView);
  void PrintSelf(ostream& os, vtkIndent indent);
  
  // Description:
  // The name of the array used to color the treemap.
  void SetColorArrayName(const char* name);
  const char* GetColorArrayName();
  
  // Description:
  // The name of the array used to size the treemap rectangles.
  void SetSizeArrayName(const char* name);
  const char* GetSizeArrayName();
  
  // Description:
  // The name of the array used to label the treemap.
  // This must be a string array.
  void SetLabelArrayName(const char* name);
  const char* GetLabelArrayName();
  
  // Description:
  // The name of the array whose value appears when the mouse hovers
  // over a rectangle in the treemap.
  // This must be a string array.
  void SetHoverArrayName(const char* name);
  const char* GetHoverArrayName();
  
  // Description:
  // Sets the treemap layout strategy
  void SetLayoutStrategy(const char* name);
  void SetLayoutStrategyToBox();
  void SetLayoutStrategyToSliceAndDice();
  void SetLayoutStrategyToSquarify();
  
  // Description:
  // Sets the amount of border around child rectangles.
  // The percentage should be between 0 and 1.
  void SetBorderPercentage(double pcent);
  double GetBorderPercentage();
  
  // Description:
  // The sizes of the fonts used for labeling.
  void SetFontSizeRange(const int maxSize, const int minSize, const int delta=4);
  void GetFontSizeRange(int range[3]);
  
  // Description:
  // Sets up interactor style.
  virtual void SetupRenderWindow(vtkRenderWindow* win);
  
  // Description:
  // Apply the theme to this view.
  virtual void ApplyViewTheme(vtkViewTheme* theme);

protected:
  vtkTreeMapView();
  ~vtkTreeMapView();
  
  // Description:
  // Connects the algorithm output to the internal pipeline.
  virtual void AddInputConnection(vtkAlgorithmOutput* conn);
  
  // Description:
  // Disconnects the algorithm output from the internal pipeline.
  virtual void RemoveInputConnection(vtkAlgorithmOutput* conn);
  
  // Description:
  // Called to process the user event from the interactor style.
  virtual void ProcessEvents(vtkObject* caller, unsigned long eventId, 
    void* callData);
  
  // Decsription:
  // Prepares the view for rendering.
  virtual void PrepareForRendering();

  // Description:
  // Gets the internal color array name.
  vtkSetStringMacro(ColorArrayNameInternal);
  vtkGetStringMacro(ColorArrayNameInternal);
    
  // Representation objects
  char* ColorArrayNameInternal;
  vtkTreeLevelsFilter*                      TreeLevelsFilter;
  vtkTreeFieldAggregator*                   TreeFieldAggregator;
  vtkTreeMapLayout*                         TreeMapLayout;
  vtkBoxLayoutStrategy*                     BoxLayout;
  vtkSliceAndDiceLayoutStrategy*            SliceAndDiceLayout;
  vtkSquarifyLayoutStrategy*                SquarifyLayout;
  vtkTreeMapToPolyData*                     TreeMapToPolyData;
  vtkPolyDataMapper*                        TreeMapMapper;
  vtkActor*                                 TreeMapActor;
  vtkLabeledTreeMapDataMapper*              LabelMapper;
  vtkActor2D*                               LabelActor;
  vtkLookupTable*                           ColorLUT;

private:
  vtkTreeMapView(const vtkTreeMapView&);  // Not implemented.
  void operator=(const vtkTreeMapView&);  // Not implemented.
};

#endif