VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Charts/Core/vtkPlotBox.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPlotBox.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 vtkPlotBox_h
00028 #define vtkPlotBox_h
00029 
00030 #include "vtkChartsCoreModule.h" // For export macro
00031 #include "vtkPlot.h"
00032 #include "vtkStdString.h"       // For vtkStdString ivars
00033 
00034 class vtkBrush;
00035 class vtkTextProperty;
00036 class vtkTable;
00037 class vtkStdString;
00038 class vtkScalarsToColors;
00039 
00040 class VTKCHARTSCORE_EXPORT vtkPlotBox : public vtkPlot
00041 {
00042 public:
00043   vtkTypeMacro(vtkPlotBox, vtkPlot);
00044   virtual void PrintSelf(ostream &os, vtkIndent indent);
00045 
00047   static vtkPlotBox* New();
00048 
00052   virtual void Update();
00053 
00055   virtual bool Paint(vtkContext2D *painter);
00056 
00058 
00063   virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
00064                            int legendIndex);
00066 
00068 
00069   virtual void SetInputData(vtkTable *table);
00070   virtual void SetInputData(vtkTable *table, const vtkStdString&,
00071                             const vtkStdString&)
00072   {
00073     this->SetInputData(table);
00074   }
00076 
00079   virtual vtkStringArray *GetLabels();
00080 
00082 
00085   virtual vtkIdType GetNearestPoint(const vtkVector2f& point,
00086                                     const vtkVector2f& tolerance,
00087                                     vtkVector2f* location);
00089 
00091 
00092   void SetLookupTable(vtkScalarsToColors *lut);
00093   vtkScalarsToColors *GetLookupTable();
00095 
00097   void SetColumnColor(const vtkStdString& colName, double *rgb);
00098 
00101   virtual void CreateDefaultLookupTable();
00102 
00104 
00105   vtkGetMacro(BoxWidth, float);
00106   vtkSetMacro(BoxWidth, float);
00108 
00110 
00111   vtkGetObjectMacro(TitleProperties, vtkTextProperty);
00113 
00114 //BTX
00115 protected:
00116   vtkPlotBox();
00117   ~vtkPlotBox();
00118 
00119   void DrawBoxPlot(int, unsigned char*, double, vtkContext2D*);
00120 
00122   bool UpdateTableCache(vtkTable *table);
00123 
00125 
00126   class Private;
00127   Private* Storage;
00129 
00131   vtkTimeStamp BuildTime;
00132 
00134   float BoxWidth;
00135 
00137   vtkScalarsToColors *LookupTable;
00138 
00140   vtkTextProperty* TitleProperties;
00141 
00142 private:
00143   vtkPlotBox(const vtkPlotBox &); // Not implemented.
00144   void operator=(const vtkPlotBox &); // Not implemented.
00145 
00146 //ETX
00147 };
00148 
00149 #endif //vtkPlotBox_h