30 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
33 _withOfContourLine =
new wxSlider(
this, -1, 1 , 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
47 int min = (int)floor (range[0]);
48 int max = (int)ceil (range[1]);
51 _brithtnessWindowLevel =
new wxSlider(
this, -1, windowlevel , min, max, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
52 _brithtnessColorLevel =
new wxSlider(
this, -1, colorwindow , min, max, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
66 wxFlexGridSizer * sizer =
new wxFlexGridSizer(1);
67 sizer -> Add(
new wxStaticText(
this,-1, _T(
"Contour width")) , 1, wxGROW );
69 sizer -> Add(
new wxStaticText(
this,-1, _T(
" ")) , 1, wxGROW );
70 sizer -> Add(
new wxStaticText(
this,-1, _T(
" ")) , 1, wxGROW );
71 sizer -> Add(
new wxStaticText(
this,-1, _T(
"Brightness of the image")) , 1, wxGROW );
72 sizer -> Add(
new wxStaticText(
this,-1, _T(
"--Window level--")) , 1, wxGROW );
74 sizer -> Add(
new wxStaticText(
this,-1, _T(
"--Color level--")) , 1, wxGROW );
76 sizer -> Add(
new wxStaticText(
this,-1, _T(
" ")) , 1, wxGROW );
77 sizer -> Add(
new wxStaticText(
this,-1, _T(
" ")) , 1, wxGROW );
80 this->SetSizer( sizer );
84 this->SetAutoLayout(
true );
121 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
130 wxButton *spreadResetBtn =
new wxButton(
this,-1,_T(
"Reset"),wxDefaultPosition, wxDefaultSize );
131 wxButton *spreadAddBtn =
new wxButton(
this,-1,_T(
"Add key contour "),wxDefaultPosition, wxDefaultSize);
132 wxButton *spreadAddAllBtn =
new wxButton(
this,-1,_T(
"Add All to key contour"),wxDefaultPosition, wxDefaultSize);
134 wxString lstOptions[3];
135 lstOptions[0]=_T(
"A");
136 lstOptions[1]=_T(
"B");
137 lstOptions[2]=_T(
"C");
138 _spreadMethodRadiobox =
new wxRadioBox(
this, -1, _T(
"Method (find ctrl. Points)"), wxDefaultPosition, wxDefaultSize, 3 , lstOptions, 3, wxRA_SPECIFY_COLS);
141 wxButton *spreadGoBtn =
new wxButton(
this,-1,_T(
"Go"),wxDefaultPosition, wxDefaultSize);
144 _wxtextctrlSpread =
new wxTextCtrl(
this,-1, _T(
""),wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
152 wxFlexGridSizer * sizer =
new wxFlexGridSizer(1);
153 sizer -> Add( spreadResetBtn , 1, wxGROW );
154 sizer -> Add( spreadAddBtn , 1, wxGROW );
155 sizer -> Add( spreadAddAllBtn , 1, wxGROW );
157 sizer -> Add( spreadGoBtn , 1, wxGROW );
162 this->SetSizer( sizer );
164 this->SetAutoLayout(
true );
189 printf(
"EED interfSpreadPanel::onSpreadGo %d\n",typeMethodFindCtrlPoints);
199 newstring.append(wxString(
" ",wxConvUTF8));
200 newstring.append(wxString(val.c_str(),wxConvUTF8));
206 wxString newstring(stringtemp.c_str(),wxConvUTF8);
216 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
219 wxString lstOptions[4];
220 lstOptions[0]=_T(
"Current Slice");
221 lstOptions[1]=_T(
"Range Slices");
223 _informationRadiobox =
new wxRadioBox(
this, -1, _T(
"Slice analysis"), wxDefaultPosition, wxSize(270,45), 2 , lstOptions, 2, wxRA_SPECIFY_COLS);
226 wxString lstOptContOperation[5];
227 lstOptContOperation[0]=_T(
"AND");
228 lstOptContOperation[1]=_T(
"OR");
229 lstOptContOperation[2]=_T(
"XOR");
230 lstOptContOperation[3]=_T(
"ALL");
231 _radiolstboxContourGroup =
new wxRadioBox(
this, -1, _T(
"Contour group"), wxDefaultPosition, wxSize(270,45), 4 , lstOptContOperation, 4, wxRA_SPECIFY_COLS);
236 _XYZValues =
new wxCheckBox(
this, -1, _T(
"Save Contour Values") );
239 _contourImage =
new wxCheckBox(
this, -1, _T(
"Extract Contours as Images") );
242 _statistics =
new wxCheckBox(
this, -1, _T(
"Save Statistics") );
245 wxButton *informationContourLabelsBtn =
new wxButton(
this,-1,_T(
"Contour labels"),wxDefaultPosition, wxSize(140,35) );
246 informationContourLabelsBtn->SetEventHandler(
this );
249 wxButton *statisticsContourBtn =
new wxButton(
this,-1,_T(
"Contour statistics"),wxDefaultPosition, wxSize(140,35) );
250 statisticsContourBtn->SetEventHandler(
this );
253 wxButton *showResultImagesBtn =
new wxButton(
this,-1,_T(
"Show result images"),wxDefaultPosition, wxSize(140,35) );
254 showResultImagesBtn->SetEventHandler(
this );
258 wxButton *saveResultsBtn =
new wxButton(
this,-1,_T(
"Save Results"),wxDefaultPosition, wxSize(140,35) );
259 saveResultsBtn->SetEventHandler(
this );
283 int min = (int)floor (range[0]);
284 int max = (int)ceil (range[1]);
310 _grid =
new wxGrid(
this,
313 wxSize( 200, 500 ) );
315 int i,gridCol=10,gridRow=sizeZ+2;
316 _grid->CreateGrid( 0, 0 );
317 _grid->AppendRows(gridRow);
318 _grid->AppendCols(gridCol);
320 for (i=0;i<gridRow;i++)
322 _grid->SetRowLabelValue(i, _T(
" ") );
329 wxFlexGridSizer * sizerSave =
new wxFlexGridSizer(2,2);
330 sizerSave -> Add(
new wxStaticText(
this,-1,_T(
"Save Options: ")) , 1, wxGROW );
335 wxFlexGridSizer * sizerA =
new wxFlexGridSizer(10);
338 sizerA->Add( sizerSave, 1, wxALL, 2 );
341 wxFlexGridSizer * sizerB =
new wxFlexGridSizer(10);
342 sizerB->Add( informationContourLabelsBtn, 1, wxALL, 2 );
343 sizerB->Add( statisticsContourBtn, 1, wxALL, 2 );
344 sizerB->Add( showResultImagesBtn, 1, wxALL, 2 );
345 sizerB->Add( saveResultsBtn, 1, wxALL, 2 );
347 wxFlexGridSizer * sizer =
new wxFlexGridSizer(1,8);
348 sizer->Add( sizerA , 1, wxALL , 0 );
349 sizer->Add(
new wxStaticText(
this ,-1,_T(
"Slice Range")) , 1, wxALL , 0 );
351 sizer->Add(
new wxStaticText(
this ,-1,_T(
"Gray Range")) , 1, wxALL , 0 );
353 sizer->Add( sizerB , 1, wxEXPAND , 0 );
354 sizer->Add( _staticTextInformation , 1, wxEXPAND , 0 );
355 sizer->Add(
_grid , 1, wxEXPAND , 0 );
357 this->SetSizer( sizer );
358 this->SetSize( wxSize(1500,1500) );
360 this->SetAutoLayout(
true );
412 wxFileDialog dialog(
this, _T(
"Choose a filename"), _T(
""), _T(
""), wxFileSelectorDefaultWildcardStr, wxSAVE );
413 if (dialog.ShowModal() == wxID_OK)
419 std::string directory = (
const char *)(dialog.GetDirectory().mb_str());
420 std::string namefile = (
const char *)(dialog.GetFilename().mb_str());
421 std::string filename = (
const char *)(dialog.GetPath().mb_str() );
434 _grid->SetColLabelValue(0, _T(
"A") );
435 _grid->SetColLabelValue(1, _T(
"B") );
436 _grid->SetColLabelValue(2, _T(
"C") );
437 _grid->SetColLabelValue(3, _T(
"D") );
438 _grid->SetColLabelValue(4, _T(
"E") );
439 _grid->SetColLabelValue(5, _T(
"F") );
443 int ii,sizeLstContourThings;
444 for ( z=0 ; z<sizeZ ; z++)
451 sizeLstContourThings = lstContourThings.size();
452 tempString.Printf(_T(
"%d - %d"),z, sizeLstContourThings);
453 _grid->SetRowLabelValue(z, tempString );
455 for (ii=0 ; ii<sizeLstContourThings ; ii++)
459 tempString = wxString(lstContourThings[ii].c_str(),wxConvUTF8) ;
460 _grid->SetCellValue( z, ii, tempString );
465 _grid->SetRowLabelValue(sizeZ, _T(
" ") );
466 for (ii=0 ; ii<sizeLstContourThings ; ii++)
468 _grid->SetCellValue( sizeZ, ii, _T(
" ") );
478 _grid->SetRowLabelValue(z, tempString );
482 return _grid->GetNumberCols();
486 _grid->AppendCols(numcols);
490 _grid->SetCellValue( z, tmpIntA , tempString );
494 _grid->SetColLabelValue(tmpIntB, tmpTitleString);
498 return _grid->GetCellValue( j , i );
503 printf(
"EED interfInformationPanel::onContourGroup \n");
514 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
523 options[2]=_T(
"inch");
525 _unitsRadiobox =
new wxRadioBox(
this, -1, _T(
"Unit of measurement"), wxPoint(2, 25), wxSize(145,45), 3 , options, 3, wxRA_SPECIFY_COLS);
529 new wxStaticText(
this, wxID_ANY, wxT(
"Real Size: "), wxPoint(2, 5));
532 _size =
new wxTextCtrl(
this, wxID_ANY, wxT(
""), wxPoint(78,3), wxSize(70, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
535 new wxButton(
this, 1, wxT(
"Calibrate"), wxPoint(78, 70), wxSize(70, 25), 0, wxDefaultValidator, wxT(
"button"));
548 wxString size =
_size->GetValue();