VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Charts/Core/vtkPlotBag.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPlotBag.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 
00035 #ifndef vtkPlotBag_h
00036 #define vtkPlotBag_h
00037 
00038 #include "vtkChartsCoreModule.h" // For export macro
00039 #include "vtkPlotPoints.h"
00040 
00041 class vtkPen;
00042 
00043 class VTKCHARTSCORE_EXPORT vtkPlotBag : public vtkPlotPoints
00044 {
00045 public:
00046   vtkTypeMacro(vtkPlotBag, vtkPlotPoints);
00047   virtual void PrintSelf(ostream &os, vtkIndent indent);
00048 
00050   static vtkPlotBag *New();
00051 
00055   virtual void Update();
00056 
00059   virtual bool Paint(vtkContext2D *painter);
00060 
00062 
00067   virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
00068                            int legendIndex);
00070 
00074   virtual vtkStringArray *GetLabels();
00075 
00077 
00079   virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos,
00080                                        vtkIdType seriesIndex,
00081                                        vtkIdType segmentIndex);
00083 
00085 
00090   virtual void SetInputData(vtkTable *table);
00091   virtual void SetInputData(vtkTable *table, const vtkStdString &yColumn,
00092                             const vtkStdString &densityColumn);
00093   virtual void SetInputData(vtkTable *table, const vtkStdString &xColumn,
00094                             const vtkStdString &yColumn,
00095                             const vtkStdString &densityColumn);
00097 
00098   virtual void SetInputData(vtkTable *table, vtkIdType xColumn,
00099                             vtkIdType yColumn,
00100                             vtkIdType densityColumn);
00101 
00102 
00104 
00106   void SetLinePen(vtkPen* pen);
00107   vtkGetObjectMacro(LinePen, vtkPen);
00109 
00111 
00114   void SetPointPen(vtkPen* pen) { this->SetPen(pen); }
00115   vtkPen* GetPointPen() { return this->GetPen(); }
00117 
00118 protected:
00119   vtkPlotBag();
00120   ~vtkPlotBag();
00121 
00122   void UpdateTableCache(vtkDataArray*);
00123 
00124   vtkPoints2D* MedianPoints;
00125   vtkPoints2D* Q3Points;
00126   vtkPen* LinePen;
00127 
00128 private:
00129   vtkPlotBag(const vtkPlotBag &); // Not implemented.
00130   void operator=(const vtkPlotBag &); // Not implemented.
00131 };
00132 
00133 #endif //vtkPlotBag_h