Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

transferfuncform Class Reference

#include <transferfuncform.h>

List of all members.

Public Methods

 transferfuncform (CWnd *pParent=NULL)

Public Attributes

COLORREF m_cTemp
INDEXLIST m_vTransferIndices

Protected Methods

virtual void DoDataExchange (CDataExchange *pDX)
virtual void OnOK ()
afx_msg void OnShowWindow (BOOL bShow, UINT nStatus)
afx_msg void OnPaint ()
afx_msg void OnButtonTransferColor ()
afx_msg void OnButtonTransferSave ()
afx_msg void OnButtonTransferClear ()
afx_msg void OnButtonTransferNew ()
afx_msg void OnSelchangeComboTransfer ()
afx_msg void OnButtonTransferDelete ()
afx_msg void OnChangeEditTransferAlpha ()
afx_msg void OnButtonTransferExport ()
afx_msg void OnButtonTransferImport ()
afx_msg void OnHScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
afx_msg void OnChangeEditTransferTo ()

Private Types

enum  { IDD = IDD_TRANSFERFUNCFORM_DIALOG }

Private Methods

void m_DrawHistogram (CDC *dc, int densityBegin, int densityEnd)
void m_ResetComboBox (bool clear=FALSE)

Private Attributes

bool m_bActive
int m_dTransferTo
CString m_sStaticRight
CString m_sStaticLeft
CString m_sStaticFrom
int m_dTransferAlpha
int m_dSliderAlpha
CString m_dStaticMaxDenstity


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
IDD 

Definition at line 39 of file transferfuncform.h.


Constructor & Destructor Documentation

transferfuncform::transferfuncform CWnd *    pParent = NULL
 

Definition at line 27 of file transferfuncform.cpp.

References m_cTemp, m_dSliderAlpha, m_dStaticMaxDenstity, m_dTransferAlpha, m_dTransferTo, m_sStaticFrom, m_sStaticLeft, m_sStaticRight, and m_vTransferIndices.

00028         : CDialog(transferfuncform::IDD, pParent)
00029 {
00030         //{{AFX_DATA_INIT(transferfuncform)
00031         m_dTransferTo = 0;
00032         m_sStaticRight = _T("4095");
00033         m_sStaticLeft = _T("0");
00034         m_sStaticFrom = _T("0");
00035         m_dTransferAlpha = 255;
00036         m_dSliderAlpha = 255;
00037         m_dStaticMaxDenstity = _T("");
00038         //}}AFX_DATA_INIT
00039 
00040         //0x00bbggrr
00041         INDICES i = { 0, 4095, 255, 0x00FFFFFF };
00042         m_vTransferIndices.push_back(i);
00043         m_cTemp = 0x00FFFFFF;
00044 }


Member Function Documentation

void transferfuncform::DoDataExchange CDataExchange *    pDX [protected, virtual]
 

Definition at line 47 of file transferfuncform.cpp.

00048 {
00049         CDialog::DoDataExchange(pDX);
00050         //{{AFX_DATA_MAP(transferfuncform)
00051         DDX_Text(pDX, IDC_EDIT_TRANSFER_TO, m_dTransferTo);
00052         DDV_MinMaxInt(pDX, m_dTransferTo, 0, 4095);
00053         DDX_Text(pDX, IDC_STATIC_RIGHT, m_sStaticRight);
00054         DDV_MaxChars(pDX, m_sStaticRight, 4);
00055         DDX_Text(pDX, IDC_STATIC_LEFT, m_sStaticLeft);
00056         DDV_MaxChars(pDX, m_sStaticLeft, 4);
00057         DDX_Text(pDX, IDC_STATIC_TRANSFER_FROM, m_sStaticFrom);
00058         DDV_MaxChars(pDX, m_sStaticFrom, 4);
00059         DDX_Text(pDX, IDC_EDIT_TRANSFER_ALPHA, m_dTransferAlpha);
00060         DDV_MinMaxInt(pDX, m_dTransferAlpha, 0, 255);
00061         DDX_Slider(pDX, IDC_SLIDER_TRANSFER_ALPHA, m_dSliderAlpha);
00062         DDX_Text(pDX, IDC_STATIC_TRANSFER_MAXDENS, m_dStaticMaxDenstity);
00063         //}}AFX_DATA_MAP
00064 }

