00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __mitkTransferFunction1D_h
00012 #define __mitkTransferFunction1D_h
00013
00014 #include "mitkTransferFunction.h"
00015
00016 struct mitkPoint1D
00017 {
00018 int x;
00019 float val;
00020 };
00021
00022 class mitkPointArray;
00023
00032 class MITK_VISUALIZATION_API mitkTransferFunction1D : public mitkTransferFunction
00033 {
00034 public:
00035 MITK_TYPE(mitkTransferFunction1D, mitkTransferFunction)
00036 virtual void PrintSelf(ostream& os);
00037 mitkTransferFunction1D();
00038
00044 void AddPoint(int x, float val);
00045
00052 void RemovePoint(int x);
00053
00057 void RemoveAllPoints();
00058
00063 int GetPointsCount();
00064
00070 int GetDataValueAtPoint(int pointIndex);
00071
00077 float GetOpacityAtPoint(int pointIndex);
00078
00079
00090 void SetMax(int xMax, float valMax);
00091
00096 int GetMaxX() {return m_MaxX;}
00097
00103 float GetValue(int x);
00104
00109 virtual int GetDimension() {return 1;}
00110
00111
00112 protected:
00113 int m_MaxX;
00114 mitkPointArray *m_Points;
00115
00116 virtual ~mitkTransferFunction1D();
00117 void _buildFunction(int x1, float val1, int x2, float val2);
00118 private:
00119 mitkTransferFunction1D(const mitkTransferFunction1D&);
00120 void operator=(const mitkTransferFunction1D&);
00121 };
00122
00123
00124
00125
00126
00127
00128 #endif
00129