-//-------------------------------------------------------------
-
- /*frame = new wxContourMainFrame(_builder->getImSourceEnv(), _builder->getImSectionEnv(), _builder->getAxesEnv(), _builder->getContourEnv(),NULL, wxID_ANY, wxT("ROI Application Sample"), wxPoint(50,50), wxSize(800, 600));
- frame->Show(TRUE);*/
-
- //Creating the evtHandler of the panels
- wxContourEventHandler * eventHandler = new wxContourEventHandler();
-
- //Creating the window that will show the panels
-//JCP 21 - 10 - 08
- //wxFrame* frame1 = new wxFrame(NULL, wxID_ANY, wxT("ROI Application - Evaluation version, 23 Oct 2008 - Use limited to the research team (Creatis-LRMN)"), wxPoint(50,50), wxSize(800, 600) );
- wxFrame* frame1 = new wxFrame(NULL, wxID_ANY, wxT("ROI Application - Evaluation version, 23 Oct 2008 "), wxPoint(50,50), wxSize(800, 600) );
- frame = new wxContourMainFrame( frame1, wxID_ANY, wxString(""), wxPoint(50,50), wxSize(800, 600) );
-
- //frame = new wxContourMainFrame( NULL, wxID_ANY, wxT("ROI Application - Evaluation version, 17 Oct 2008 - Use limited to the research team (Creatis-LRMN)"), wxPoint(50,50), wxSize(800, 600) );
+ #ifdef MACOSX /* assume this is OSX */
+ datadir=datadir+"/../../../../share/creaContours";
+ #endif // MACOSX
+
+
+ if(w.GetReturnCode() == wxID_OK)
+ {
+ std::vector<std::string> s;
+//EED 01Juin2010 w.GetSelectedFiles(s);
+
+
+//EED std::vector<std::string>::iterator i;
+// for (i=s.begin();i!=s.end();++i)
+// {
+// std::cout << *i << std::endl;
+// }
+// std::cout << "$$$$ "<<std::endl;
+ //w.GetSelectedImages(images);
+
+//EED31mai2010 w.GetSelectedImages(images,output_dim);
+
+
+//EED 1Juin2010
+// std::vector<creaImageIO::OutStrGimmick> out;
+// std::vector<std::string> attr;
+//// attr.push_back("D0028_0010");
+//// attr.push_back("D0008_0023");
+//// attr.push_back("D0008_1070");
+// w.getSelected(out, attr,true,"");
+//// std::cout<<out.size()<<std::endl;
+//// crea::VtkBasicSlicer(out.front().img);
+// int size=out.size();
+// int ii;
+// for (ii=0;ii<size;ii++)
+// {
+// images.push_back(out[ii].img);
+// }
+
+//EED 1Juin2010
+ printf("EED creaContours wxTheApplication :: OnInit %d\n", w.getImagesSelected().size() );
+ images=w.getImagesSelected();
+ printf("EED creaContours wxTheApplication :: OnInit %d\n", images.size() );
+
+ }
+ else if (w.GetReturnCode() == wxID_CANCEL)
+ {
+ vtkMetaImageReader *reader = vtkMetaImageReader::New();
+ std::string filename= datadir + "/data/hola.mhd";
+ reader->SetFileName( filename.c_str() );
+ reader->Update();
+ images.push_back(reader->GetOutput());
+ }
+ else
+ {
+ return -1;
+ }
+
+
+ wxFrame* frame1 = new wxFrame(NULL, wxID_ANY, wxT("ROI Application - Evaluation version, 09 Feb 2009 "), wxPoint(400,50), wxSize(800, 600) );
+
+ //frame = new wxContourMainFrame( frame1, wxID_ANY, wxString(_T("")), wxPoint(50,50), wxSize(800, 600), images );
+ frame = wxContourMainFrame::getInstance(frame1, wxID_ANY, wxString(_T("")), wxPoint(200,50), wxSize(800, 600), images, wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,datadir );