void transferfuncform::m_DrawHistogram CDC *    dc,
int    densityBegin,
int    densityEnd
[private]
 

Definition at line 95 of file transferfuncform.cpp.

References data3D, Data::GetHistogram(), and m_dStaticMaxDenstity.

Referenced by OnButtonTransferSave(), OnPaint(), and OnSelchangeComboTransfer().

00097                                                                                            {
00098 
00099         
00100         //draw the background
00101         dc->Rectangle(9, 30, 418, 280); 
00102         int spanX = 418 - 9;
00103         int spanY = 280 - 30;
00104         int beginX = 9;
00105         int beginY = 280 - 1;
00106         int beginY2 = 30;
00107 
00108         
00109         int dLineWidth = 1;
00110         int dXRatio;
00111         int *hist = new int[spanX];
00112 
00113 
00114         if ((densityEnd - densityBegin) >= spanX)
00115                 dXRatio = (densityEnd - densityBegin) / spanX;
00116         else {
00117                 if ((densityEnd - densityBegin) == 0)
00118                         dLineWidth = spanX;
00119                 else {
00120                         dXRatio = spanX / (densityEnd - densityBegin);
00121                         dLineWidth = dXRatio;
00122                 }
00123         }
00124 
00125 
00126         float dLocalMax = 0;
00127 
00128         for (int i = 0; i < spanX; i++) {
00129                 hist[i] = data3D->GetHistogram(densityBegin + i * dXRatio);
00130                 if (hist[i] > dLocalMax)
00131                         dLocalMax = hist[i];
00132         }
00133         
00134         for (i = 0; i < spanX; i++)
00135                 hist[i] = beginY2 + (spanY - (int)(((float)hist[i] / dLocalMax) * (float)spanY));
00136 
00137 
00138         CPen *pPen = (CPen *)dc->SelectStockObject(BLACK_PEN);
00139 
00140         for (i = 0; i < spanX; i++) {
00141                 dc->MoveTo(beginX + i, beginY);
00142                 dc->LineTo(beginX + i, hist[i]);
00143         }
00144 
00145         char temp[10];
00146         _itoa(dLocalMax, temp, 10);
00147         m_dStaticMaxDenstity = temp;
00148 
00149 
00150         if (hist)
00151                 delete[] hist;
00152 
00153         UpdateData(FALSE);
00154 }

void transferfuncform::m_ResetComboBox bool    clear = FALSE [private]
 

Definition at line 67 of file transferfuncform.cpp.

References m_vTransferIndices.

Referenced by OnButtonTransferClear(), OnButtonTransferDelete(), and OnButtonTransferImport().

00067                                                  {
00068         ((CButton *)GetDlgItem(IDC_BUTTON_TRANSFER_SAVE))->EnableWindow(FALSE);
00069 
00070         CComboBox *comboBox = (CComboBox *)GetDlgItem(IDC_COMBO_TRANSFER);
00071         comboBox->ResetContent();
00072         comboBox->AddString("HISTOGRAM");
00073         comboBox->SetCurSel(0);
00074 
00075         if (clear)
00076                 return;
00077 
00078 
00079         comboBox->ResetContent();
00080         comboBox->AddString("HISTOGRAM");
00081 
00082         std::string text = "TRANSFORM_";
00083         for (int i = 0; i < m_vTransferIndices.size() - 1; i++) {
00084                 char s[5];
00085                 _itoa(i, s, 10);
00086                 text += s;
00087                 comboBox->AddString(text.c_str());
00088                 text.erase(10, strlen(s));
00089         }
00090 
00091         comboBox->SetCurSel(0);
00092 }

void transferfuncform::OnButtonTransferClear   [protected]
 

Definition at line 325 of file transferfuncform.cpp.

References m_dTransferTo, m_ResetComboBox(), m_sStaticFrom, m_sStaticLeft, m_sStaticRight, and m_vTransferIndices.

