www.pudn.com > Ì廿֯Âë.rar > transfuncwin.h, change:2001-12-09,size:1451b
#ifndef __transfuncwin_h__
#define __transfuncwin_h__
#include "stdafx.h"
#include "volume.h"
#define TFWIDTH ((MAXDENSITY+1)>>3)
#define TFWNDX 20
#define TFWNDY 25
#define TFWNDW TFWIDTH
#define TFWNDH 260
#define CBWNDX TFWNDX
#define CBWNDY TFWNDX+TFWNDH+15
#define CBWNDW TFWNDW
#define CBWNDH 20
#define CCWNDX TFWNDX+TFWNDW+30
#define CCWNDY TFWNDY+105
#define CCWNDW 85
#define CCWNDH 30
#define BCWNDX TFWNDX+TFWNDW+30
#define BCWNDY TFWNDY+260
#define BCWNDW 85
#define BCWNDH 30
// ------------------------------------
class TransferFunctionWindow
{
private:
float m_histogram[TFWIDTH];
rgba m_colors[TFWIDTH];
float m_opacity[TFWIDTH];
COLORREF m_wincolors[TFWIDTH];
COLORREF m_curcolor;
COLORREF m_curbackgroundcolor;
int m_threshold;
public:
TransferFunctionWindow();
~TransferFunctionWindow();
void GetData(TransferFunction *tf);
void SetData(TransferFunction *tf);
void GetThreshold(int &threshold);
void SetThreshold(int threshold);
void DrawOpacity(HWND hWnd);
void DrawColorBar(HWND hWnd);
void DrawCurrentColor(HWND hWnd);
void DrawBackgroundColor(HWND hWnd);
void SetHistogram(Volume *vv);
void SetCurrentColor(COLORREF color);
void SetCurrentAsBackgroundColor();
void ApplyColor(HWND hWnd, int min, int max);
void ApplyOpacity(HWND hWnd, int min, int max, float opacity);
};
#endif