VTK
dox/Charts/Core/vtkPlotStacked.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPlotPoints.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 =========================================================================*/
00015 
00027 #ifndef __vtkPlotStacked_h
00028 #define __vtkPlotStacked_h
00029 
00030 #include "vtkChartsCoreModule.h" // For export macro
00031 #include "vtkPlot.h"
00032 
00033 class vtkChartXY;
00034 class vtkContext2D;
00035 class vtkTable;
00036 class vtkPoints2D;
00037 class vtkStdString;
00038 class vtkImageData;
00039 class vtkColorSeries;
00040 
00041 class vtkPlotStackedPrivate;
00042 
00043 class VTKCHARTSCORE_EXPORT vtkPlotStacked : public vtkPlot
00044 {
00045 public:
00046   vtkTypeMacro(vtkPlotStacked, vtkPlot);
00047   virtual void PrintSelf(ostream &os, vtkIndent indent);
00048 
00050   static vtkPlotStacked *New();
00051 
00053 
00054   virtual void SetColor(unsigned char r, unsigned char g, unsigned char b,
00055                         unsigned char a);
00056   virtual void SetColor(double r,  double g, double b);
00057   virtual void GetColor(double rgb[3]);
00059 
00063   virtual void Update();
00064 
00067   virtual bool Paint(vtkContext2D *painter);
00068 
00070 
00075   virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
00076                            int legendIndex);
00078 
00080   virtual void GetBounds(double bounds[4]);
00081 
00084   virtual void GetUnscaledInputBounds(double bounds[4]);
00085 
00087   virtual void SetInputArray(int index, const vtkStdString &name);
00088 
00090   void SetColorSeries(vtkColorSeries *colorSeries);
00091 
00093   vtkColorSeries *GetColorSeries();
00094 
00096   virtual vtkStringArray *GetLabels();
00097 
00098 //BTX
00100 
00103   virtual vtkIdType GetNearestPoint(const vtkVector2f& point,
00104                                     const vtkVector2f& tolerance,
00105                                     vtkVector2f* location);
00107 
00109   virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max);
00110 
00111 //BTX
00112 protected:
00113   vtkPlotStacked();
00114   ~vtkPlotStacked();
00115 
00117   bool UpdateTableCache(vtkTable *table);
00118 
00119   // Descript:
00120   // For stacked plots the Extent data must be greater than (or equal to) the
00121   // base data. Insure that this is true
00122   void FixExtent();
00123 
00127   void CalculateLogSeries();
00128 
00131   vtkIdTypeArray* BaseBadPoints;
00132 
00136   vtkIdTypeArray* ExtentBadPoints;
00137 
00139   vtkTimeStamp BuildTime;
00140 
00141   bool LogX, LogY;
00142 
00144   vtkSmartPointer<vtkColorSeries> ColorSeries;
00145 
00146 private:
00147   vtkPlotStacked(const vtkPlotStacked &); // Not implemented.
00148   void operator=(const vtkPlotStacked &); // Not implemented.
00149 
00150   vtkPlotStackedPrivate *Private;
00151 
00152 //ETX
00153 };
00154 
00155 #endif //__vtkPlotStacked_h