00326 {
00327         // TODO: Add your control notification handler code here
00328         if (MessageBox("Clear the whole transfer-function?", "clear trans-func", MB_YESNO) == IDNO)
00329                 return;
00330 
00331         ((CButton *)GetDlgItem(IDC_BUTTON_TRANSFER_SAVE))->EnableWindow(FALSE);
00332 
00333         m_ResetComboBox(TRUE);
00334 
00335         
00336         m_vTransferIndices.erase(m_vTransferIndices.begin() + 1, m_vTransferIndices.end());
00337         m_sStaticLeft = "0";
00338         m_sStaticRight = "4095";
00339         m_vTransferIndices[0].m_sdBegin = 0;
00340         m_vTransferIndices[0].m_sdEnd = 4095;
00341         m_vTransferIndices[0].m_scColor = 0x00FFFFFFFF;
00342         m_sStaticFrom = "0";
00343         m_dTransferTo = 4095;
00344 
00345         CDC *cdc = (CDC *)this->GetDC();
00346         cdc->FillSolidRect(560, 159, 61, 23, 0x00FFFFFF);
00347         
00348         UpdateData(FALSE);
00349 }

void transferfuncform::OnButtonTransferColor   [protected]
 

Definition at line 251 of file transferfuncform.cpp.

References m_cTemp.

00252 {
00253         CComboBox *comboBox = (CComboBox *)this->GetDlgItem(IDC_COMBO_TRANSFER);
00254         int sel = comboBox->GetCurSel();
00255 
00256         if (sel == CB_ERR)
00257                 return;
00258 
00259         // TODO: Add your control notification handler code here
00260         CColorDialog colDiag;
00261         if (colDiag.DoModal() != IDOK)
00262                 return;
00263 
00264         ((CButton *)GetDlgItem(IDC_BUTTON_TRANSFER_SAVE))->EnableWindow(TRUE);
00265         COLORREF col = colDiag.GetColor();
00266 
00267         m_cTemp = col;
00268 
00269         CDC *cdc = (CDC *)this->GetDC();
00270         cdc->FillSolidRect(560, 159, 61, 23, col);
00271 }

void transferfuncform::OnButtonTransferDelete   [protected]
 

Definition at line 420 of file transferfuncform.cpp.

References m_dTransferTo, m_ResetComboBox(), m_sStaticFrom, m_sStaticLeft, m_sStaticRight, and m_vTransferIndices.

00421 {
00422         // TODO: Add your control notification handler code here
00423         ((CButton *)GetDlgItem(IDC_BUTTON_TRANSFER_SAVE))->EnableWindow(FALSE);
00424 
00425 
00426 
00427         CComboBox *comboBox = (CComboBox *)GetDlgItem(IDC_COMBO_TRANSFER);
00428         int index;
00429         if ((index = comboBox->GetCurSel()) == 0)
00430                 return;
00431 
00432 
00433         if (m_vTransferIndices.size() == 2) {
00434                 m_ResetComboBox(TRUE);
00435                 return;
00436         }
00437 
00438 
00439         INDEXLIST::iterator it = m_vTransferIndices.erase(m_vTransferIndices.begin() + index);
00440         INDEXLIST::iterator it2 = m_vTransferIndices.end();
00441 
00442         if ((it - 1) == m_vTransferIndices.begin())
00443                 it->m_sdBegin = 0;
00444         else if (it != m_vTransferIndices.end())
00445                 it->m_sdBegin = (it - 1)->m_sdEnd + 1;
00446         
00447         
00448         m_sStaticFrom = "0";
00449         m_sStaticLeft = "0";
00450         m_sStaticRight = "4095";
00451         m_dTransferTo = 4095;
00452 
00453 
00454         m_ResetComboBox();      
00455 
00456 
00457         CDC *cdc = (CDC *)this->GetDC();
00458         cdc->FillSolidRect(560, 159, 61, 23, 0x00FFFFFF);
00459 
00460         UpdateData(FALSE);
00461 }

void transferfuncform::OnButtonTransferExport   [protected]
 

Definition at line 489 of file transferfuncform.cpp.

References CTransfuncFile::SaveTransferFunc().

