std::vector<vtkImageData*> selectedimages;
if(img!=NULL && currentimg!=img){
+ wxContourMainFrame::getInstance()->ShowToolsPanel(true);
currentimg=img;
selectedimages.push_back(img);
wxContourMainFrame::getInstance()->setVectImages(selectedimages);
#endif
wxPanel* panel = wxContourMainFrame::getInstance(parent, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages,wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,path );
+ wxContourMainFrame::getInstance()->ShowToolsPanel(false);
+ //std::cout<<"creaContours = "<<panel<<std::endl;
bbSetOutputWidget( panel );
}
void nDimensions::bbUserDestructor()
{
-
+ wxContourMainFrame::resetInstance();
}
}
// EO namespace bbCreaContour
*/
interfMainPanel* interfMainPanel::interfmainpanel=NULL;
+wxFrame* interfMainPanel::_newframe=NULL;
interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtHandler * evtHandler, std::string datadir)
: wxPanel(parent, -1, wxDefaultPosition, wxSize(sizex, sizey), wxBORDER_SUNKEN)
interfMainPanel* interfMainPanel::getInstance(wxWindow* parent, std::string datadir, wxEvtHandler * evtHandler){
- wxFrame* newframe = new wxFrame(parent, -1, wxT(" Contour Tools "), wxPoint(25,50), wxSize(350,850),wxFRAME_TOOL_WINDOW|wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN |wxFRAME_FLOAT_ON_PARENT);
+ _newframe = new wxFrame(parent, -1, wxT(" Contour Tools "), wxPoint(25,50), wxSize(350,850),wxFRAME_TOOL_WINDOW|wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN |wxFRAME_FLOAT_ON_PARENT);
if(interfmainpanel == NULL){
- interfmainpanel = new interfMainPanel(newframe, 350, 850, evtHandler, datadir);
+ interfmainpanel = new interfMainPanel(_newframe, 350, 850, evtHandler, datadir);
}
- newframe->Show(TRUE);
+ _newframe->Show(TRUE);
return interfmainpanel;
}
interfMainPanel* interfMainPanel::getInstance(wxWindow* parent, wxEvtHandler * evtHandler){
- wxFrame* newframe = new wxFrame(parent, -1, wxT(" Contour Tools "), wxPoint(25,50), wxSize(350,850),wxFRAME_TOOL_WINDOW|wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN |wxFRAME_FLOAT_ON_PARENT );
+ _newframe = new wxFrame(parent, -1, wxT(" Contour Tools "), wxPoint(25,50), wxSize(350,850),wxFRAME_TOOL_WINDOW|wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN |wxFRAME_FLOAT_ON_PARENT );
if(interfmainpanel == NULL){
- interfmainpanel = new interfMainPanel(newframe, 350, 850, evtHandler);
+ interfmainpanel = new interfMainPanel(_newframe, 350, 850, evtHandler);
}
- newframe->Show(TRUE);
+ _newframe->Show(TRUE);
return interfmainpanel;
}
-
+bool interfMainPanel::Show(bool show){
+ return _newframe->Show(show);
+}
interfMainPanel* interfMainPanel::getInstance()
{
void interfMainPanel :: resetInstance()
{
- delete interfmainpanel;
+ //delete interfmainpanel;
+ delete _newframe;
interfmainpanel = NULL;
}
}
showPanel(thresholdPanel);
}
+