CSetHeaderDLG Class Reference

#include <SetHeaderDLG.h>

List of all members.

Public Types

enum  { IDD = IDD_FHDLG }

Public Member Functions

 CSetHeaderDLG (CWnd *pParent=NULL)
void setParameter (int h, int x, int y, int z, int d, int b=0, BOOL ltend=FALSE, BOOL dicom=FALSE)
virtual BOOL OnInitDialog ()
CmnHead getCmnHead ()
afx_msg void OnBnClickedOk ()
afx_msg void OnBnClickedFhSavep ()

Public Attributes

CEdit * hEBox
CEdit * xEBox
CEdit * yEBox
CEdit * zEBox
CEdit * dEBox
CEdit * bEBox
CButton * eCBox
CButton * sCBox
int hSize
int xSize
int ySize
int zSize
int dSize
int zBase
BOOL ltEnd
BOOL sPara

Protected Member Functions

virtual void DoDataExchange (CDataExchange *pDX)
virtual void OnOK ()

Detailed Description

Definition at line 13 of file SetHeaderDLG.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
IDD 

Definition at line 51 of file SetHeaderDLG.h.

00051 { IDD = IDD_FHDLG };


Constructor & Destructor Documentation

CSetHeaderDLG ( CWnd *  pParent = NULL  ) 

Definition at line 24 of file SetHeaderDLG.cpp.

References CSetHeaderDLG::bEBox, CSetHeaderDLG::dEBox, CSetHeaderDLG::dSize, CSetHeaderDLG::eCBox, CSetHeaderDLG::hEBox, CSetHeaderDLG::hSize, CSetHeaderDLG::ltEnd, CSetHeaderDLG::sCBox, CSetHeaderDLG::sPara, CSetHeaderDLG::xEBox, CSetHeaderDLG::xSize, CSetHeaderDLG::yEBox, CSetHeaderDLG::ySize, CSetHeaderDLG::zBase, CSetHeaderDLG::zEBox, and CSetHeaderDLG::zSize.

00024                                           : CDialog(CSetHeaderDLG::IDD, pParent) 
00025 {
00026     //{{AFX_DATA_INIT(CSetHeaderDLG)
00027         // メモ - ClassWizard はこの位置にマッピング用のマクロを追加または削除します.
00028     //}}AFX_DATA_INIT
00029 
00030     hSize = 0;
00031     xSize = 512;
00032     ySize = 512;
00033     zSize = 1;
00034     dSize = 16;
00035     zBase = 0;
00036 
00037     ltEnd  = FALSE;
00038 //  dicomF = FALSE;
00039     sPara  = FALSE;
00040 
00041     hEBox = NULL; 
00042     xEBox = NULL; 
00043     yEBox = NULL; 
00044     zEBox = NULL; 
00045     dEBox = NULL; 
00046     eCBox = NULL;
00047 //  dCBox = NULL;
00048     sCBox = NULL;
00049     bEBox = NULL;
00050 }


Member Function Documentation

void DoDataExchange ( CDataExchange *  pDX  )  [protected, virtual]

Definition at line 54 of file SetHeaderDLG.cpp.

00055 {
00056     CDialog::DoDataExchange(pDX);
00057     //{{AFX_DATA_MAP(CSetHeaderDLG)
00058         // メモ - ClassWizard はこの位置にマッピング用のマクロを追加または削除します.
00059     //}}AFX_DATA_MAP
00060 
00061 }

CmnHead getCmnHead (  ) 

Definition at line 181 of file SetHeaderDLG.cpp.

References CSetHeaderDLG::dSize, CSetHeaderDLG::hSize, CSetHeaderDLG::ltEnd, CSetHeaderDLG::sPara, CSetHeaderDLG::xSize, CSetHeaderDLG::ySize, CSetHeaderDLG::zBase, and CSetHeaderDLG::zSize.

Referenced by CRwGRDoc::ReadDataFile().