00490 {
00491         // TODO: Add your control notification handler code here
00492         CFileDialog fd(FALSE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
00493                                         "Dat Files (*.tff)|*.tff| AllFiles (*.*)|* *|", this);
00494         
00495 
00496         int returnVal = fd.DoModal();
00497 
00498         if (returnVal != IDOK)
00499                 return;
00500 
00501         
00502         CString filename = fd.GetFileName();
00503         char *fn = new char[filename.GetLength() + 1];
00504         for (int i = 0; i < filename.GetLength(); i++) {
00505                 fn[i] = filename.GetAt(i);
00506         }
00507         fn[i] = '\0';
00508 
00509         CTransfuncFile funcFile;
00510         funcFile.SaveTransferFunc(m_vTransferIndices, fn);
00511 }

void transferfuncform::OnButtonTransferImport   [protected]
 

Definition at line 513 of file transferfuncform.cpp.

References INDEXLIST, CTransfuncFile::LoadTransferFunc(), m_cTemp, m_dSliderAlpha, m_dTransferAlpha, m_dTransferTo, m_ResetComboBox(), m_sStaticFrom, m_sStaticLeft, m_sStaticRight, and m_vTransferIndices.

00514 {
00515         // TODO: Add your control notification handler code here
00516         CFileDialog fd(TRUE, NULL, NULL, OFN_FILEMUSTEXIST,
00517                                         "Dat Files (*.tff)|*.tff| AllFiles (*.*)|* *|", this);
00518         
00519 
00520         int returnVal = fd.DoModal();
00521 
00522         if (returnVal != IDOK)
00523                 return;
00524 
00525 
00526         CString filename = fd.GetFileName();
00527         char *fn = new char[filename.GetLength() + 1];
00528         for (int i = 0; i < filename.GetLength(); i++) {
00529                 fn[i] = filename.GetAt(i);
00530         }
00531         fn[i] = '\0';
00532 
00533         CTransfuncFile funcFile;
00534         m_vTransferIndices.clear();
00535         bool success;
00536         INDEXLIST temp = funcFile.LoadTransferFunc(fn, success);
00537         if (success)
00538                 m_vTransferIndices = temp;
00539         else
00540                 return;
00541 
00542         m_cTemp = 0x00FFFFFF;
00543         m_sStaticFrom = "0";
00544         m_sStaticLeft = "0";
00545         m_sStaticRight = "4095";
00546         m_dTransferAlpha = 255;
00547         m_dSliderAlpha = 255;
00548         m_dTransferTo = 4095;
00549 
00550         m_ResetComboBox();
00551 
00552         
00553         UpdateData(FALSE);
00554 }

void transferfuncform::OnButtonTransferNew   [protected]
 

Definition at line 352 of file transferfuncform.cpp.

References m_bActive, m_dTransferTo, INDICES::m_sdEnd, m_sStaticFrom, and m_vTransferIndices.

00353 {
00354         // TODO: Add your control notification handler code here
00355         if (m_bActive)
00356                 return;
00357 
00358         m_bActive = true;
00359 
00360         
00361         ((CButton *)GetDlgItem(IDC_BUTTON_TRANSFER_SAVE))->EnableWindow(TRUE);
00362 
00363         CComboBox *comboBox = (CComboBox *)GetDlgItem(IDC_COMBO_TRANSFER);
00364         int size = m_vTransferIndices.size() - 1;
00365         std::string text = "TRANSFORM_";
00366         char s[5];
00367         _itoa(size, s, 10);
00368         text += s;
00369 
00370         comboBox->SetCurSel(comboBox->AddString(text.c_str()));
00371         INDICES i;
00372         if (!size) {
00373                 _itoa(0, s, 10);
00374                 m_sStaticFrom = s;
00375         }
00376         else {
00377                 i = m_vTransferIndices.back();
00378                 _itoa(i.m_sdEnd + 1, s, 10);
00379                 m_sStaticFrom = s;
00380         }
00381 
00382         m_dTransferTo = 4095;
00383         
00384         UpdateData(FALSE);
00385 }

void transferfuncform::OnButtonTransferSave   [protected]
 

Definition at line 274 of file transferfuncform.cpp.

References m_bActive, m_cTemp, m_DrawHistogram(), m_dTransferAlpha, m_dTransferTo, m_sStaticFrom, m_sStaticLeft, m_sStaticRight, and m_vTransferIndices.

