00001 //deprecated 00003 // 00004 // PROJECT.....: vpat - Creating Virtual Patients 00005 // RESPONSIBLE.: Carla Freitas e Luciana Nedel 00006 // 00007 // FILE........: vptable.h 00008 // DESCRIPTION.: Contain the VPTable class declarations, 00009 // that is responsible for color and opacity 00010 // mapping. 00011 // 00012 // AUTHOR......: Isabel Harb Manssour 00013 // LAST UPDATE.: May/08/2000 00014 // DESCRIPTION.: Class declaration. 00015 // 00016 // AUTHOR......: Isabel Harb Manssour 00017 // LAST UPDATE.: June/05/2001 00018 // DESCRIPTION.: New methods and attributes declaration. 00019 // 00021 00022 00023 // To foresee several "includes" 00024 #ifndef __VPTABLE_H 00025 #define __VPTABLE_H 00026 00027 00028 #include <vpvector3d.h> 00029 #include <vpcolor.h> 00030 #include <vector> //STL include 00031 using namespace std; 00032 00033 00034 // Opacity and color array dimension 00035 #define DIM 256 00036 00037 00038 00039 //----------------------------------------------------------------- 00040 // T A B L E 00041 //----------------------------------------------------------------- 00042 00043 00045 // Class Name: VPTable 00046 // Superclass: - 00047 // Subclasses: - 00049 00050 class VPTable { 00051 private: 00052 int minVolumeDensity; 00053 int maxVolumeDensity; 00054 VPVector3D maxGradient; 00055 VPColor colors[DIM]; // Color table 00056 float opacity[DIM]; // Opacity table 00057 int numControlPoints; // Number of table control points 00058 int controlPoints[DIM]; // Control points density 00059 VPColor colorControlPoints[DIM];// Control points color 00060 public: 00061 VPTable(); 00062 void vpSetMinVolumeDensity(int d); 00063 void vpSetMaxVolumeDensity(int d); 00064 void vpProcessMaxGradient(); 00065 void vpSetMaxGradient(VPVector3D g); 00066 float vpGetLinearOpacityValue(float color); 00067 float vpGetTableOpacityValue(float color); 00068 float vpGetGradientOpacityValue(int color, VPVector3D g); 00069 void vpSetOpacityTable (float t[]); 00070 float * vpGetOpacityTable(); 00071 void vpSetColorTable (VPColor c[]); 00072 VPColor * vpGetColorTable(); 00073 void vpSetControlPoints (int cp[], int n); 00074 void vpGetControlPoints(int cp[], int &n); 00075 void vpSetControlPoints (int cp[], VPColor c[], int n); 00076 void vpGetControlPoints(int cp[], VPColor c[], int &n); 00077 VPColor vpGetColor(float color); 00078 00079 }; 00080 00081 00082 00083 00084 #endif // __VPTABLE_H