00182 {
00183     CmnHead  hd;
00184     
00185     init_CmnHead(&hd);
00186     hd.kind = 0;
00187 
00188     if (zBase!=0) {
00189         hd.kind |= HAS_BASE;
00190         ZeroBase = zBase;
00191     }
00192     if (ltEnd)  hd.kind |= HAS_LENDIAN;
00193 
00194 /*  if (dicomF) {
00195         hd.kind |= DICOM_DATA;
00196         hd.xsize = 512;
00197         hd.ysize = 512;
00198         hd.depth = 16;
00199     }
00200 */
00201     if (sPara) {
00202         hd.kind |= USERSET_DATA;
00203         hd.xsize = xSize;
00204         hd.ysize = ySize;
00205         hd.zsize = zSize;
00206         hd.depth = dSize;
00207         hd.bsize = hSize;
00208         hd.lsize = xSize*ySize*zSize*((dSize+7)/8);
00209     }
00210     
00211     return hd;
00212 }

Here is the caller graph for this function:

void OnBnClickedFhSavep (  ) 

Definition at line 224 of file SetHeaderDLG.cpp.

00225 {
00226     // TODO: ここにコントロール通知ハンドラ コードを追加します.
00227 }

void OnBnClickedOk (  ) 

Definition at line 216 of file SetHeaderDLG.cpp.

References CSetHeaderDLG::OnOK().

00217 {
00218     // TODO : ここにコントロール通知ハンドラ コードを追加します.
00219     OnOK();
00220 }

Here is the call graph for this function:

BOOL OnInitDialog (  )  [virtual]

Definition at line 93 of file SetHeaderDLG.cpp.

References CSetHeaderDLG::bEBox, CSetHeaderDLG::dEBox, CSetHeaderDLG::dSize, CSetHeaderDLG::eCBox, CSetHeaderDLG::hEBox, CSetHeaderDLG::hSize, IDC_FH_BASE, IDC_FH_DEPTH, IDC_FH_HSIZE, IDC_FH_LTLEND, IDC_FH_SAVEP, IDC_FH_XSIZE, IDC_FH_YSIZE, IDC_FH_ZSIZE, CSetHeaderDLG::ltEnd, CSetHeaderDLG::sCBox, CSetHeaderDLG::sPara, CSetHeaderDLG::xEBox, CSetHeaderDLG::xSize, CSetHeaderDLG::yEBox, CSetHeaderDLG::ySize, CSetHeaderDLG::zBase, CSetHeaderDLG::zEBox, and CSetHeaderDLG::zSize.

00094 {
00095     TCHAR buf[LNAME];
00096 //  memset(buf, 0, LNAME);
00097 
00098     hEBox = (CEdit*)GetDlgItem(IDC_FH_HSIZE);
00099     xEBox = (CEdit*)GetDlgItem(IDC_FH_XSIZE);
00100     yEBox = (CEdit*)GetDlgItem(IDC_FH_YSIZE);
00101     zEBox = (CEdit*)GetDlgItem(IDC_FH_ZSIZE);
00102     dEBox = (CEdit*)GetDlgItem(IDC_FH_DEPTH);
00103     sCBox = (CButton*)GetDlgItem(IDC_FH_SAVEP);
00104 
00105     eCBox = (CButton*)GetDlgItem(IDC_FH_LTLEND);
00106     bEBox = (CEdit*)GetDlgItem(IDC_FH_BASE);
00107 
00108     sntprintf(buf, LNAME, _T("%d"), hSize);
00109     hEBox->SetWindowText(buf);
00110 
00111     sntprintf(buf, LNAME, _T("%d"), xSize);
00112     xEBox->SetWindowText(buf);
00113 
00114     sntprintf(buf, LNAME, _T("%d"), ySize);
00115     yEBox->SetWindowText(buf);
00116 
00117     sntprintf(buf, LNAME, _T("%d"), zSize);
00118     zEBox->SetWindowText(buf);
00119 
00120     sntprintf(buf, LNAME, _T("%d"), dSize);
00121     dEBox->SetWindowText(buf);
00122 
00123     sntprintf(buf, LNAME, _T("%d"), zBase);
00124     bEBox->SetWindowText(buf);
00125 
00126     if (sPara) sCBox->SetCheck(1);
00127     else       sCBox->SetCheck(0);
00128 
00129 //  if (dicomF)dCBox->SetCheck(1);
00130 //  else       dCBox->SetCheck(0);
00131 
00132     if (ltEnd) eCBox->SetCheck(1);
00133     else       eCBox->SetCheck(0);
00134 
00135     return TRUE;
00136 }

