VTK
dox/Rendering/vtkParallelCoordinatesActor.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkParallelCoordinatesActor.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00062 #ifndef __vtkParallelCoordinatesActor_h
00063 #define __vtkParallelCoordinatesActor_h
00064 
00065 #include "vtkActor2D.h"
00066 
00067 class vtkAxisActor2D;
00068 class vtkDataObject;
00069 class vtkPolyData;
00070 class vtkPolyDataMapper2D;
00071 class vtkTextMapper;
00072 class vtkTextProperty;
00073 
00074 #define VTK_IV_COLUMN 0
00075 #define VTK_IV_ROW    1
00076 
00077 class VTK_RENDERING_EXPORT vtkParallelCoordinatesActor : public vtkActor2D
00078 {
00079 public:
00080   vtkTypeMacro(vtkParallelCoordinatesActor,vtkActor2D);
00081   void PrintSelf(ostream& os, vtkIndent indent);
00082 
00086   static vtkParallelCoordinatesActor *New();
00087 
00089 
00092   vtkSetClampMacro(IndependentVariables,int,VTK_IV_COLUMN, VTK_IV_ROW);
00093   vtkGetMacro(IndependentVariables,int);
00094   void SetIndependentVariablesToColumns()
00095     {this->SetIndependentVariables(VTK_IV_COLUMN);};
00096   void SetIndependentVariablesToRows()
00097     {this->SetIndependentVariables(VTK_IV_ROW);};
00099 
00101 
00102   vtkSetStringMacro(Title);
00103   vtkGetStringMacro(Title);
00105 
00107 
00110   vtkSetClampMacro(NumberOfLabels, int, 0, 50);
00111   vtkGetMacro(NumberOfLabels, int);
00113   
00115 
00116   vtkSetStringMacro(LabelFormat);
00117   vtkGetStringMacro(LabelFormat);
00119 
00121 
00122   virtual void SetTitleTextProperty(vtkTextProperty *p);
00123   vtkGetObjectMacro(TitleTextProperty,vtkTextProperty);
00125   
00127 
00128   virtual void SetLabelTextProperty(vtkTextProperty *p);
00129   vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
00131       
00133 
00134   int RenderOpaqueGeometry(vtkViewport*);
00135   int RenderOverlay(vtkViewport*);
00136   virtual int RenderTranslucentPolygonalGeometry(vtkViewport *) {return 0;}
00138 
00140   virtual int HasTranslucentPolygonalGeometry();
00141   
00143   virtual void SetInput(vtkDataObject*);
00144 
00146 
00147   vtkGetObjectMacro(Input,vtkDataObject);
00149 
00153   void ReleaseGraphicsResources(vtkWindow *);
00154 
00155 protected:
00156   vtkParallelCoordinatesActor();
00157   ~vtkParallelCoordinatesActor();
00158 
00159 private:
00160   vtkDataObject *Input;        // List of data sets to plot
00161 
00162   int IndependentVariables;    // Use column or row
00163   vtkIdType N;                 // The number of independent variables
00164   double *Mins;                 // Minimum data value along this row/column
00165   double *Maxs;                 // Maximum data value along this row/column
00166   int   *Xs;                   // Axes x-values (in viewport coordinates)
00167   int   YMin;                  // Axes y-min-value (in viewport coordinates)
00168   int   YMax;                  // Axes y-max-value (in viewport coordinates)
00169   int   NumberOfLabels;        // Along each axis
00170   char  *LabelFormat;
00171   char  *Title;
00172 
00173   vtkAxisActor2D **Axes;       
00174   vtkTextMapper  *TitleMapper;
00175   vtkActor2D     *TitleActor;
00176 
00177   vtkTextProperty *TitleTextProperty;
00178   vtkTextProperty *LabelTextProperty;
00179 
00180   vtkPolyData         *PlotData;    // The lines drawn within the axes
00181   vtkPolyDataMapper2D *PlotMapper;
00182   vtkActor2D          *PlotActor;
00183   
00184   vtkTimeStamp  BuildTime;
00185 
00186   int   LastPosition[2];
00187   int   LastPosition2[2];
00188 
00189   void Initialize();
00190   int PlaceAxes(vtkViewport *viewport, int *size);
00191 
00192 private:
00193   vtkParallelCoordinatesActor(const vtkParallelCoordinatesActor&);  // Not implemented.
00194   void operator=(const vtkParallelCoordinatesActor&);  // Not implemented.
00195 };
00196 
00197 
00198 #endif
00199