#include <VolumeDialog.h>
Public Methods | |
| CVolumeDialog (CWnd *pParent=NULL) | |
Protected Methods | |
| virtual void | DoDataExchange (CDataExchange *pDX) |
| afx_msg void | OnShowWindow (BOOL bShow, UINT nStatus) |
| afx_msg void | OnRadioFirsthit () |
| afx_msg void | OnRadioStandard () |
| afx_msg void | OnRadioMip () |
| afx_msg void | OnChangeEditFhThreshold () |
| afx_msg void | OnChangeEditZoom () |
| afx_msg void | OnChangeEditHeight () |
| afx_msg void | OnChangeEditWidth () |
| afx_msg void | OnChangeEditAmbient () |
| afx_msg void | OnChangeEditDiffuse () |
| afx_msg void | OnButtonBgcolor () |
| afx_msg void | OnPaint () |
| afx_msg void | OnCheckLight () |
| afx_msg void | OnChangeEditLightposX () |
| afx_msg void | OnChangeEditLightposY () |
| afx_msg void | OnChangeEditLightposZ () |
| afx_msg void | OnChangeEditHighlight () |
| afx_msg void | OnChangeEditSpecular () |
| afx_msg void | OnRadioXray () |
| afx_msg void | OnChangeEditXrayMax () |
| afx_msg void | OnChangeEditXrayMin () |
| afx_msg void | OnChangeEditXAngle () |
| afx_msg void | OnChangeEditYAngle () |
| afx_msg void | OnButtonXPlus () |
| afx_msg void | OnButtonXMinus () |
| afx_msg void | OnButtonYPlus () |
| afx_msg void | OnButtonYMinus () |
| afx_msg void | OnChangeEditZAngle () |
| afx_msg void | OnButtonZPlus () |
| afx_msg void | OnButtonZMinus () |
Private Types | |
| enum | { IDD = IDD_VOLUME_DIALOG } |
Private Attributes | |
| int | m_dRotateTo |
| int | m_dRenderMode |
| int | m_dRenderPlane |
| bool | m_bfirst |
| COLORREF | m_BGColor |
| int | m_dFHTreshold |
| float | m_fAmbient |
| float | m_fDiffuse |
| int | m_dHeight |
| int | m_dWidth |
| float | m_fZoom |
| int | m_dHighlight |
| int | m_dLX |
| int | m_dLY |
| int | m_dLZ |
| float | m_fSpecular |
| BOOL | m_bLight |
| int | m_dXRayMax |
| int | m_dXRayMin |
| int | m_dXAngle |
| int | m_dYAngle |
| int | m_dZAngle |
|
|
Definition at line 31 of file VolumeDialog.h.
00031 { IDD = IDD_VOLUME_DIALOG };
|
|
|
Definition at line 43 of file VolumeDialog.cpp. References FH, m_bfirst, m_BGColor, m_bLight, m_dFHTreshold, m_dHeight, m_dHighlight, m_dLX, m_dLY, m_dLZ, m_dRenderMode, m_dRenderPlane, m_dRotateTo, m_dWidth, m_dXAngle, m_dXRayMax, m_dXRayMin, m_dYAngle, m_dZAngle, m_fAmbient, m_fDiffuse, m_fSpecular, m_fZoom, NONE, and XZ.
00044 : CDialog(CVolumeDialog::IDD, pParent) {
00045 //{{AFX_DATA_INIT(CVolumeDialog)
00046 m_dFHTreshold = 1500;
00047 m_fAmbient = 0.2f;
00048 m_fDiffuse = 0.2f;
00049 m_dHeight = 0;
00050 m_dWidth = 0;
00051 m_fZoom = 1.1f;
00052 m_dHighlight = 8.0f;
00053 m_dLX = 300;
00054 m_dLY = 300;
00055 m_dLZ = 300;
00056 m_fSpecular = 0.2f;
00057 m_bLight = FALSE;
00058 m_dXRayMax = 4095;
00059 m_dXRayMin = 0;
00060 m_dXAngle = 0;
00061 m_dYAngle = 0;
00062 m_dZAngle = 0;
00063 //}}AFX_DATA_INIT
00064
00065
00066 m_dRotateTo = NONE;
00067 m_dRenderPlane = XZ;
00068 m_dRenderMode = FH;
00069
00070 //black
00071 m_BGColor = 0x00000000;
00072
00073 m_bfirst = true;
00074 }
|
|
|
Definition at line 77 of file VolumeDialog.cpp.
00077 {
00078 CDialog::DoDataExchange(pDX);
00079 //{{AFX_DATA_MAP(CVolumeDialog)
00080 DDX_Text(pDX, IDC_EDIT_FH_THRESHOLD, m_dFHTreshold);
00081 DDV_MinMaxInt(pDX, m_dFHTreshold, 0, 4095);
00082 DDX_Text(pDX, IDC_EDIT_AMBIENT, m_fAmbient);
00083 DDV_MinMaxFloat(pDX, m_fAmbient, 0.f, 1.f);
00084 DDX_Text(pDX, IDC_EDIT_DIFFUSE, m_fDiffuse);
00085 DDV_MinMaxFloat(pDX, m_fDiffuse, 0.f, 1.f);
00086 DDX_Text(pDX, IDC_EDIT_HEIGHT, m_dHeight);
00087 DDV_MinMaxInt(pDX, m_dHeight, 0, 1600);
00088 DDX_Text(pDX, IDC_EDIT_WIDTH, m_dWidth);
00089 DDV_MinMaxInt(pDX, m_dWidth, 0, 1800);
00090 DDX_Text(pDX, IDC_EDIT_ZOOM, m_fZoom);
00091 DDV_MinMaxFloat(pDX, m_fZoom, 0.1f, 10.f);
00092 DDX_Text(pDX, IDC_EDIT_HIGHLIGHT, m_dHighlight);
00093 DDX_Text(pDX, IDC_EDIT_LIGHTPOS_X, m_dLX);
00094 DDX_Text(pDX, IDC_EDIT_LIGHTPOS_Y, m_dLY);
00095 DDX_Text(pDX, IDC_EDIT_LIGHTPOS_Z, m_dLZ);
00096 DDX_Text(pDX, IDC_EDIT_SPECULAR, m_fSpecular);
00097 DDX_Check(pDX, IDC_CHECK_LIGHT, m_bLight);
00098 DDX_Text(pDX, IDC_EDIT_XRAY_MAX, m_dXRayMax);
00099 DDV_MinMaxInt(pDX, m_dXRayMax, 0, 4095);
00100 DDX_Text(pDX, IDC_EDIT_XRAY_MIN, m_dXRayMin);
00101 DDV_MinMaxInt(pDX, m_dXRayMin, 0, 4095);
00102 DDX_Text(pDX, IDC_EDIT_X_ANGLE, m_dXAngle);
00103 DDV_MinMaxInt(pDX, m_dXAngle, 0, 180);
00104 DDX_Text(pDX, IDC_EDIT_Y_ANGLE, m_dYAngle);
00105 DDV_MinMaxInt(pDX, m_dYAngle, 0, 180);
00106 DDX_Text(pDX, IDC_EDIT_Z_ANGLE, m_dZAngle);
00107 DDV_MinMaxInt(pDX, m_dZAngle, 0, 180);
00108 //}}AFX_DATA_MAP
00109 }
|
|
|
Definition at line 250 of file VolumeDialog.cpp. References m_BGColor, raycaster, and Raycaster::SetBackgroundColor().
00250 {
00251 CColorDialog colDiag;
00252 if (colDiag.DoModal() != IDOK)
00253 return;
00254
00255 m_BGColor = colDiag.GetColor();
00256
00257 CDC *cdc = (CDC *)this->GetDC();
00258 cdc->FillSolidRect(114, 443, 30, 22, m_BGColor);
00259
00260 unsigned char col[3] = { m_BGColor & 0x000000FF,
00261 (m_BGColor & 0x0000FF00) >> 8,
00262 (m_BGColor & 0x00FF0000) >> 16 };
00263
00264 raycaster->SetBackgroundColor(col[0], col[1], col[2]);
00265 }
|
|
|
Definition at line 339 of file VolumeDialog.cpp. |
|
|
Definition at line 332 of file VolumeDialog.cpp. References m_dXAngle, raycaster, and Raycaster::RotateX().
|
|
|
Definition at line 351 of file VolumeDialog.cpp. |
|
|
Definition at line 345 of file VolumeDialog.cpp. |
|
|
Definition at line 363 of file VolumeDialog.cpp. |
|
|
Definition at line 357 of file VolumeDialog.cpp. |
|
|
Definition at line 240 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetAmbient().
00240 {
00241 UpdateData(TRUE);
00242 raycaster->SetAmbient(m_fAmbient);
00243 }
|
|
|
Definition at line 245 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetDiffuse().
00245 {
00246 UpdateData(TRUE);
00247 raycaster->SetDiffuse(m_fDiffuse);
00248 }
|
|
|
Definition at line 220 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetTreshold().
00220 {
00221 UpdateData(TRUE);
00222 raycaster->SetTreshold(m_dFHTreshold);
00223 }
|
|
|
Definition at line 230 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetHeight().
|
|
|
Definition at line 300 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetHighlight().
00300 {
00301 UpdateData(TRUE);
00302 raycaster->SetHighlight(m_dHighlight);
00303 }
|
|
|
Definition at line 285 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetLightpos().
00285 {
00286 UpdateData(TRUE);
00287 raycaster->SetLightpos(VECTOR(m_dLX, m_dLY, m_dLZ));
00288 }
|
|
|
Definition at line 290 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetLightpos().
00290 {
00291 UpdateData(TRUE);
00292 raycaster->SetLightpos(VECTOR(m_dLX, m_dLY, m_dLZ));
00293 }
|
|
|
Definition at line 295 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetLightpos().
00295 {
00296 UpdateData(TRUE);
00297 raycaster->SetLightpos(VECTOR(m_dLX, m_dLY, m_dLZ));
00298 }
|
|
|
Definition at line 305 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetSpecular().
00305 {
00306 UpdateData(TRUE);
00307 raycaster->SetSpecular(m_fSpecular);
00308 }
|
|
|
Definition at line 235 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetWidth().
|
|
|
Definition at line 320 of file VolumeDialog.cpp.
00320 {
00321 UpdateData(TRUE);
00322 }
|
|
|
Definition at line 310 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetDensRange().
00310 {
00311 UpdateData(TRUE);
00312 raycaster->SetDensRange(m_dXRayMin, m_dXRayMax);
00313 }
|
|
|
Definition at line 315 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetDensRange().
00315 {
00316 UpdateData(TRUE);
00317 raycaster->SetDensRange(m_dXRayMin, m_dXRayMax);
00318 }
|
|
|
Definition at line 324 of file VolumeDialog.cpp.
00324 {
00325 UpdateData(TRUE);
00326 }
|
|
|
Definition at line 328 of file VolumeDialog.cpp.
00328 {
00329 UpdateData(TRUE);
00330 }
|
|
|
Definition at line 225 of file VolumeDialog.cpp. References raycaster, and Raycaster::Zoom().
|
|
|
Definition at line 277 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetLight().
|
|
|
Definition at line 267 of file VolumeDialog.cpp.
00267 {
00268 CPaintDC dc(this); // device context for painting
00269
00270 dc.FillSolidRect(114, 443, 30, 22, m_BGColor);
00271 }
|
|
|
Definition at line 192 of file VolumeDialog.cpp. References FH, m_dRenderMode, raycaster, and Raycaster::SetRendermode().
00192 {
00193 if (!raycaster)
00194 return;
00195
00196 raycaster->SetRendermode(FH);
00197 m_dRenderMode = FH;
00198 }
|
|
|
Definition at line 209 of file VolumeDialog.cpp. References m_dRenderMode, MI, raycaster, and Raycaster::SetRendermode().
00209 {
00210 raycaster->SetRendermode(MI);
00211 m_dRenderMode = MI;
00212 }
|
|
|
Definition at line 200 of file VolumeDialog.cpp. References m_bLight, m_dRenderMode, raycaster, Raycaster::SetLight(), Raycaster::SetRendermode(), and STANDARD.
00200 {
00201 raycaster->SetRendermode(STANDARD);
00202 raycaster->SetLight(true);
00203 m_dRenderMode = STANDARD;
00204 m_bLight = TRUE;
00205 UpdateData(FALSE);
00206 }
|
|
|
Definition at line 215 of file VolumeDialog.cpp. References m_dRenderMode, raycaster, Raycaster::SetRendermode(), and XRAY.
00215 {
00216 raycaster->SetRendermode(XRAY);
00217 m_dRenderMode = XRAY;
00218 }
|
|
||||||||||||
|
Definition at line 150 of file VolumeDialog.cpp. References FH, Raycaster::GetScreenShotImage(), IDC_RADIO_FIRSTHIT, IDC_RADIO_MIP, IDC_RADIO_STANDARD, IDC_RADIO_XRAY, MI, raycaster, STANDARD, and XRAY.
00150 {
00151 CDialog::OnShowWindow(bShow, nStatus);
00152 // TODO: Add your message handler code here
00153 if (!bShow || !raycaster)
00154 return;
00155
00156
00157 int button;
00158
00159 switch (m_dRenderMode) {
00160 case FH:
00161 button = IDC_RADIO_FIRSTHIT;
00162 break;
00163 case STANDARD:
00164 button = IDC_RADIO_STANDARD;
00165 break;
00166 case MI:
00167 button = IDC_RADIO_MIP;
00168 break;
00169 case XRAY:
00170 button = IDC_RADIO_XRAY;
00171 break;
00172 default:
00173 button = -1;
00174 break;
00175 }
00176
00177 if (button != -1)
00178 ((CButton *)GetDlgItem(button))->SetCheck(1);
00179
00180
00181
00182 CDC *cdc = (CDC *)this->GetDC();
00183 cdc->FillSolidRect(114, 443, 30, 22, m_BGColor);
00184
00185
00186 raycaster->GetScreenShotImage(m_dWidth, m_dHeight);
00187
00188 UpdateData(FALSE);
00189 }
|
|
|
Definition at line 24 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 26 of file VolumeDialog.h. Referenced by CVolumeDialog(), and OnButtonBgcolor(). |
|
|
Definition at line 43 of file VolumeDialog.h. Referenced by CVolumeDialog(), and OnRadioStandard(). |
|
|
Definition at line 32 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 35 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 38 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 39 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 40 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 41 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 22 of file VolumeDialog.h. Referenced by CVolumeDialog(), OnRadioFirsthit(), OnRadioMip(), OnRadioStandard(), and OnRadioXray(). |
|
|
Definition at line 23 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 21 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 36 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 46 of file VolumeDialog.h. Referenced by CVolumeDialog(), OnButtonXMinus(), and OnButtonXPlus(). |
|
|
Definition at line 44 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 45 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 47 of file VolumeDialog.h. Referenced by CVolumeDialog(), OnButtonYMinus(), and OnButtonYPlus(). |
|
|
Definition at line 48 of file VolumeDialog.h. Referenced by CVolumeDialog(), OnButtonZMinus(), and OnButtonZPlus(). |
|
|
Definition at line 33 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 34 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 42 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
|
Definition at line 37 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
1.3-rc2