00001 #ifndef TRANSFERFUNCTION_H 00002 #define TRANSFERFUNCTION_H 00003 00004 00005 #include <qstring.h> 00006 #include <qcolor.h> 00007 00008 00010 00013 struct transfer_element 00014 { 00015 QString name; 00016 QColor color; 00017 float opacity; 00018 float begin; 00019 float length; 00020 int angle_left; 00021 int angle_right; 00022 }; 00023 00025 00028 struct transfer_function 00029 { 00030 transfer_element *element; 00031 int length; 00032 bool change; 00033 }; 00034 00035 00036 00038 00041 class transferFunction 00042 { 00043 00044 public: 00046 00049 transferFunction (); 00051 00054 transferFunction(const transferFunction &tp); 00056 ~transferFunction (); 00057 00059 00062 void addElement (transfer_element element); 00064 00067 void removeElement (int index); 00069 00072 transfer_function getTransferFunction (); 00074 00077 void setTransferFunction (transfer_function tf); 00078 00080 transfer_function tf; 00081 00082 }; 00083 00084 #endif // TRANSFERFUNCTION 00085