void OnOK (  )  [protected, virtual]

Definition at line 140 of file SetHeaderDLG.cpp.

References CSetHeaderDLG::bEBox, CSetHeaderDLG::dEBox, CSetHeaderDLG::dSize, CSetHeaderDLG::eCBox, CSetHeaderDLG::hEBox, CSetHeaderDLG::hSize, CSetHeaderDLG::ltEnd, CSetHeaderDLG::sCBox, CSetHeaderDLG::sPara, CSetHeaderDLG::xEBox, CSetHeaderDLG::xSize, CSetHeaderDLG::yEBox, CSetHeaderDLG::ySize, CSetHeaderDLG::zBase, CSetHeaderDLG::zEBox, and CSetHeaderDLG::zSize.

Referenced by CSetHeaderDLG::OnBnClickedOk().

00141 {
00142     TCHAR buf[LNAME];
00143 //  memset(buf, 0, LNAME);
00144 
00145     hEBox->GetWindowText(buf, LNAME);
00146     hSize = ttoi(buf);
00147 
00148     xEBox->GetWindowText(buf, LNAME);
00149     xSize = ttoi(buf);
00150 
00151     yEBox->GetWindowText(buf, LNAME);
00152     ySize = ttoi(buf);
00153 
00154     zEBox->GetWindowText(buf, LNAME);
00155     zSize = ttoi(buf);
00156 
00157     dEBox->GetWindowText(buf, LNAME);
00158     dSize = ttoi(buf);
00159 
00160     bEBox->GetWindowText(buf, LNAME);
00161     zBase = ttoi(buf);
00162 
00163     if (sCBox->GetCheck()==1) sPara = TRUE;
00164     else                      sPara = FALSE;
00165 
00166     if (eCBox->GetCheck()==1) ltEnd = TRUE;
00167     else                      ltEnd = FALSE;
00168 
00169 /*  if (dCBox->GetCheck()==1) {
00170         dicomF = TRUE;
00171         sPara  = FALSE;
00172     }
00173     else dicomF = FALSE;
00174 */
00175     CDialog::OnOK();
00176     return;
00177 }

Here is the caller graph for this function:

void setParameter ( int  h,
int  x,
int  y,
int  z,
int  d,
int  b = 0,
BOOL  ltend = FALSE,
BOOL  dicom = FALSE 
)

Definition at line 77 of file SetHeaderDLG.cpp.

00078 {
00079     if (!sPara) {   // パラメータを保存しない設定なら
00080         hSize = h;
00081         xSize = x;
00082         ySize = y;
00083         zSize = z;
00084         dSize = d;
00085     }
00086     zBase  = b; 
00087     ltEnd  = ltend;
00088     //dicomF = dicom;
00089 }


Member Data Documentation

CEdit* bEBox
CEdit* dEBox
int dSize
CButton* eCBox
CEdit* hEBox
int hSize
BOOL ltEnd
CButton* sCBox
BOOL sPara
CEdit* xEBox
int xSize
CEdit* yEBox
int ySize
int zBase
CEdit* zEBox
int zSize

The documentation for this class was generated from the following files:

Generated on 15 Nov 2023 for JunkBox_Win_Lib by  doxygen 1.6.1