Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkParallelCoordinatesActor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkParallelCoordinatesActor.h,v $
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 =========================================================================*/
00071 #ifndef __vtkParallelCoordinatesActor_h
00072 #define __vtkParallelCoordinatesActor_h
00073 
00074 #include "vtkActor2D.h"
00075 
00076 class vtkAxisActor2D;
00077 class vtkDataObject;
00078 class vtkPolyData;
00079 class vtkPolyDataMapper2D;
00080 class vtkTextMapper;
00081 class vtkTextProperty;
00082 
00083 #define VTK_IV_COLUMN 0
00084 #define VTK_IV_ROW    1
00085 
00086 class VTK_RENDERING_EXPORT vtkParallelCoordinatesActor : public vtkActor2D
00087 {
00088 public:
00089   vtkTypeRevisionMacro(vtkParallelCoordinatesActor,vtkActor2D);
00090   void PrintSelf(ostream& os, vtkIndent indent);
00091 
00095   static vtkParallelCoordinatesActor *New();
00096 
00098 
00101   vtkSetClampMacro(IndependentVariables,int,VTK_IV_COLUMN, VTK_IV_ROW);
00102   vtkGetMacro(IndependentVariables,int);
00103   void SetIndependentVariablesToColumns()
00104     {this->SetIndependentVariables(VTK_IV_COLUMN);};
00105   void SetIndependentVariablesToRows()
00106     {this->SetIndependentVariables(VTK_IV_ROW);};
00108 
00110 
00111   vtkSetStringMacro(Title);
00112   vtkGetStringMacro(Title);
00114 
00116 
00119   vtkSetClampMacro(NumberOfLabels, int, 0, 50);
00120   vtkGetMacro(NumberOfLabels, int);
00122   
00124 
00125   vtkSetStringMacro(LabelFormat);
00126   vtkGetStringMacro(LabelFormat);
00128 
00130 
00131   virtual void SetTitleTextProperty(vtkTextProperty *p);
00132   vtkGetObjectMacro(TitleTextProperty,vtkTextProperty);
00134   
00136 
00137   virtual void SetLabelTextProperty(vtkTextProperty *p);
00138   vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
00140       
00142 
00143   int RenderOpaqueGeometry(vtkViewport*);
00144   int RenderOverlay(vtkViewport*);
00145   int RenderTranslucentGeometry(vtkViewport *) {return 0;}
00147 
00149   virtual void SetInput(vtkDataObject*);
00150 
00152 
00153   vtkGetObjectMacro(Input,vtkDataObject);
00155 
00159   void ReleaseGraphicsResources(vtkWindow *);
00160 
00161 protected:
00162   vtkParallelCoordinatesActor();
00163   ~vtkParallelCoordinatesActor();
00164 
00165 private:
00166   vtkDataObject *Input;        // List of data sets to plot
00167 
00168   int IndependentVariables;    // Use column or row
00169   vtkIdType N;                 // The number of independent variables
00170   double *Mins;                 // Minimum data value along this row/column
00171   double *Maxs;                 // Maximum data value along this row/column
00172   int   *Xs;                   // Axes x-values (in viewport coordinates)
00173   int   YMin;                  // Axes y-min-value (in viewport coordinates)
00174   int   YMax;                  // Axes y-max-value (in viewport coordinates)
00175   int   NumberOfLabels;        // Along each axis
00176   char  *LabelFormat;
00177   char  *Title;
00178 
00179   vtkAxisActor2D **Axes;       
00180   vtkTextMapper  *TitleMapper;
00181   vtkActor2D     *TitleActor;
00182 
00183   vtkTextProperty *TitleTextProperty;
00184   vtkTextProperty *LabelTextProperty;
00185 
00186   vtkPolyData         *PlotData;    // The lines drawn within the axes
00187   vtkPolyDataMapper2D *PlotMapper;
00188   vtkActor2D          *PlotActor;
00189   
00190   vtkTimeStamp  BuildTime;
00191 
00192   int   LastPosition[2];
00193   int   LastPosition2[2];
00194 
00195   void Initialize();
00196   int PlaceAxes(vtkViewport *viewport, int *size);
00197 
00198 private:
00199   vtkParallelCoordinatesActor(const vtkParallelCoordinatesActor&);  // Not implemented.
00200   void operator=(const vtkParallelCoordinatesActor&);  // Not implemented.
00201 };
00202 
00203 
00204 #endif
00205