/usr/include/vtk-6.3/vtkPlotPoints.h is in libvtk6-dev 6.3.0+dfsg1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkPlotPoints.h
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.
=========================================================================*/
// .NAME vtkPlotPoints - Class for drawing an points given two columns from a
// vtkTable.
//
// .SECTION Description
// This class draws points in a plot given two columns from a table. If you need
// a line as well you should use vtkPlotLine which derives from vtkPlotPoints
// and is capable of drawing both points and a line.
//
// .SECTION See Also
// vtkPlotLine
#ifndef vtkPlotPoints_h
#define vtkPlotPoints_h
#include "vtkChartsCoreModule.h" // For export macro
#include "vtkPlot.h"
#include "vtkScalarsToColors.h" // For VTK_COLOR_MODE_DEFAULT and _MAP_SCALARS
#include "vtkStdString.h" // For color array name
#include "vtkNew.h" // For ivars
#include "vtkRenderingCoreEnums.h" // For marker enum
class vtkCharArray;
class vtkContext2D;
class vtkTable;
class vtkPoints2D;
class vtkFloatArray;
class vtkStdString;
class vtkImageData;
class vtkScalarsToColors;
class vtkUnsignedCharArray;
class VTKCHARTSCORE_EXPORT vtkPlotPoints : public vtkPlot
{
public:
vtkTypeMacro(vtkPlotPoints, vtkPlot);
virtual void PrintSelf(ostream &os, vtkIndent indent);
// Description:
// Creates a 2D Chart object.
static vtkPlotPoints *New();
// Description:
// Perform any updates to the item that may be necessary before rendering.
// The scene should take care of calling this on all items before their
// Paint function is invoked.
virtual void Update();
// Description:
// Paint event for the XY plot, called whenever the chart needs to be drawn
virtual bool Paint(vtkContext2D *painter);
// Description:
// Paint legend event for the XY plot, called whenever the legend needs the
// plot items symbol/mark/line drawn. A rect is supplied with the lower left
// corner of the rect (elements 0 and 1) and with width x height (elements 2
// and 3). The plot can choose how to fill the space supplied.
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
int legendIndex);
// Description:
// Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
virtual void GetBounds(double bounds[4]);
// Description:
// Get the non-log-scaled bounds on chart inputs for this plot as (Xmin, Xmax, Ymin, Ymax).
virtual void GetUnscaledInputBounds(double bounds[4]);
// Description:
// Specify a lookup table for the mapper to use.
void SetLookupTable(vtkScalarsToColors *lut);
vtkScalarsToColors *GetLookupTable();
// Description:
// Create default lookup table. Generally used to create one when none
// is available with the scalar data.
virtual void CreateDefaultLookupTable();
// Description:
// Turn on/off flag to control whether scalar data is used to color objects.
vtkSetMacro(ScalarVisibility,int);
vtkGetMacro(ScalarVisibility,int);
vtkBooleanMacro(ScalarVisibility,int);
// Description:
// When ScalarMode is set to UsePointFieldData or UseCellFieldData,
// you can specify which array to use for coloring using these methods.
// The lookup table will decide how to convert vectors to colors.
void SelectColorArray(vtkIdType arrayNum);
void SelectColorArray(const vtkStdString& arrayName);
// Description:
// Get the array name to color by.
vtkStdString GetColorArrayName();
//BTX
// Description:
// Function to query a plot for the nearest point to the specified coordinate.
// Returns the index of the data series with which the point is associated or
// -1.
virtual vtkIdType GetNearestPoint(const vtkVector2f& point,
const vtkVector2f& tolerance,
vtkVector2f* location);
// Description:
// Select all points in the specified rectangle.
virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max);
// Description:
// Select all points in the specified polygon.
virtual bool SelectPointsInPolygon(const vtkContextPolygon &polygon);
// Description:
// Enum containing various marker styles that can be used in a plot.
enum {
NONE = VTK_MARKER_NONE,
CROSS = VTK_MARKER_CROSS,
PLUS = VTK_MARKER_PLUS,
SQUARE = VTK_MARKER_SQUARE,
CIRCLE = VTK_MARKER_CIRCLE,
DIAMOND = VTK_MARKER_DIAMOND
};
//ETX
// Description:
// Get/set the marker style that should be used. The default is none, the enum
// in this class is used as a parameter.
vtkGetMacro(MarkerStyle, int);
vtkSetMacro(MarkerStyle, int);
// Description:
// Get/set the marker size that should be used. The default is negative, and
// in that case it is 2.3 times the pen width, if less than 8 will be used.
vtkGetMacro(MarkerSize, float);
vtkSetMacro(MarkerSize, float);
// Description:
// Get/set the valid point mask array name.
vtkGetMacro(ValidPointMaskName, vtkStdString)
vtkSetMacro(ValidPointMaskName, vtkStdString)
//BTX
protected:
vtkPlotPoints();
~vtkPlotPoints();
// Description:
// Populate the data arrays ready to operate on input data.
bool GetDataArrays(vtkTable *table, vtkDataArray *array[2]);
// Description:
// Update the table cache.
bool UpdateTableCache(vtkTable *table);
// Description:
// Calculate the unscaled input bounds from the input arrays.
void CalculateUnscaledInputBounds();
// Description:
// Handle calculating the log of the x or y series if necessary. Should be
// called by UpdateTableCache once the data has been updated in Points.
void CalculateLogSeries();
// Description:
// Find all of the "bad points" in the series. This is mainly used to cache
// bad points for performance reasons, but could also be used plot the bad
// points in the future.
void FindBadPoints();
// Description:
// Calculate the bounds of the plot, ignoring the bad points.
void CalculateBounds(double bounds[4]);
// Description:
// Create the sorted point list if necessary.
void CreateSortedPoints();
// Description:
// Store a well packed set of XY coordinates for this data series.
vtkPoints2D *Points;
vtkNew<vtkFloatArray> SelectedPoints;
// Description:
// Sorted points, used when searching for the nearest point.
class VectorPIMPL;
VectorPIMPL* Sorted;
// Description:
// An array containing the indices of all the "bad points", meaning any x, y
// pair that has an infinity, -infinity or not a number value.
vtkIdTypeArray* BadPoints;
// Description:
// Array which marks valid points in the array. If NULL (the default), all
// points in the input array are considered valid.
vtkCharArray* ValidPointMask;
// Description:
// Name of the valid point mask array.
vtkStdString ValidPointMaskName;
// Description:
// The point cache is marked dirty until it has been initialized.
vtkTimeStamp BuildTime;
// Description:
// The marker style that should be used
int MarkerStyle;
float MarkerSize;
bool LogX, LogY;
// Description:
// Lookup Table for coloring points by scalar value
vtkScalarsToColors *LookupTable;
vtkUnsignedCharArray *Colors;
int ScalarVisibility;
vtkStdString ColorArrayName;
// Description:
// Cached bounds on the plot input axes
double UnscaledInputBounds[4];
private:
vtkPlotPoints(const vtkPlotPoints &); // Not implemented.
void operator=(const vtkPlotPoints &); // Not implemented.
// #define VTK_COLOR_MODE_DEFAULT 0
// #define VTK_COLOR_MODE_MAP_SCALARS 1
//ETX
};
#endif //vtkPlotPoints_h
|