VTK
vtkPlotFunctionalBag.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlotFunctionalBag.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 
35 #ifndef vtkPlotFunctionalBag_h
36 #define vtkPlotFunctionalBag_h
37 
38 #include "vtkChartsCoreModule.h" // For export macro
39 #include "vtkPlot.h"
40 #include "vtkNew.h" // Needed to hold SP ivars
41 
42 class vtkDataArray;
43 class vtkPlotFuntionalBagInternal;
44 class vtkPlotLine;
45 class vtkPoints2D;
46 class vtkScalarsToColors;
47 
48 class VTKCHARTSCORE_EXPORT vtkPlotFunctionalBag : public vtkPlot
49 {
50 public:
51  vtkTypeMacro(vtkPlotFunctionalBag, vtkPlot);
52  virtual void PrintSelf(ostream &os, vtkIndent indent);
53 
58 
63  virtual bool IsBag();
64 
68  virtual bool GetVisible();
69 
75  virtual void Update();
76 
80  virtual bool Paint(vtkContext2D *painter);
81 
88  virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
89  int legendIndex);
90 
94  virtual void GetBounds(double bounds[4]);
95 
100  virtual void GetUnscaledInputBounds(double bounds[4]);
101 
103 
109 
114  virtual void CreateDefaultLookupTable();
115 
122  const vtkVector2f& tolerance,
124 
128  virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max);
129 
133  virtual bool SelectPointsInPolygon(const vtkContextPolygon &polygon);
134 
135 protected:
138 
142  bool GetDataArrays(vtkTable *table, vtkDataArray *array[2]);
143 
148 
153 
158 
163 
168 
169  bool LogX, LogY;
170 
171 private:
172  vtkPlotFunctionalBag(const vtkPlotFunctionalBag &) VTK_DELETE_FUNCTION;
173  void operator=(const vtkPlotFunctionalBag &) VTK_DELETE_FUNCTION;
174 };
175 
176 #endif //vtkPlotFunctionalBag_h
vtkPlotFunctionalBag::GetLookupTable
vtkScalarsToColors * GetLookupTable()
vtkPoints2D
represent and manipulate 2D points
Definition: vtkPoints2D.h:37
vtkPlotFunctionalBag::GetDataArrays
bool GetDataArrays(vtkTable *table, vtkDataArray *array[2])
Populate the data arrays ready to operate on input data.
vtkPlotFunctionalBag::GetVisible
virtual bool GetVisible()
Reimplemented to enforce visibility when selected.
vtkPlotFunctionalBag::LookupTable
vtkScalarsToColors * LookupTable
Lookup Table for coloring points by scalar value.
Definition: vtkPlotFunctionalBag.h:157
vtkPlotFunctionalBag::SetLookupTable
void SetLookupTable(vtkScalarsToColors *lut)
Specify a lookup table for the mapper to use.
vtkPlot.h
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:69
vtkPlotFunctionalBag::LogY
bool LogY
Definition: vtkPlotFunctionalBag.h:169
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkPlotFunctionalBag::~vtkPlotFunctionalBag
~vtkPlotFunctionalBag()
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:58
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:53
vtkPlotFunctionalBag::Paint
virtual bool Paint(vtkContext2D *painter)
Paint event for the plot, called whenever the chart needs to be drawn.
max
#define max(a, b)
Definition: vtkX3DExporterFIWriterHelper.h:31
vtkPlotFunctionalBag::Line
vtkNew< vtkPlotLine > Line
The plot line delegate for line series.
Definition: vtkPlotFunctionalBag.h:162
vtkPlotFunctionalBag::GetBounds
virtual void GetBounds(double bounds[4])
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkPlotFunctionalBag::IsBag
virtual bool IsBag()
Returns true if the plot is a functional bag, false if it is a simple line.
vtkPlotFunctionalBag::UpdateTableCache
bool UpdateTableCache(vtkTable *)
Update the table cache.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPlotFunctionalBag
Class for drawing an XY line plot or bag given two columns from a vtkTable.
Definition: vtkPlotFunctionalBag.h:49
vtkPlotFunctionalBag::SelectPointsInPolygon
virtual bool SelectPointsInPolygon(const vtkContextPolygon &polygon)
Select all points in the specified polygon.
vtkPlotFunctionalBag::GetUnscaledInputBounds
virtual void GetUnscaledInputBounds(double bounds[4])
Get the non-log-scaled bounds on chart inputs for this plot as (Xmin, Xmax, Ymin, Ymax).
vtkPlotFunctionalBag::BagPoints
vtkNew< vtkPoints2D > BagPoints
The bag points ordered in quadstrip fashion.
Definition: vtkPlotFunctionalBag.h:167
vtkPlotFunctionalBag::BuildTime
vtkTimeStamp BuildTime
The cache is marked dirty until it has been initialized.
Definition: vtkPlotFunctionalBag.h:152
vtkPlotLine
Class for drawing an XY line plot given two columns from a vtkTable.
Definition: vtkPlotLine.h:35
vtkNew< vtkPlotLine >
vtkContextPolygon
Definition: vtkContextPolygon.h:27
vtkPlotFunctionalBag::New
static vtkPlotFunctionalBag * New()
Creates a functional bag plot object.
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:67
vtkPlotFunctionalBag::vtkPlotFunctionalBag
vtkPlotFunctionalBag()
vtkNew.h
vtkPlotFunctionalBag::SelectPoints
virtual bool SelectPoints(const vtkVector2f &min, const vtkVector2f &max)
Select all points in the specified rectangle.
vtkPlotFunctionalBag::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...
vtkX3D::location
@ location
Definition: vtkX3D.h:406
vtkPlotFunctionalBag::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkPlotFunctionalBag::Update
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
vtkRectf
Definition: vtkRect.h:297
vtkPlotFunctionalBag::CreateDefaultLookupTable
virtual void CreateDefaultLookupTable()
Create default lookup table.
vtkVector2f
Definition: vtkVector.h:338
vtkPlotFunctionalBag::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.