/usr/include/vtk-7.1/vtkParallelCoordinatesRepresentation.h is in libvtk7-dev 7.1.1+dfsg1-2.
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 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkParallelCoordinatesRepresentation.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.
=========================================================================*/
/*-------------------------------------------------------------------------
Copyright 2009 Sandia Corporation.
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
the U.S. Government retains certain rights in this software.
-------------------------------------------------------------------------*/
/**
* @class vtkParallelCoordinatesRepresentation
* @brief Data representation that
* takes generic multivariate data and produces a parallel coordinates plot.
*
*
* A parallel coordinates plot represents each variable in a multivariate
* data set as a separate axis. Individual samples of that data set are
* represented as a polyline that pass through each variable axis at
* positions that correspond to data values. vtkParallelCoordinatesRepresentation
* generates this plot when added to a vtkParallelCoordinatesView, which handles
* interaction and highlighting. Sample polylines can alternatively
* be represented as s-curves by enabling the UseCurves flag.
*
* There are three selection modes: lasso, angle, and function. Lasso selection
* picks sample lines that pass through a polyline. Angle selection picks sample
* lines that have similar slope to a line segment. Function selection picks
* sample lines that are near a linear function defined on two variables. This
* function specified by passing two (x,y) variable value pairs.
*
* All primitives are plotted in normalized view coordinates [0,1].
*
* @sa
* vtkParallelCoordinatesView vtkParallelCoordinatesHistogramRepresentation
* vtkSCurveSpline
*
* @par Thanks:
* Developed by David Feng at Sandia National Laboratories
*/
#ifndef vtkParallelCoordinatesRepresentation_h
#define vtkParallelCoordinatesRepresentation_h
#include "vtkViewsInfovisModule.h" // For export macro
#include "vtkRenderedRepresentation.h"
class vtkActor;
class vtkActor2D;
class vtkArrayData;
class vtkAxisActor2D;
class vtkBivariateLinearTableThreshold;
class vtkCollection;
class vtkCoordinate;
class vtkExtractSelectedPolyDataIds;
class vtkFieldData;
class vtkDataArray;
class vtkDataObject;
class vtkDoubleArray;
class vtkIdList;
class vtkIdTypeArray;
class vtkIntArray;
class vtkLookupTable;
class vtkOutlineCornerSource;
class vtkPoints;
class vtkPolyData;
class vtkPolyDataMapper2D;
class vtkPropCollection;
class vtkSelection;
class vtkSelectionNode;
class vtkTextMapper;
class vtkTimeStamp;
class vtkUnsignedIntArray;
class vtkViewport;
class vtkWindow;
class VTKVIEWSINFOVIS_EXPORT vtkParallelCoordinatesRepresentation : public vtkRenderedRepresentation
{
public:
static vtkParallelCoordinatesRepresentation* New();
vtkTypeMacro(vtkParallelCoordinatesRepresentation, vtkRenderedRepresentation);
void PrintSelf(ostream& os, vtkIndent indent);
/**
* Apply the theme to this view. CellColor is used for line coloring
* and titles. EdgeLabelColor is used for axis color. CellOpacity is
* used for line opacity.
*/
virtual void ApplyViewTheme(vtkViewTheme* theme);
/**
* Returns the hover text at an x,y location.
*/
virtual const char* GetHoverText(vtkView* view, int x, int y);
//@{
/**
* Change the position of the plot
*/
int SetPositionAndSize(double* position, double* size);
int GetPositionAndSize(double* position, double* size);
//@}
//@{
/**
* Set/Get the axis titles
*/
void SetAxisTitles(vtkStringArray*);
void SetAxisTitles(vtkAlgorithmOutput*);
//@}
/**
* Set the title for the entire plot
*/
void SetPlotTitle(const char*);
//@{
/**
* Get the number of axes in the plot
*/
vtkGetMacro(NumberOfAxes,int);
//@}
//@{
/**
* Get the number of samples in the plot
*/
vtkGetMacro(NumberOfSamples,int);
//@}
//@{
/**
* Set/Get the number of labels to display on each axis
*/
void SetNumberOfAxisLabels(int num);
vtkGetMacro(NumberOfAxisLabels,int);
//@}
//@{
/**
* Move an axis to a particular screen position. Using these
* methods requires an Update() before they will work properly.
*/
virtual int SwapAxisPositions(int position1, int position2);
int SetXCoordinateOfPosition(int position, double xcoord);
double GetXCoordinateOfPosition(int axis);
void GetXCoordinatesOfPositions(double* coords);
int GetPositionNearXCoordinate(double xcoord);
//@}
//@{
/**
* Whether or not to display using curves
*/
vtkSetMacro(UseCurves,int);
vtkGetMacro(UseCurves,int);
vtkBooleanMacro(UseCurves,int);
//@}
//@{
/**
* Resolution of the curves displayed, enabled by setting UseCurves
*/
vtkSetMacro(CurveResolution,int);
vtkGetMacro(CurveResolution,int);
//@}
//@{
/**
* Access plot properties
*/
vtkGetMacro(LineOpacity,double)
vtkGetMacro(FontSize,double);
vtkGetVector3Macro(LineColor,double);
vtkGetVector3Macro(AxisColor,double);
vtkGetVector3Macro(AxisLabelColor,double);
vtkSetMacro(LineOpacity,double);
vtkSetMacro(FontSize,double);
vtkSetVector3Macro(LineColor,double);
vtkSetVector3Macro(AxisColor,double);
vtkSetVector3Macro(AxisLabelColor,double);
//@}
//@{
/**
* Maximum angle difference (in degrees) of selection using angle/function brushes
*/
vtkSetMacro(AngleBrushThreshold,double);
vtkGetMacro(AngleBrushThreshold,double);
//@}
//@{
/**
* Maximum angle difference (in degrees) of selection using angle/function brushes
*/
vtkSetMacro(FunctionBrushThreshold,double);
vtkGetMacro(FunctionBrushThreshold,double);
//@}
//@{
/**
* Set/get the value range of the axis at a particular screen position
*/
int GetRangeAtPosition(int position, double range[2]);
virtual int SetRangeAtPosition(int position, double range[2]);
//@}
/**
* Reset the axes to their default positions and orders
*/
void ResetAxes();
//@{
/**
* Do a selection of the lines. See the main description for how to use these functions.
* RangeSelect is currently stubbed out.
*/
virtual void LassoSelect(int brushClass, int brushOperator, vtkPoints* brushPoints);
virtual void AngleSelect(int brushClass, int brushOperator, double *p1, double *p2);
virtual void FunctionSelect(int brushClass, int brushOperator, double *p1, double *p2, double *q1, double *q2);
virtual void RangeSelect(int brushClass, int brushOperator, double *p1, double *p2);
//@}
enum InputPorts
{
INPUT_DATA=0,
INPUT_TITLES,
NUM_INPUT_PORTS
};
protected:
vtkParallelCoordinatesRepresentation();
virtual ~vtkParallelCoordinatesRepresentation();
virtual int FillInputPortInformation(int port, vtkInformation* info);
virtual int RequestData(
vtkInformation*,
vtkInformationVector**,
vtkInformationVector*);
//@{
/**
* Add/remove the props and actors to/from a view
*/
virtual bool AddToView(vtkView* view);
virtual bool RemoveFromView(vtkView* view);
virtual void PrepareForRendering(vtkRenderView* view);
//@}
/**
* This function is not actually used, but as left as a stub in case
* it becomes useful at some point.
*/
void UpdateHoverHighlight(vtkView* view, int x, int y);
/**
* Allocate the cells/points/scalars for a vtkPolyData
*/
virtual int AllocatePolyData(vtkPolyData* polyData,
int numLines,
int numPointsPerLine,
int numStrips,
int numPointsPerStrip,
int numQuads,
int numPoints,
int numCellScalars,
int numPointScalars);
/**
* Put the axis actors in their correct positions.
*/
int PlaceAxes();
//@{
/**
* Place line primitives into a vtkPolyData from the input data. idsToPlot
* is a list of which rows/samples should be plotted. If NULL, all
* rows/samples are plotted.
*/
virtual int PlaceLines(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
virtual int PlaceCurves(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
//@}
/**
* Takes the selection list (assumed to be a vtkIdTypeArray) from a vtkSelectionNode
* and plots lines/curves into polyData for just those row/sample ids.
*/
virtual int PlaceSelection(vtkPolyData* polyData, vtkTable* data, vtkSelectionNode* selectionNode);
/**
* Compute the number of axes and their individual ranges
*/
virtual int ComputeDataProperties();
/**
* Set plot actor properties (line thickness, opacity, etc)
*/
virtual int UpdatePlotProperties(vtkStringArray* inputTitles);
/**
* Delete and reallocate the internals, resetting to default values
*/
virtual int ReallocateInternals();
//@{
/**
* Compute which screen position a point belongs to (returns the left position)
*/
int ComputePointPosition(double* p);
int ComputeLinePosition(double* p1, double* p2);
//@}
//@{
/**
* Select a set of points using the prescribed operator (add, subtract, etc.) and class
*/
virtual void SelectRows(vtkIdType brushClass, vtkIdType brushOperator, vtkIdTypeArray* rowIds);
virtual vtkSelection* ConvertSelection(vtkView* view, vtkSelection* selection);
virtual void BuildInverseSelection();
virtual vtkPolyDataMapper2D* InitializePlotMapper(vtkPolyData* input, vtkActor2D* actor, bool forceStandard=false);
//@}
/**
* Build an s-curve passing through (0,0) and (1,1) with a specified number of
* values. This is used as a lookup table when plotting curved primitives.
*/
void BuildDefaultSCurve(vtkDoubleArray* array, int numValues);
/**
* same as public version, but assumes that the brushpoints coming in
* are all within two neighboring axes.
*/
virtual void LassoSelectInternal(vtkPoints* brushPoints, vtkIdTypeArray* outIds);
/**
* todo
*/
virtual void UpdateSelectionActors();
vtkPolyDataMapper2D* GetSelectionMapper(int idx);
int GetNumberOfSelections();
vtkSmartPointer<vtkPolyData> PlotData;
vtkSmartPointer<vtkPolyDataMapper2D> PlotMapper;
vtkSmartPointer<vtkActor2D> PlotActor;
vtkSmartPointer<vtkTextMapper> PlotTitleMapper;
vtkSmartPointer<vtkActor2D> PlotTitleActor;
vtkSmartPointer<vtkTextMapper> FunctionTextMapper;
vtkSmartPointer<vtkActor2D> FunctionTextActor;
vtkSmartPointer<vtkSelection> InverseSelection;
vtkSmartPointer<vtkBivariateLinearTableThreshold> LinearThreshold;
class Internals;
Internals* I;
int NumberOfAxes;
int NumberOfAxisLabels;
int NumberOfSamples;
double YMin;
double YMax;
int CurveResolution;
int UseCurves;
double AngleBrushThreshold;
double FunctionBrushThreshold;
double SwapThreshold;
// Indexed by screen position
double* Xs;
double* Mins;
double* Maxs;
double* MinOffsets;
double* MaxOffsets;
vtkSmartPointer<vtkAxisActor2D>* Axes;
vtkSmartPointer<vtkTable> InputArrayTable;
vtkSmartPointer<vtkStringArray> AxisTitles;
vtkTimeStamp BuildTime;
double LineOpacity;
double FontSize;
double LineColor[3];
double AxisColor[3];
double AxisLabelColor[3];
vtkGetStringMacro(InternalHoverText);
vtkSetStringMacro(InternalHoverText);
char* InternalHoverText;
private:
vtkParallelCoordinatesRepresentation(const vtkParallelCoordinatesRepresentation&) VTK_DELETE_FUNCTION;
void operator=(const vtkParallelCoordinatesRepresentation&) VTK_DELETE_FUNCTION;
};
#endif
|