33 : wxPanel(parent, -1, wxDefaultPosition, wxSize(sizex, sizey), wxBORDER_SUNKEN)
36 PANEL =
"New Contour";
63 splitterwindow =
new wxSplitterWindow(
this,-1, wxDefaultPosition, wxSize(sizex, sizey), wxSP_3DSASH, wxString(_T(
"")));
68 wxPanel* toolpanel =
new wxPanel(
splitterwindow, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_DOUBLE, wxString(_T(
"")));
70 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(6,2,1,1);
71 toolpanel->SetSizer(flexsizer,
true);
72 toolpanel->SetAutoLayout(
true );
75 b->SetClientData(&
PANEL);
77 b1->SetClientData(&
PANEL1);
79 b2->SetClientData(&
PANEL2);
81 b3->SetClientData(&
PANEL3);
83 b4->SetClientData(&
PANEL4);
85 b5->SetClientData(&
PANEL5);
88 b6->SetClientData(&
PANEL6);
91 wxPanel* mentex =
new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T(
"")));
92 wxPanel* mentex1 =
new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T(
"")));
93 wxPanel* mentex2 =
new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T(
"")));
94 wxPanel* mentex3 =
new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T(
"")));
95 wxPanel* mentex4 =
new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T(
"")));
96 wxPanel* mentex5 =
new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T(
"")));
98 wxPanel* mentex6 =
new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T(
"")));
116 flexsizer->Add(b, wxFIXED_MINSIZE);
119 flexsizer->Add(b1, wxFIXED_MINSIZE);
122 flexsizer->Add(b2, wxFIXED_MINSIZE);
125 flexsizer->Add(b3, wxFIXED_MINSIZE);
128 flexsizer->Add(b4, wxFIXED_MINSIZE);
131 flexsizer->Add(b5, wxFIXED_MINSIZE);
133 flexsizer->Add(b6, wxFIXED_MINSIZE);
139 infoPanel =
new wxPanel(
splitterwindow, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_DOUBLE, wxString(_T(
"")));
140 wxFlexGridSizer* infosizer =
new wxFlexGridSizer(1,1,2,2);
168 _newframe =
new wxFrame(parent, -1, wxT(
" Contour Tools "), wxPoint(25,50), wxSize(350,900),wxFRAME_TOOL_WINDOW|wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN |wxFRAME_FLOAT_ON_PARENT);
180 _newframe =
new wxFrame(parent, -1, wxT(
" Contour Tools "), wxPoint(25,50), wxSize(350,900),wxFRAME_TOOL_WINDOW|wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN |wxFRAME_FLOAT_ON_PARENT );
208 wxPanel* panel =
new wxPanel(parent, -1, wxDefaultPosition, wxSize(sizex, sizey), wxBORDER_SUNKEN, wxString(_T(
"Spread")));
210 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(2,1,2,2) ;
211 panel->SetSizer(flexsizer,
true);
212 panel->SetAutoLayout(
true );
217 flexsizer->Add(menu, wxFIXED_MINSIZE);
248 wxButton* b = (wxButton*)event.GetEventObject();
251 std::string dstring = *((std::string*) b->GetClientData());
254 if(dstring.compare(
PANEL)==0){
257 }
else if(dstring.compare(
PANEL1)==0 ){
260 }
else if(dstring.compare(
PANEL2)==0){
263 }
else if(dstring.compare(
PANEL3)==0){
266 }
else if(dstring.compare(
PANEL4)==0){
269 }
else if(dstring.compare(
PANEL5)==0){
272 }
else if(dstring.compare(
PANEL6)==0){
277 if(wxStrcmp(b->GetLabel(),_T(
"+"))==0 ){
280 b->SetLabel(_T(
"-"));
284 b->SetLabel(_T(
"+"));
287 sizechange *= (dmenu->GetSize().GetHeight()-10);
296 return new wxStaticText(parent, -1, wxString(nom.c_str(),wxConvUTF8), wxDefaultPosition,
297 wxDefaultSize, wxALIGN_CENTRE, wxString(nom.c_str(),wxConvUTF8));
302 wxButton* b =
new wxButton(parent, -1, wxString(_T(
"-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT,
303 wxDefaultValidator, wxString(_T(
"-")));
310 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(2,1,2,2);
311 parent->SetSizer(flexsizer,
true);
312 parent->SetAutoLayout(
true );
314 flexsizer->Add(text, wxFLEX_GROWMODE_ALL);
315 flexsizer->Add(panel, wxFLEX_GROWMODE_ALL);
318 return (wxPanel*)parent;
361 sizer->Add(emptyPanel);
483 wxDefaultSize, wxBORDER_STATIC, wxString(_T(
"")));
484 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(1);
489 wxStaticText* stattext =
new wxStaticText(
mirrorPanel, -1,
490 wxString(_T(
" Test Panel ")),
491 wxDefaultPosition, wxDefaultSize,
492 wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(
"")));
494 flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
514 img->GetScalarRange(range);
544 segmentPanel =
new wxPanel(
getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T(
"")));
545 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(1);
554 wxStaticText* stattext =
new wxStaticText(
segmentPanel, -1, wxString(_T(
" Automatic Segmentation ")), wxDefaultPosition,
555 wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(
"")));
557 flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
572 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(1);
580 wxStaticText* stattext =
new wxStaticText(
segmentPanelITK, -1, wxString(_T(
" Automatic ITK Segmentation ")), wxDefaultPosition,
581 wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(
"")));
583 flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
584 flexsizer->Add(panel, wxEXPAND);
625 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(1);
630 wxStaticText* stattext =
new wxStaticText(
configPanel, -1, wxString(_T(
" Interface Configuration ")), wxDefaultPosition,
631 wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(
"")));
632 flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
633 flexsizer->Add(panel, wxEXPAND);
644 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(1);
653 wxStaticText* stattext =
new wxStaticText(
spreadPanel, -1, wxString(_T(
" Automatic Spread ")), wxDefaultPosition,
654 wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(
"")));
656 flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
700 infoWin =
new wxFrame (
this, -1,_T(
" Statistics "), wxDefaultPosition, wxDefaultSize, wxFRAME_TOOL_WINDOW|wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN |wxFRAME_FLOAT_ON_PARENT | wxRESIZE_BORDER );
701 infoWin->SetSize( wxSize(825,650) );
703 wxSize sizepanel(825,675);
706 wxBoxSizer * sizerPanel =
new wxBoxSizer(wxHORIZONTAL);
709 infoWin->SetSizer( sizerPanel );
710 infoWin->SetAutoLayout(
true );
733 infoPanelMask =
new wxPanel(
panelAux, -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxString(_T(
"")));
734 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(1);
739 wxStaticText* stattext =
new wxStaticText(
infoPanelMask, -1, wxString(_T(
" Mask segmentation ")), wxDefaultPosition,
740 wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(
"")));
742 flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
744 flexsizer->Add(panel, wxEXPAND);
754 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(1);
759 wxStaticText* stattext =
new wxStaticText(
infoPanelCalibration, -1, wxString(_T(
" Calibration ")), wxDefaultPosition,
760 wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(
"")));
762 flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
764 flexsizer->Add(panel, wxEXPAND);
768 wxFlexGridSizer* sizer =
new wxFlexGridSizer(1);
834 int typeContourGroup,
int selection,
int minZ,
int maxZ ,
bool XYZValues,
bool contourImage,
bool statistics)
837 typeContourGroup, selection, minZ,maxZ, XYZValues, contourImage, statistics);
856 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(1);
861 wxStaticText* stattext =
new wxStaticText(
mirrorPanel, -1, wxString(_T(
" Mirroring Tool ")), wxDefaultPosition,
862 wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(
"")));
864 flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
919 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(1);
924 wxStaticText* stattext =
new wxStaticText(
colorImageLayerPanel, -1, wxString(_T(
" Color Image Layer ")), wxDefaultPosition,
925 wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(
"")));
926 flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
927 flexsizer->Add(panel, wxEXPAND);
940 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(1);
945 wxStaticText* stattext =
new wxStaticText(
thresholdPanel, -1, wxString(_T(
" Threshold segmentation ")), wxDefaultPosition,
946 wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(
"")));
947 flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
948 flexsizer->Add(panel, wxEXPAND);
973 if(manualModel==NULL)
975 wxMessageDialog *dial =
new wxMessageDialog(NULL, wxT(
"Please select a Contour"), wxT(
"Warning"), wxOK | wxICON_EXCLAMATION);
980 wxTextEntryDialog* dialog =
new wxTextEntryDialog(
this,_T(
"Enter a tag name: ")) ;
982 if (dialog->ShowModal() == wxID_OK)
984 label = dialog->GetValue();
989 wxMessageDialog *dial =
new wxMessageDialog(NULL, wxT(
"The tag name was updated"), wxT(
"Information"), wxOK | wxICON_INFORMATION);
994 wxMessageDialog *dial =
new wxMessageDialog(NULL, wxT(
"Please enter a valid tag"), wxT(
"Warning"), wxOK | wxICON_EXCLAMATION);
1003 double contourSize = 0.0;
1004 double realSizeDouble = 0.0;
1009 std::cout<<
"Cata->Tama�o del contorno en pixeles:"<<contourSize<<endl;
1013 if (size.ToDouble(&realSizeDouble))
1017 realSizeDouble = realSizeDouble * 10;
1021 realSizeDouble = realSizeDouble * 25.4;
1023 std::cout<<
"Valor del usuario" << realSizeDouble<< endl ;
1028 wxMessageDialog *dial =
new wxMessageDialog(NULL, wxT(
"Please enter a numeric value"), wxT(
"Warning"), wxOK | wxICON_EXCLAMATION);
1034 wxMessageDialog *dial =
new wxMessageDialog(NULL, wxT(
"Please select a line contour"), wxT(
"Warning"), wxOK | wxICON_EXCLAMATION);
1038 wxMessageDialog *dial =
new wxMessageDialog(NULL, wxT(
"The calibration was made"), wxT(
"Information"), wxOK | wxICON_INFORMATION);
1040 std::cout<<
"Cata-> Se ha realizado la calibracion" << endl ;
1046 std::cout<<
"Valor del un pixel = " <<
_pixelValue<< endl ;