#include <transfunc.h>
Public Methods | |
Transfunc () | |
transfunc.cpp implementiert ein Mapping zwischen Dichtewert und Farbe bzw. Opazität | |
Transfunc (const Transfunc &trans) | |
~Transfunc () | |
bool | SetDensityColor (int dens, rgb col) |
rgb | GetDensityColor (int dens) |
bool | SetOpacity (int dens, float opac) |
float | GetOpacity (int dens) |
Private Attributes | |
rgb * | colormap |
float * | opacitymap |
|
transfunc.cpp implementiert ein Mapping zwischen Dichtewert und Farbe bzw. Opazität
Definition at line 5 of file transfunc.cpp. References rgb::b, colormap, rgb::g, opacitymap, and rgb::r.
00006 { 00007 opacitymap = new float[4096]; 00008 colormap = new rgb[4096]; 00009 for(int i = 0; i < 4096; i++) 00010 { 00011 opacitymap[i] = 0.0; 00012 colormap[i].r = 0; 00013 colormap[i].g = 0; 00014 colormap[i].b = 0; 00015 } 00016 } |
|
Definition at line 19 of file transfunc.cpp. References colormap, and opacitymap.
00019 { 00020 if (!colormap) 00021 colormap = new rgb[4096]; 00022 if (!opacitymap) 00023 opacitymap = new float[4096]; 00024 00025 00026 for (int i = 0; i < 4096; i++) { 00027 colormap[i] = trans.colormap[i]; 00028 opacitymap[i] = trans.opacitymap[i]; 00029 } 00030 } |
|
Definition at line 33 of file transfunc.cpp. References colormap, and opacitymap.
00034 { 00035 if(colormap != NULL) { 00036 delete[] colormap; 00037 colormap = NULL; 00038 } 00039 if(opacitymap != NULL) { 00040 delete[] opacitymap; 00041 opacitymap = NULL; 00042 } 00043 } |
|
Definition at line 46 of file transfunc.cpp. References colormap. Referenced by Trilinear::CalcColorTrilinear(), MaxIntensityTRI::CastNext(), MaxIntensityNN::CastNext(), FirstHitNN::CastNext(), and Ray::CastNext().
00047 { 00048 if (dens > 4095) 00049 dens = 4095; 00050 00051 return colormap[dens]; 00052 } |
|
Definition at line 64 of file transfunc.cpp. References opacitymap. Referenced by Trilinear::CalcAlphaTrilinear(), MaxIntensityTRI::CastNext(), MaxIntensityNN::CastNext(), FirstHitNN::CastNext(), and Ray::CastNext().
00065 { 00066 if (dens > 4095) 00067 dens = 4095; 00068 00069 if (dens < 0) 00070 dens = 0; 00071 00072 return opacitymap[dens]; 00073 } |
|
Definition at line 55 of file transfunc.cpp. References rgb::b, colormap, rgb::g, and rgb::r. Referenced by CMy3dvisApp::m_BuildTransferFunction().
|
|
Definition at line 76 of file transfunc.cpp. References opacitymap. Referenced by CMy3dvisApp::m_BuildTransferFunction().
00077 { 00078 opacitymap[dens] = opac; 00079 return true; 00080 } |
|
Definition at line 23 of file transfunc.h. Referenced by GetDensityColor(), SetDensityColor(), Transfunc(), and ~Transfunc(). |
|
Definition at line 24 of file transfunc.h. Referenced by GetOpacity(), SetOpacity(), Transfunc(), and ~Transfunc(). |