00275 {
00276         // TODO: Add your control notification handler code here
00277         if (((CComboBox *)GetDlgItem(IDC_COMBO_TRANSFER))->GetCurSel() == 0)
00278                 return;
00279 
00280 
00281         UpdateData(TRUE);
00282         ((CButton *)GetDlgItem(IDC_BUTTON_TRANSFER_SAVE))->EnableWindow(FALSE);
00283 
00284         if (m_dTransferTo < atoi(m_sStaticFrom)) {
00285                 MessageBox("to must be greater or equal than from");
00286                 ((CEdit *)GetDlgItem(IDC_EDIT_TRANSFER_TO))->SetFocus();
00287         }
00288 
00289         char text[5];
00290         m_sStaticLeft = m_sStaticFrom;
00291         _itoa(m_dTransferTo, text, 10);
00292         m_sStaticRight = text;
00293 
00294         int index;
00295 
00296         if ((index = ((CComboBox *)GetDlgItem(IDC_COMBO_TRANSFER))->GetCurSel()) < m_vTransferIndices.size()) {
00297                 m_vTransferIndices[index].m_scColor = m_cTemp;
00298                 m_vTransferIndices[index].m_sdBegin = atoi(m_sStaticFrom);
00299                 m_vTransferIndices[index].m_sdEnd = m_dTransferTo;
00300                 m_vTransferIndices[index].m_ucAlpha = m_dTransferAlpha;
00301         }
00302         else {
00303                 INDICES i = { atoi(m_sStaticFrom), m_dTransferTo, m_dTransferAlpha, m_cTemp };
00304                 m_vTransferIndices.push_back(i);
00305         }
00306 
00307 
00308         if (index != m_vTransferIndices.size() - 1) {
00309                 if (m_vTransferIndices[index].m_sdEnd != m_vTransferIndices[index + 1].m_sdBegin - 1)
00310                         m_vTransferIndices[index + 1].m_sdBegin = m_vTransferIndices[index].m_sdEnd + 1;
00311         }
00312 
00313 
00314         m_bActive = false;
00315 
00316 
00317         m_DrawHistogram((CDC *)this->GetDC(),
00318                                         m_vTransferIndices[index].m_sdBegin,
00319                                         m_vTransferIndices[index].m_sdEnd);
00320 
00321         ((CComboBox *)GetDlgItem(IDC_COMBO_TRANSFER))->SetFocus();
00322         UpdateData(FALSE);
00323 }

void transferfuncform::OnChangeEditTransferAlpha   [protected]
 

Definition at line 474 of file transferfuncform.cpp.

References m_dSliderAlpha, and m_dTransferAlpha.

00475 {
00476         // TODO: If this is a RICHEDIT control, the control will not
00477         // send this notification unless you override the CDialog::OnInitDialog()
00478         // function and call CRichEditCtrl().SetEventMask()
00479         // with the ENM_CHANGE flag ORed into the mask.
00480         
00481         // TODO: Add your control notification handler code here
00482         UpdateData(TRUE);
00483         m_dSliderAlpha = m_dTransferAlpha;
00484         UpdateData(FALSE);
00485         ((CButton *)GetDlgItem(IDC_BUTTON_TRANSFER_SAVE))->EnableWindow(TRUE);
00486 }

void transferfuncform::OnChangeEditTransferTo   [protected]
 

Definition at line 556 of file transferfuncform.cpp.

References m_sStaticRight.

00557 {
00558         // TODO: If this is a RICHEDIT control, the control will not
00559         // send this notification unless you override the CDialog::OnInitDialog()
00560         // function and call CRichEditCtrl().SetEventMask()
00561         // with the ENM_CHANGE flag ORed into the mask.
00562         
00563         // TODO: Add your control notification handler code here
00564         UpdateData(TRUE);
00565         char s[5];
00566         _itoa(m_dTransferTo, s, 10);
00567         m_sStaticRight = s;
00568         UpdateData(FALSE);
00569         ((CButton *)GetDlgItem(IDC_BUTTON_TRANSFER_SAVE))->EnableWindow(TRUE);
00570 }

void transferfuncform::OnHScroll UINT    nSBCode,
UINT    nPos,
CScrollBar *    pScrollBar
[protected]
 

Definition at line 463 of file transferfuncform.cpp.

References m_dSliderAlpha, and m_dTransferAlpha.

