VTK
vtkPlotBox.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlotBox.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
27 #ifndef vtkPlotBox_h
28 #define vtkPlotBox_h
29 
30 #include "vtkChartsCoreModule.h" // For export macro
31 #include "vtkPlot.h"
32 #include "vtkStdString.h" // For vtkStdString ivars
33 
34 class vtkBrush;
35 class vtkTextProperty;
36 class vtkTable;
37 class vtkStdString;
38 class vtkScalarsToColors;
39 
41 {
42 public:
43  vtkTypeMacro(vtkPlotBox, vtkPlot);
44  virtual void PrintSelf(ostream &os, vtkIndent indent);
45 
47  static vtkPlotBox* New();
48 
52  virtual void Update();
53 
55  virtual bool Paint(vtkContext2D *painter);
56 
58 
63  virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
64  int legendIndex);
66 
68 
69  virtual void SetInputData(vtkTable *table);
70  virtual void SetInputData(vtkTable *table, const vtkStdString&,
71  const vtkStdString&)
72  {
73  this->SetInputData(table);
74  }
76 
79  virtual vtkStringArray *GetLabels();
80 
82 
86  const vtkVector2f& tolerance,
89 
91 
92  void SetLookupTable(vtkScalarsToColors *lut);
93  vtkScalarsToColors *GetLookupTable();
95 
97  void SetColumnColor(const vtkStdString& colName, double *rgb);
98 
101  virtual void CreateDefaultLookupTable();
102 
104 
105  vtkGetMacro(BoxWidth, float);
106  vtkSetMacro(BoxWidth, float);
108 
110 
111  vtkGetObjectMacro(TitleProperties, vtkTextProperty);
113 
114 //BTX
115 protected:
116  vtkPlotBox();
117  ~vtkPlotBox();
118 
119  void DrawBoxPlot(int, unsigned char*, double, vtkContext2D*);
120 
122  bool UpdateTableCache(vtkTable *table);
123 
125 
126  class Private;
127  Private* Storage;
129 
132 
134  float BoxWidth;
135 
138 
141 
142 private:
143  vtkPlotBox(const vtkPlotBox &); // Not implemented.
144  void operator=(const vtkPlotBox &); // Not implemented.
145 
146 //ETX
147 };
148 
149 #endif //vtkPlotBox_h
virtual void SetInputData(vtkTable *table, const vtkStdString &, const vtkStdString &)
Definition: vtkPlotBox.h:70
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex)
virtual bool Paint(vtkContext2D *painter)
float BoxWidth
Definition: vtkPlotBox.h:134
record modification and/or execution time
Definition: vtkTimeStamp.h:34
a vtkAbstractArray subclass for strings
int vtkIdType
Definition: vtkType.h:275
vtkTextProperty * TitleProperties
Definition: vtkPlotBox.h:140
Superclass for mapping scalar values to colors.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:56
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:36
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual vtkStringArray * GetLabels()
Abstract class for 2D plots.
Definition: vtkPlot.h:51
Class for drawing box plots.
Definition: vtkPlotBox.h:40
represent text properties.
virtual vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location)
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
virtual void SetInputData(vtkTable *table)
virtual void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
vtkScalarsToColors * LookupTable
Definition: vtkPlotBox.h:137
vtkTimeStamp BuildTime
Definition: vtkPlotBox.h:131
virtual void Update()
#define VTKCHARTSCORE_EXPORT
Private * Storage
Definition: vtkPlotBox.h:126