lstOptions[0]=_T("Current Slice");
lstOptions[1]=_T("Range Slices");
// lstOptions[2]=_T("All Slices");
- _informationRadiobox = new wxRadioBox(this, -1, _T("Slice analysis"), wxDefaultPosition, wxSize(270,45), 2 , lstOptions, 2, wxRA_SPECIFY_COLS);
+ _informationRadiobox = new wxRadioBox(this, -1, _T("Slice analysis"), wxDefaultPosition, wxSize(270,45), 2 , lstOptions, 2, wxRA_SPECIFY_COLS);
+
wxString lstOptContOperation[5];
lstOptContOperation[0]=_T("AND");
lstOptContOperation[1]=_T("OR");
lstOptContOperation[2]=_T("XOR");
lstOptContOperation[3]=_T("ALL");
_radiolstboxContourGroup = new wxRadioBox(this, -1, _T("Contour group"), wxDefaultPosition, wxSize(270,45), 4 , lstOptContOperation, 4, wxRA_SPECIFY_COLS);
-
+ _radiolstboxContourGroup->SetSelection(1);
+ Connect( _radiolstboxContourGroup->GetId(), wxEVT_COMMAND_RADIOBOX_SELECTED , (wxObjectEventFunction) &interfInformationPanel::onContourGroup );
+
+
_XYZValues = new wxCheckBox(this, -1, _T("Save Contour Values") );
_XYZValues->SetValue(true);
return _grid->GetCellValue( j , i );
}
+void interfInformationPanel::onContourGroup(wxCommandEvent& event)
+{
+ printf("EED interfInformationPanel::onContourGroup \n");
+ int contourGroup=_radiolstboxContourGroup->GetSelection();
+ if (contourGroup==3)
+ {
+ contourGroup=0;
+ }
+ interfMainPanel::getInstance()->SetContourGroup( _radiolstboxContourGroup->GetSelection() );
+}
+
+//CMRU 29-08-09-----------------------------------------------------------------------------------------------
+interfCalibrationPanel:: interfCalibrationPanel(wxWindow * parent)
+: wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
+{
+ double range[2];
+ interfMainPanel::getInstance()->getImageRange(range);
+
+ //Radio buttons
+ wxString options[3];
+ options[0]=_T("mm");
+ options[1]=_T("cm");
+ options[2]=_T("inch");
+
+ _unitsRadiobox = new wxRadioBox(this, -1, _T("Unit of measurement"), wxPoint(2, 25), wxSize(145,45), 3 , options, 3, wxRA_SPECIFY_COLS);
+ _unitsRadiobox->SetSelection(0);
+
+ //The label
+ new wxStaticText(this, wxID_ANY, wxT("Real Size: "), wxPoint(2, 5));
+
+ //Text Control
+ _size = new wxTextCtrl(this, wxID_ANY, wxT(""), wxPoint(78,3), wxSize(70, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
+
+ //The button
+ new wxButton(this, 1, wxT("Calibrate"), wxPoint(78, 70), wxSize(70, 25), 0, wxDefaultValidator, wxT("button"));
+
+ //Conexion del boton con su respectivo manejador
+ Connect(1, wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction) &interfCalibrationPanel::onCalibrate);
+
+}
+
+interfCalibrationPanel:: ~interfCalibrationPanel()
+{
+}
+
+void interfCalibrationPanel::onCalibrate(wxCommandEvent& event)
+{
+ wxString size =_size->GetValue();
+ int unit = _unitsRadiobox->GetSelection();
+ interfMainPanel::getInstance()->onCalibration(size, unit);
+}
+//------------------------------------------------------------------------------------------------------------
\ No newline at end of file