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

Rendering/vtkParallelCoordinatesActor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkParallelCoordinatesActor.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00075 #ifndef __vtkParallelCoordinatesActor_h
00076 #define __vtkParallelCoordinatesActor_h
00077 
00078 #include "vtkActor2D.h"
00079 
00080 class vtkAxisActor2D;
00081 class vtkDataObject;
00082 class vtkPolyData;
00083 class vtkPolyDataMapper2D;
00084 class vtkTextMapper;
00085 class vtkTextProperty;
00086 
00087 #define VTK_IV_COLUMN 0
00088 #define VTK_IV_ROW    1
00089 
00090 class VTK_RENDERING_EXPORT vtkParallelCoordinatesActor : public vtkActor2D
00091 {
00092 public:
00093   vtkTypeRevisionMacro(vtkParallelCoordinatesActor,vtkActor2D);
00094   void PrintSelf(ostream& os, vtkIndent indent);
00095 
00099   static vtkParallelCoordinatesActor *New();
00100 
00102 
00105   vtkSetClampMacro(IndependentVariables,int,VTK_IV_COLUMN, VTK_IV_ROW);
00106   vtkGetMacro(IndependentVariables,int);
00107   void SetIndependentVariablesToColumns()
00108     {this->SetIndependentVariables(VTK_IV_COLUMN);};
00109   void SetIndependentVariablesToRows()
00110     {this->SetIndependentVariables(VTK_IV_ROW);};
00112 
00114 
00115   vtkSetStringMacro(Title);
00116   vtkGetStringMacro(Title);
00118 
00120 
00123   vtkSetClampMacro(NumberOfLabels, int, 0, 50);
00124   vtkGetMacro(NumberOfLabels, int);
00126   
00128 
00129   vtkSetStringMacro(LabelFormat);
00130   vtkGetStringMacro(LabelFormat);
00132 
00134 
00135   virtual void SetTitleTextProperty(vtkTextProperty *p);
00136   vtkGetObjectMacro(TitleTextProperty,vtkTextProperty);
00138   
00140 
00141   virtual void SetLabelTextProperty(vtkTextProperty *p);
00142   vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
00144       
00145 #ifndef VTK_REMOVE_LEGACY_CODE
00146 
00147 
00152   virtual void SetFontFamily(int val);
00153   virtual int GetFontFamily();
00154   void SetFontFamilyToArial()   { this->SetFontFamily(VTK_ARIAL);  };
00155   void SetFontFamilyToCourier() { this->SetFontFamily(VTK_COURIER);};
00156   void SetFontFamilyToTimes()   { this->SetFontFamily(VTK_TIMES);  };
00158 #endif
00159 
00160 #ifndef VTK_REMOVE_LEGACY_CODE
00161 
00162 
00165   virtual void SetBold(int val);
00166   virtual int GetBold();
00167   vtkBooleanMacro(Bold, int);
00169 #endif
00170 
00171 #ifndef VTK_REMOVE_LEGACY_CODE
00172 
00173 
00176   virtual void SetItalic(int val);
00177   virtual int GetItalic();
00178   vtkBooleanMacro(Italic, int);
00180 #endif
00181 
00182 #ifndef VTK_REMOVE_LEGACY_CODE
00183 
00184 
00187   virtual void SetShadow(int val);
00188   virtual int GetShadow();
00189   vtkBooleanMacro(Shadow, int);
00191 #endif
00192 
00194 
00195   int RenderOpaqueGeometry(vtkViewport*);
00196   int RenderOverlay(vtkViewport*);
00197   int RenderTranslucentGeometry(vtkViewport *) {return 0;}
00199 
00201   virtual void SetInput(vtkDataObject*);
00202 
00204 
00205   vtkGetObjectMacro(Input,vtkDataObject);
00207 
00211   void ReleaseGraphicsResources(vtkWindow *);
00212 
00213 protected:
00214   vtkParallelCoordinatesActor();
00215   ~vtkParallelCoordinatesActor();
00216 
00217 private:
00218   vtkDataObject *Input;        // List of data sets to plot
00219 
00220   int IndependentVariables;    // Use column or row
00221   vtkIdType N;                 // The number of independent variables
00222   float *Mins;                 // Minimum data value along this row/column
00223   float *Maxs;                 // Maximum data value along this row/column
00224   int   *Xs;                   // Axes x-values (in viewport coordinates)
00225   int   YMin;                  // Axes y-min-value (in viewport coordinates)
00226   int   YMax;                  // Axes y-max-value (in viewport coordinates)
00227   int   NumberOfLabels;        // Along each axis
00228   char  *LabelFormat;
00229   char  *Title;
00230 
00231   vtkAxisActor2D **Axes;       
00232   vtkTextMapper  *TitleMapper;
00233   vtkActor2D     *TitleActor;
00234 
00235   vtkTextProperty *TitleTextProperty;
00236   vtkTextProperty *LabelTextProperty;
00237 
00238   vtkPolyData         *PlotData;    // The lines drawn within the axes
00239   vtkPolyDataMapper2D *PlotMapper;
00240   vtkActor2D          *PlotActor;
00241   
00242   vtkTimeStamp  BuildTime;
00243 
00244   int   LastPosition[2];
00245   int   LastPosition2[2];
00246 
00247   void Initialize();
00248   int PlaceAxes(vtkViewport *viewport, int *size);
00249 
00250 private:
00251   vtkParallelCoordinatesActor(const vtkParallelCoordinatesActor&);  // Not implemented.
00252   void operator=(const vtkParallelCoordinatesActor&);  // Not implemented.
00253 };
00254 
00255 
00256 #endif
00257