00464 {
00465         // TODO: Add your message handler code here and/or call default
00466         UpdateData(TRUE);
00467         m_dTransferAlpha = m_dSliderAlpha;
00468         UpdateData(FALSE);
00469         ((CButton *)GetDlgItem(IDC_BUTTON_TRANSFER_SAVE))->EnableWindow(TRUE);
00470         
00471         CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
00472 }

void transferfuncform::OnOK   [protected, virtual]
 

Definition at line 177 of file transferfuncform.cpp.

References INDICES::m_sdEnd, and m_vTransferIndices.

00178 {
00179         // TODO: Add extra validation here
00180 //      UpdateData(TRUE);
00181 
00182         INDICES i;
00183         
00184 /*
00185         if (m_vTransferIndices.size() == 1) {
00186                 INDICES j = { 0, 4095, 255, 0x00FFFFFF };
00187                 m_vTransferIndices.push_back(j);
00188         }
00189         else 
00190 */
00191         if ((i = m_vTransferIndices.back()).m_sdEnd != 4095) {
00192                 INDICES j = { i.m_sdEnd + 1, 4095, 255, 0x00000000 };
00193                 m_vTransferIndices.push_back(j);
00194         }
00195 
00196         CDialog::OnOK();
00197 }

void transferfuncform::OnPaint   [protected]
 

Definition at line 229 of file transferfuncform.cpp.

References m_DrawHistogram().

00230 {
00231         CPaintDC dc(this); // device context for painting
00232 
00233         CComboBox *comboBox = (CComboBox *)this->GetDlgItem(IDC_COMBO_TRANSFER);
00234         int sel = comboBox->GetCurSel();
00235         dc.FillSolidRect(560, 159, 61, 23, m_vTransferIndices[sel].m_scColor);
00236 
00237 
00238         m_DrawHistogram(&dc,
00239                                         m_vTransferIndices[sel].m_sdBegin,
00240                                         m_vTransferIndices[sel].m_sdEnd);
00241         
00242 
00243 
00244 
00245         // TODO: Add your message handler code here
00246         
00247         // Do not call CDialog::OnPaint() for painting messages
00248 }

void transferfuncform::OnSelchangeComboTransfer   [protected]
 

Definition at line 387 of file transferfuncform.cpp.

References m_DrawHistogram(), m_dSliderAlpha, m_dTransferAlpha, m_dTransferTo, m_sStaticFrom, m_sStaticLeft, m_sStaticRight, and m_vTransferIndices.

00388 {
00389         // TODO: Add your control notification handler code here
00390         ((CButton *)GetDlgItem(IDC_BUTTON_TRANSFER_SAVE))->EnableWindow(FALSE);
00391                 
00392         CComboBox *comboBox = (CComboBox *)GetDlgItem(IDC_COMBO_TRANSFER);
00393         int i = comboBox->GetCount();
00394         if ((m_vTransferIndices.size() != i) && (comboBox->GetCurSel() != (i - 1)))
00395                 comboBox->DeleteString(i - 1);
00396 
00397         i = comboBox->GetCurSel();
00398         char s[5];
00399         _itoa(m_vTransferIndices[i].m_sdBegin, s, 10);
00400         m_sStaticFrom = s;
00401         m_sStaticLeft = s;
00402         _itoa(m_vTransferIndices[i].m_sdEnd, s, 10);
00403         m_sStaticRight = s;
00404         m_dTransferTo = m_vTransferIndices[i].m_sdEnd;
00405 
00406         m_dSliderAlpha = m_vTransferIndices[i].m_ucAlpha;
00407         m_dTransferAlpha = m_vTransferIndices[i].m_ucAlpha;
00408 
00409         CDC *cdc = (CDC *)this->GetDC();
00410         cdc->FillSolidRect(560, 159, 61, 23, m_vTransferIndices[i].m_scColor);
00411 
00412         m_DrawHistogram(cdc,
00413                                         m_vTransferIndices[i].m_sdBegin,
00414                                         m_vTransferIndices[i].m_sdEnd);
00415 
00416         UpdateData(FALSE);
00417 
00418 }

void transferfuncform::OnShowWindow BOOL    bShow,
UINT    nStatus
[protected]
 

Definition at line 199 of file transferfuncform.cpp.

References m_vTransferIndices.

