ctkVTKLookupTable.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Library:   CTK
00004  
00005   Copyright (c) 2010  Kitware Inc.
00006 
00007   Licensed under the Apache License, Version 2.0 (the "License");
00008   you may not use this file except in compliance with the License.
00009   You may obtain a copy of the License at
00010 
00011       http://www.commontk.org/LICENSE
00012 
00013   Unless required by applicable law or agreed to in writing, software
00014   distributed under the License is distributed on an "AS IS" BASIS,
00015   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016   See the License for the specific language governing permissions and
00017   limitations under the License.
00018  
00019 =========================================================================*/
00020 
00021 #ifndef __ctkVTKLookupTable_h
00022 #define __ctkVTKLookupTable_h
00023 
00024 // CTK includes
00025 #include "ctkTransferFunction.h"
00026 #include "ctkPimpl.h"
00027 #include "CTKVisualizationVTKCoreExport.h"
00028 #include "ctkVTKObject.h"
00029 
00030 class vtkLookupTable;
00031 class ctkVTKLookupTablePrivate;
00032 
00036 class CTK_VISUALIZATION_VTK_CORE_EXPORT ctkVTKLookupTable: public ctkTransferFunction
00037 {
00038   Q_OBJECT;
00039   QVTK_OBJECT;
00040 public:
00041   ctkVTKLookupTable(QObject* parent = 0);
00042   ctkVTKLookupTable(vtkLookupTable* lookupTable, QObject* parent = 0);
00043   virtual ~ctkVTKLookupTable();
00044   
00045   virtual ctkControlPoint* controlPoint(int index)const;
00046   virtual QVariant value(qreal pos)const;
00047   virtual int count()const;
00048   virtual bool isDiscrete()const;
00049   virtual bool isEditable()const;
00050 
00051   virtual void range(qreal& minRange, qreal& maxRange)const;
00052   virtual QVariant minValue()const;
00053   virtual QVariant maxValue()const;
00054 
00055   virtual int insertControlPoint(const ctkControlPoint& cp);
00056   virtual int insertControlPoint(qreal pos);
00057 
00058   virtual void setControlPointPos(int index, qreal pos);
00059   virtual void setControlPointValue(int index, const QVariant& value);
00060 
00061   void setLookupTable(vtkLookupTable* lookupTable);
00062   vtkLookupTable* lookupTable()const;
00063 protected:
00064   qreal indexToPos(int index)const;
00065   int posToIndex(qreal pos)const;
00066 private:
00067   CTK_DECLARE_PRIVATE(ctkVTKLookupTable);
00068 };
00069 
00070 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1