#include <transfunc.h>
Public Methods | |
| Transfunc () | |
| 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 |
|
|
Definition at line 4 of file transfunc.cpp. References rgb::b, colormap, rgb::g, opacitymap, and rgb::r.
00005 {
00006 opacitymap = new float[4096];
00007 colormap = new rgb[4096];
00008 for(int i = 0; i < 4096; i++)
00009 {
00010 opacitymap[i] = 0.0;
00011 colormap[i].r = 0;
00012 colormap[i].g = 0;
00013 colormap[i].b = 0;
00014 }
00015 }
|
|
|
Definition at line 18 of file transfunc.cpp. References colormap, and opacitymap.
00018 {
00019 if (!colormap)
00020 colormap = new rgb[4096];
00021 if (!opacitymap)
00022 opacitymap = new float[4096];
00023
00024
00025 for (int i = 0; i < 4096; i++) {
00026 colormap[i] = trans.colormap[i];
00027 opacitymap[i] = trans.opacitymap[i];
00028 }
00029 }
|
|
|
Definition at line 32 of file transfunc.cpp. References colormap, and opacitymap.
00033 {
00034 if(colormap != NULL) {
00035 delete[] colormap;
00036 colormap = NULL;
00037 }
00038 if(opacitymap != NULL) {
00039 delete[] opacitymap;
00040 opacitymap = NULL;
00041 }
00042 }
|
|
|
Definition at line 45 of file transfunc.cpp. References colormap. Referenced by Trilinear::CalcColorTrilinear(), AverageTRI::CastNext(), AverageNN::CastNext(), XRayTRI::CastNext(), XRayNN::CastNext(), MaxIntensityTRI::CastNext(), MaxIntensityNN::CastNext(), FirstHitNN::CastNext(), and Ray::CastNext().
00046 {
00047 if (dens > 4095)
00048 dens = 4095;
00049
00050 return colormap[dens];
00051 }
|
|
|
Definition at line 63 of file transfunc.cpp. References opacitymap. Referenced by Trilinear::CalcAlphaTrilinear(), AverageTRI::CastNext(), AverageNN::CastNext(), XRayTRI::CastNext(), XRayNN::CastNext(), MaxIntensityTRI::CastNext(), MaxIntensityNN::CastNext(), FirstHitNN::CastNext(), and Ray::CastNext().
00064 {
00065 if (dens > 4095)
00066 dens = 4095;
00067
00068 if (dens < 0)
00069 dens = 0;
00070
00071 return opacitymap[dens];
00072 }
|
|
||||||||||||
|
Definition at line 54 of file transfunc.cpp. References rgb::b, colormap, rgb::g, and rgb::r. Referenced by CMy3dvisApp::m_BuildTransferFunction().
|
|
||||||||||||
|
Definition at line 75 of file transfunc.cpp. References opacitymap. Referenced by CMy3dvisApp::m_BuildTransferFunction().
00076 {
00077 opacitymap[dens] = opac;
00078 return true;
00079 } |
|
|
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(). |
1.3-rc2