00200 {
00201         CDialog::OnShowWindow(bShow, nStatus);
00202 
00203         // TODO: Add your message handler code here
00204         if (!bShow)
00205                 return;
00206 
00207         ((CButton *)GetDlgItem(IDC_BUTTON_TRANSFER_SAVE))->EnableWindow(FALSE);
00208         ((CSliderCtrl *)GetDlgItem(IDC_SLIDER_TRANSFER_ALPHA))->SetRange(0, 255, TRUE);
00209 
00210 //      UpdateData(FALSE);
00211 
00212         CComboBox *comboBox = (CComboBox *)GetDlgItem(IDC_COMBO_TRANSFER);
00213 
00214         std::string text = "TRANSFORM_";
00215         for (int i = 0; i < m_vTransferIndices.size() - 1; i++) {
00216                 char s[5];
00217                 _itoa(i, s, 10);
00218                 text += s;
00219                 comboBox->AddString(text.c_str());
00220                 text.erase(10, strlen(s));
00221         }
00222 
00223         comboBox->SetCurSel(0);
00224 
00225         UpdateData(FALSE);
00226 }


Member Data Documentation

bool transferfuncform::m_bActive [private]
 

Definition at line 34 of file transferfuncform.h.

Referenced by OnButtonTransferNew(), and OnButtonTransferSave().

COLORREF transferfuncform::m_cTemp
 

Definition at line 57 of file transferfuncform.h.

Referenced by OnButtonTransferColor(), OnButtonTransferImport(), OnButtonTransferSave(), and transferfuncform().

int transferfuncform::m_dSliderAlpha [private]
 

Definition at line 45 of file transferfuncform.h.

Referenced by OnButtonTransferImport(), OnChangeEditTransferAlpha(), OnHScroll(), OnSelchangeComboTransfer(), and transferfuncform().

CString transferfuncform::m_dStaticMaxDenstity [private]
 

Definition at line 46 of file transferfuncform.h.

Referenced by m_DrawHistogram(), and transferfuncform().

int transferfuncform::m_dTransferAlpha [private]
 

Definition at line 44 of file transferfuncform.h.

Referenced by OnButtonTransferImport(), OnButtonTransferSave(), OnChangeEditTransferAlpha(), OnHScroll(), OnSelchangeComboTransfer(), and transferfuncform().

int transferfuncform::m_dTransferTo [private]
 

Definition at line 40 of file transferfuncform.h.

Referenced by OnButtonTransferClear(), OnButtonTransferDelete(), OnButtonTransferImport(), OnButtonTransferNew(), OnButtonTransferSave(), OnSelchangeComboTransfer(), and transferfuncform().

CString transferfuncform::m_sStaticFrom [private]
 

Definition at line 43 of file transferfuncform.h.

Referenced by OnButtonTransferClear(), OnButtonTransferDelete(), OnButtonTransferImport(), OnButtonTransferNew(), OnButtonTransferSave(), OnSelchangeComboTransfer(), and transferfuncform().

CString transferfuncform::m_sStaticLeft [private]
 

Definition at line 42 of file transferfuncform.h.

Referenced by OnButtonTransferClear(), OnButtonTransferDelete(), OnButtonTransferImport(), OnButtonTransferSave(), OnSelchangeComboTransfer(), and transferfuncform().

CString transferfuncform::m_sStaticRight [private]
 

Definition at line 41 of file transferfuncform.h.

Referenced by OnButtonTransferClear(), OnButtonTransferDelete(), OnButtonTransferImport(), OnButtonTransferSave(), OnChangeEditTransferTo(), OnSelchangeComboTransfer(), and transferfuncform().

INDEXLIST transferfuncform::m_vTransferIndices
 

Definition at line 58 of file transferfuncform.h.

Referenced by m_ResetComboBox(), OnButtonTransferClear(), OnButtonTransferDelete(), OnButtonTransferImport(), OnButtonTransferNew(), OnButtonTransferSave(), OnOK(), CMy3dvisApp::OnOptionsTransfer(), OnSelchangeComboTransfer(), OnShowWindow(), and transferfuncform().


The documentation for this class was generated from the following files:
Generated on Thu Jan 23 12:32:17 2003 by doxygen1.3-rc2