Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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 =========================================================================*/
00074 #ifndef __vtkParallelCoordinatesActor_h
00075 #define __vtkParallelCoordinatesActor_h
00076 
00077 #include "vtkActor2D.h"
00078 
00079 class vtkAxisActor2D;
00080 class vtkDataObject;
00081 class vtkPolyData;
00082 class vtkPolyDataMapper2D;
00083 class vtkTextMapper;
00084 class vtkTextProperty;
00085 
00086 #define VTK_IV_COLUMN 0
00087 #define VTK_IV_ROW    1
00088 
00089 class VTK_RENDERING_EXPORT vtkParallelCoordinatesActor : public vtkActor2D
00090 {
00091 public:
00092   vtkTypeRevisionMacro(vtkParallelCoordinatesActor,vtkActor2D);
00093   void PrintSelf(ostream& os, vtkIndent indent);
00094 
00098   static vtkParallelCoordinatesActor *New();
00099 
00101 
00104   vtkSetClampMacro(IndependentVariables,int,VTK_IV_COLUMN, VTK_IV_ROW);
00105   vtkGetMacro(IndependentVariables,int);
00106   void SetIndependentVariablesToColumns()
00107     {this->SetIndependentVariables(VTK_IV_COLUMN);};
00108   void SetIndependentVariablesToRows()
00109     {this->SetIndependentVariables(VTK_IV_ROW);};
00111 
00113 
00114   vtkSetStringMacro(Title);
00115   vtkGetStringMacro(Title);
00117 
00119 
00122   vtkSetClampMacro(NumberOfLabels, int, 0, 50);
00123   vtkGetMacro(NumberOfLabels, int);
00125   
00127 
00128   vtkSetStringMacro(LabelFormat);
00129   vtkGetStringMacro(LabelFormat);
00131 
00133 
00134   virtual void SetTitleTextProperty(vtkTextProperty *p);
00135   vtkGetObjectMacro(TitleTextProperty,vtkTextProperty);
00137   
00139 
00140   virtual void SetLabelTextProperty(vtkTextProperty *p);
00141   vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
00143       
00144 #ifndef VTK_REMOVE_LEGACY_CODE
00145 
00146 
00151   virtual void SetFontFamily(int val);
00152   virtual int GetFontFamily();
00153   void SetFontFamilyToArial()   { this->SetFontFamily(VTK_ARIAL);  };
00154   void SetFontFamilyToCourier() { this->SetFontFamily(VTK_COURIER);};
00155   void SetFontFamilyToTimes()   { this->SetFontFamily(VTK_TIMES);  };
00157 #endif
00158 
00159 #ifndef VTK_REMOVE_LEGACY_CODE
00160 
00161 
00164   virtual void SetBold(int val);
00165   virtual int GetBold();
00166   vtkBooleanMacro(Bold, int);
00168 #endif
00169 
00170 #ifndef VTK_REMOVE_LEGACY_CODE
00171 
00172 
00175   virtual void SetItalic(int val);
00176   virtual int GetItalic();
00177   vtkBooleanMacro(Italic, int);
00179 #endif
00180 
00181 #ifndef VTK_REMOVE_LEGACY_CODE
00182 
00183 
00186   virtual void SetShadow(int val);
00187   virtual int GetShadow();
00188   vtkBooleanMacro(Shadow, int);
00190 #endif
00191 
00193 
00194   int RenderOpaqueGeometry(vtkViewport*);
00195   int RenderOverlay(vtkViewport*);
00196   int RenderTranslucentGeometry(vtkViewport *) {return 0;}
00198 
00200   virtual void SetInput(vtkDataObject*);
00201 
00203 
00204   vtkGetObjectMacro(Input,vtkDataObject);
00206 
00210   void ReleaseGraphicsResources(vtkWindow *);
00211 
00212 protected:
00213   vtkParallelCoordinatesActor();
00214   ~vtkParallelCoordinatesActor();
00215 
00216 private:
00217   vtkDataObject *Input;        // List of data sets to plot
00218 
00219   int IndependentVariables;    // Use column or row
00220   vtkIdType N;                 // The number of independent variables
00221   float *Mins;                 // Minimum data value along this row/column
00222   float *Maxs;                 // Maximum data value along this row/column
00223   int   *Xs;                   // Axes x-values (in viewport coordinates)
00224   int   YMin;                  // Axes y-min-value (in viewport coordinates)
00225   int   YMax;                  // Axes y-max-value (in viewport coordinates)
00226   int   NumberOfLabels;        // Along each axis
00227   char  *LabelFormat;
00228   char  *Title;
00229 
00230   vtkAxisActor2D **Axes;       
00231   vtkTextMapper  *TitleMapper;
00232   vtkActor2D     *TitleActor;
00233 
00234   vtkTextProperty *TitleTextProperty;
00235   vtkTextProperty *LabelTextProperty;
00236 
00237   vtkPolyData         *PlotData;    // The lines drawn within the axes
00238   vtkPolyDataMapper2D *PlotMapper;
00239   vtkActor2D          *PlotActor;
00240   
00241   vtkTimeStamp  BuildTime;
00242 
00243   int   LastPosition[2];
00244   int   LastPosition2[2];
00245 
00246   void Initialize();
00247   int PlaceAxes(vtkViewport *viewport, int *size);
00248 
00249 private:
00250   vtkParallelCoordinatesActor(const vtkParallelCoordinatesActor&);  // Not implemented.
00251   void operator=(const vtkParallelCoordinatesActor&);  // Not implemented.
00252 };
00253 
00254 
00255 #endif
00256