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 
35 class vtkBrush;
36 class vtkTextProperty;
37 class vtkTable;
38 class vtkStdString;
39 class vtkScalarsToColors;
40 
41 class VTKCHARTSCORE_EXPORT vtkPlotBox : public vtkPlot
42 {
43 public:
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 
117  virtual void CreateDefaultLookupTable();
118 
120 
123  vtkGetMacro(BoxWidth, float);
124  vtkSetMacro(BoxWidth, float);
126 
128 
131  vtkGetObjectMacro(TitleProperties, vtkTextProperty);
133 
134 protected:
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 
173 private:
174  vtkPlotBox(const vtkPlotBox &) VTK_DELETE_FUNCTION;
175  void operator=(const vtkPlotBox &) VTK_DELETE_FUNCTION;
176 
177 };
178 
179 #endif //vtkPlotBox_h
vtkBrush
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:38
vtkStdString.h
vtkPlotBox::TitleProperties
vtkTextProperty * TitleProperties
Text properties for the plot title.
Definition: vtkPlotBox.h:171
vtkPlotBox::vtkPlotBox
vtkPlotBox()
vtkPlot.h
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkPlotBox::UpdateTableCache
bool UpdateTableCache(vtkTable *table)
Update the table cache.
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:69
vtkPlotBox::SetLookupTable
void SetLookupTable(vtkScalarsToColors *lut)
Specify a lookup table for the mapper to use.
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkPlotBox::DrawBoxPlot
void DrawBoxPlot(int, unsigned char *, double, vtkContext2D *)
vtkPlot::SetInputData
virtual void SetInputData(vtkTable *table)
This is a convenience function to set the input table and the x, y column for the plot.
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:58
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:53
vtkPlotBox::BuildTime
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
Definition: vtkPlotBox.h:156
vtkPlotBox::Storage
Private * Storage
Definition: vtkPlotBox.h:149
vtkPlotBox::SetInputData
virtual void SetInputData(vtkTable *table, const vtkStdString &, const vtkStdString &)
Definition: vtkPlotBox.h:78
vtkPlotBox::PaintLegend
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...
vtkPlotBox::LookupTable
vtkScalarsToColors * LookupTable
Lookup Table for coloring points by scalar value.
Definition: vtkPlotBox.h:166
vtkPlotBox::Paint
virtual bool Paint(vtkContext2D *painter)
Paint event for the plot, called whenever the chart needs to be drawn.
vtkPlotBox
Class for drawing box plots.
Definition: vtkPlotBox.h:42
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkPlotBox::BoxWidth
float BoxWidth
Width of boxes.
Definition: vtkPlotBox.h:161
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPlotBox::~vtkPlotBox
~vtkPlotBox()
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:67
vtkPlotBox::New
static vtkPlotBox * New()
Creates a box plot.
vtkPlotBox::CreateDefaultLookupTable
virtual void CreateDefaultLookupTable()
Create default lookup table.
vtkPlotBox::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:40
vtkPlotBox::GetLabels
virtual vtkStringArray * GetLabels()
Get the plot labels.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkPlotBox::GetNearestPoint
virtual vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location)
Function to query a plot for the nearest point to the specified coordinate.
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:43
vtkX3D::location
@ location
Definition: vtkX3D.h:406
vtkPlotBox::Update
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
vtkPlotBox::GetLookupTable
vtkScalarsToColors * GetLookupTable()
vtkRectf
Definition: vtkRect.h:297
vtkVector2f
Definition: vtkVector.h:338
vtkPlotBox::SetColumnColor
void SetColumnColor(const vtkStdString &colName, double *rgb)
Helper function to set the color of a given column.
vtkPlotBox::SetInputData
virtual void SetInputData(vtkTable *table)
This is a convenience function to set the input table.