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
28#ifndef vtkPlotBox_h
29#define vtkPlotBox_h
30
31#include "vtkChartsCoreModule.h" // For export macro
32#include "vtkPlot.h"
33#include "vtkStdString.h" // For vtkStdString ivars
34
35class vtkBrush;
36class vtkTextProperty;
37class vtkTable;
38class vtkStdString;
40
41class VTKCHARTSCORE_EXPORT vtkPlotBox : public vtkPlot
42{
43public:
44 vtkTypeMacro(vtkPlotBox, vtkPlot);
45 virtual void PrintSelf(ostream &os, vtkIndent indent);
46
50 static vtkPlotBox* New();
51
57 virtual void Update();
58
62 virtual bool Paint(vtkContext2D *painter);
63
70 virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
71 int legendIndex);
72
74
77 virtual void SetInputData(vtkTable *table);
78 virtual void SetInputData(vtkTable *table, const vtkStdString&,
79 const vtkStdString&)
80 {
81 this->SetInputData(table);
82 }
84
90
97 const vtkVector2f& tolerance,
99
101
107
111 void SetColumnColor(const vtkStdString& colName, double *rgb);
112
118
120
123 vtkGetMacro(BoxWidth, float);
124 vtkSetMacro(BoxWidth, float);
126
128
131 vtkGetObjectMacro(TitleProperties, vtkTextProperty);
133
134protected:
137
138 void DrawBoxPlot(int, unsigned char*, double, vtkContext2D*);
139
144
146
149 class Private;
150 Private* Storage;
152
157
161 float BoxWidth;
162
167
172
173private:
174 vtkPlotBox(const vtkPlotBox &) VTK_DELETE_FUNCTION;
175 void operator=(const vtkPlotBox &) VTK_DELETE_FUNCTION;
176
177};
178
179#endif //vtkPlotBox_h
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:38
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:58
a simple class to control print indentation
Definition: vtkIndent.h:40
Class for drawing box plots.
Definition: vtkPlotBox.h:42
vtkScalarsToColors * LookupTable
Lookup Table for coloring points by scalar value.
Definition: vtkPlotBox.h:166
float BoxWidth
Width of boxes.
Definition: vtkPlotBox.h:161
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
Definition: vtkPlotBox.h:156
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex)
Paint legend event for the plot, called whenever the legend needs the plot items symbol/mark/line dra...
void SetLookupTable(vtkScalarsToColors *lut)
Specify a lookup table for the mapper to use.
virtual void SetInputData(vtkTable *table)
This is a convenience function to set the input table.
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
void DrawBoxPlot(int, unsigned char *, double, vtkContext2D *)
vtkScalarsToColors * GetLookupTable()
void SetColumnColor(const vtkStdString &colName, double *rgb)
Helper function to set the color of a given column.
virtual void CreateDefaultLookupTable()
Create default lookup table.
vtkTextProperty * TitleProperties
Text properties for the plot title.
Definition: vtkPlotBox.h:171
Private * Storage
Definition: vtkPlotBox.h:150
virtual void SetInputData(vtkTable *table, const vtkStdString &, const vtkStdString &)
Definition: vtkPlotBox.h:78
virtual vtkStringArray * GetLabels()
Get the plot labels.
virtual vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location)
Function to query a plot for the nearest point to the specified coordinate.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual bool Paint(vtkContext2D *painter)
Paint event for the plot, called whenever the chart needs to be drawn.
bool UpdateTableCache(vtkTable *table)
Update the table cache.
static vtkPlotBox * New()
Creates a box plot.
Abstract class for 2D plots.
Definition: vtkPlot.h:53
virtual void SetInputData(vtkTable *table)
This is a convenience function to set the input table and the x, y column for the plot.
Superclass for mapping scalar values to colors.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
a vtkAbstractArray subclass for strings
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:69
represent text properties.
record modification and/or execution time
Definition: vtkTimeStamp.h:36
@ point
Definition: vtkX3D.h:236
@ location
Definition: vtkX3D.h:406
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287