VTK
dox/Charts/Core/vtkScalarsToColorsItem.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkScalarsToColorsItem.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 
00029 #ifndef __vtkScalarsToColorsItem_h
00030 #define __vtkScalarsToColorsItem_h
00031 
00032 #include "vtkChartsCoreModule.h" // For export macro
00033 #include "vtkPlot.h"
00034 
00035 class vtkCallbackCommand;
00036 class vtkImageData;
00037 class vtkPoints2D;
00038 
00039 class VTKCHARTSCORE_EXPORT vtkScalarsToColorsItem: public vtkPlot
00040 {
00041 public:
00042   vtkTypeMacro(vtkScalarsToColorsItem, vtkPlot);
00043   virtual void PrintSelf(ostream &os, vtkIndent indent);
00044 
00047   void GetBounds(double bounds[4]);
00048 
00050 
00053   vtkSetVector4Macro(UserBounds, double);
00054   vtkGetVector4Macro(UserBounds, double)
00056 
00060   virtual bool Paint(vtkContext2D *painter);
00061 
00063 
00066   vtkGetObjectMacro(PolyLinePen, vtkPen);
00068 
00070 
00075   vtkSetMacro(MaskAboveCurve, bool);
00076   vtkGetMacro(MaskAboveCurve, bool);
00078 
00079 protected:
00080   vtkScalarsToColorsItem();
00081   virtual ~vtkScalarsToColorsItem();
00082 
00086   virtual void ComputeBounds(double* bounds);
00087 
00091   virtual void ComputeTexture() = 0;
00092 
00093   vtkGetMacro(TextureWidth, int);
00094 
00096 
00098   virtual void ScalarsToColorsModified(vtkObject* caller, unsigned long eid, void* calldata);
00099   static void OnScalarsToColorsModified(vtkObject* caller, unsigned long eid, void *clientdata, void* calldata);
00101 
00102   double              UserBounds[4];
00103 
00104   int                 TextureWidth;
00105   vtkImageData*       Texture;
00106   bool                Interpolate;
00107   vtkPoints2D*        Shape;
00108   vtkCallbackCommand* Callback;
00109 
00110   vtkPen*             PolyLinePen;
00111   bool                MaskAboveCurve;
00112 private:
00113   vtkScalarsToColorsItem(const vtkScalarsToColorsItem &); // Not implemented.
00114   void operator=(const vtkScalarsToColorsItem &);   // Not implemented.
00115 };
00116 
00117 #endif