VTK
dox/Charts/vtkColorTransferControlPointsItem.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkColorTransferControlPointsItem.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 
00030 #ifndef __vtkColorTransferControlPointsItem_h
00031 #define __vtkColorTransferControlPointsItem_h
00032 
00033 #include "vtkControlPointsItem.h"
00034 
00035 class vtkColorTransferFunction;
00036 
00037 class VTK_CHARTS_EXPORT vtkColorTransferControlPointsItem: public vtkControlPointsItem
00038 {
00039 public:
00040   vtkTypeMacro(vtkColorTransferControlPointsItem, vtkControlPointsItem);
00041   virtual void PrintSelf(ostream &os, vtkIndent indent);
00042 
00044   static vtkColorTransferControlPointsItem* New();
00045 
00047 
00048   void SetColorTransferFunction(vtkColorTransferFunction* function);
00049   // Description
00050   // Get the piecewise function
00051   vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction);
00053 
00057   virtual vtkIdType AddPoint(double* newPos);
00058 
00062   virtual vtkIdType RemovePoint(double* pos);
00063 
00065 
00067   vtkSetMacro(ColorFill, bool);
00068   vtkGetMacro(ColorFill, bool);
00070 
00071 protected:
00072   vtkColorTransferControlPointsItem();
00073   virtual ~vtkColorTransferControlPointsItem();
00074 
00075   virtual unsigned long int GetControlPointsMTime();
00076 
00077   virtual void DrawPoint(vtkContext2D* painter, vtkIdType index);
00078   virtual int  GetNumberOfPoints()const;
00079   virtual void GetControlPoint(vtkIdType index, double *point);
00080   virtual void SetControlPoint(vtkIdType index, double *point);
00081   virtual void EditPoint(float tX, float tY);
00082 
00083   vtkColorTransferFunction* ColorTransferFunction;
00084 
00085   bool ColorFill;
00086 private:
00087   vtkColorTransferControlPointsItem(const vtkColorTransferControlPointsItem &); // Not implemented.
00088   void operator=(const vtkColorTransferControlPointsItem &);   // Not implemented.
00089 };
00090 
00091 #endif