00001 #if !defined(AFX_MYCONTTRANSFDIALOG_H__028ED565_607A_46ED_B81D_A24A5C94890B__INCLUDED_)
00002 #define AFX_MYCONTTRANSFDIALOG_H__028ED565_607A_46ED_B81D_A24A5C94890B__INCLUDED_
00003
00004 #include "gl/gl.h"
00005 #include "MyContTransfPropDialog.h"
00006 #include "Defines.h"
00007 #include "MyHisto1Dialog.h"
00008
00009 #if _MSC_VER > 1000
00010 #pragma once
00011 #endif // _MSC_VER > 1000
00012
00013
00014
00016
00017
00019 class MyContTransfDialog : public CDialog
00020 {
00021
00022 public:
00024 MyHisto1Dialog m_Histo1Dialog;
00025
00027 MyContTransfPropDialog m_PropDialog[DEF_CONTTRANSFVALUES_NUM];
00028
00030 void GetContProp(int index, ContTransfProp &prop);
00032 void SetContProp(int index, ContTransfProp &prop);
00034 void SetOpacity(int index, GLubyte opacity);
00036 GLubyte GetOpacity(int index);
00037
00039 int GetRes(int index);
00041 void SetRes(int index, int res);
00042
00044 static void MapValue2Prop_3(ContTransfProp &result, float value, ContTransfProp *props,
00045 float *pos);
00046
00048 static void MapValue2Prop(ContTransfProp &result, float value, ContTransfProp *props,
00049 float *pos);
00050
00052 void GetRGBA(int index, GLubyte *rgba);
00054 void SetRGBA(int index, GLubyte *rgba);
00055
00057 void SetInterPos(float interPos);
00059 float GetInterPos();
00061 MyContTransfDialog(CWnd* pParent = NULL);
00062
00063
00064 enum { IDD = IDD_CONTTRANSFDIALOG };
00065 int m_MiddleValue;
00066 int m_InterPos;
00067
00068
00069
00070
00071
00072
00073 protected:
00074 virtual void DoDataExchange(CDataExchange* pDX);
00075
00076
00077
00078 protected:
00079
00080
00081
00082 virtual BOOL OnInitDialog();
00083 afx_msg void OnPaint();
00084 afx_msg void OnReleasedCaptureInterPosSlider(NMHDR* pNMHDR, LRESULT* pResult);
00085 afx_msg void OnMinPosButton();
00086 afx_msg void OnInterPosButton();
00087 afx_msg void OnMaxPosButton();
00088 afx_msg void OnHistoButton();
00089
00090 DECLARE_MESSAGE_MAP()
00091 };
00092
00093
00094
00095
00096 #endif // !defined(AFX_MYCONTTRANSFDIALOG_H__028ED565_607A_46ED_B81D_A24A5C94890B__INCLUDED_)