VTK
dox/Charts/vtkPlotPoints.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 
00024 #ifndef __vtkPlotPoints_h
00025 #define __vtkPlotPoints_h
00026 
00027 #include "vtkPlot.h"
00028 
00029 class vtkContext2D;
00030 class vtkTable;
00031 class vtkPoints2D;
00032 class vtkStdString;
00033 class vtkImageData;
00034 
00035 class VTK_CHARTS_EXPORT vtkPlotPoints : public vtkPlot
00036 {
00037 public:
00038   vtkTypeMacro(vtkPlotPoints, vtkPlot);
00039   virtual void PrintSelf(ostream &os, vtkIndent indent);
00040 
00042   static vtkPlotPoints *New();
00043 
00047   virtual void Update();
00048 
00051   virtual bool Paint(vtkContext2D *painter);
00052 
00058   virtual bool PaintLegend(vtkContext2D *painter, float rect[4]);
00059 
00061   virtual void GetBounds(double bounds[4]);
00062 
00063 //BTX
00065 
00067   virtual bool GetNearestPoint(const vtkVector2f& point,
00068                                const vtkVector2f& tolerance,
00069                                vtkVector2f* location);
00071 
00073   virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max);
00074 
00076 
00077   enum {
00078     NONE = 0,
00079     CROSS,
00080     PLUS,
00081     SQUARE,
00082     CIRCLE,
00083     DIAMOND
00084   };
00086 //ETX
00087 
00089 
00091   vtkGetMacro(MarkerStyle, int);
00092   vtkSetMacro(MarkerStyle, int);
00094 
00095 //BTX
00096 protected:
00097   vtkPlotPoints();
00098   ~vtkPlotPoints();
00099 
00101   void GeneraterMarker(int width, bool highlight = false);
00102 
00104   bool UpdateTableCache(vtkTable *table);
00105 
00109   void CalculateLogSeries();
00110 
00114   void FindBadPoints();
00115 
00117   void CalculateBounds(double bounds[4]);
00118 
00120   vtkPoints2D *Points;
00121 
00123 
00124   class VectorPIMPL;
00125   VectorPIMPL* Sorted;
00127 
00130   vtkIdTypeArray* BadPoints;
00131 
00133   vtkTimeStamp BuildTime;
00134 
00136 
00137   int MarkerStyle;
00138   vtkImageData* Marker;
00139   vtkImageData* HighlightMarker;
00141 
00142   bool LogX, LogY;
00143 
00144 private:
00145   vtkPlotPoints(const vtkPlotPoints &); // Not implemented.
00146   void operator=(const vtkPlotPoints &); // Not implemented.
00147 
00148 //ETX
00149 };
00150 
00151 #endif //__vtkPlotPoints_h