- int image_type = GIMMICK_3D_IMAGE_SELECTION;
- int threads = 1;
-
- creaImageIO::WxGimmickDialog w(0,
- -1,
- _T("WxGimmickDialog test"),
- wxDefaultPosition,
- wxSize(1200,800),
- image_type,
- threads);
- w.ShowModal();
-
- vtkImageData* selectedimage=NULL;
- if(w.GetReturnCode() == wxID_OK){
-
- std::vector<std::string> s;
- w.GetSelectedFiles(s);
- std::vector<std::string>::iterator i;
- for (i=s.begin();i!=s.end();++i){
- std::cout << *i << std::endl;
- }
-
- std::cout << "$$$$ "<<std::endl;
- std::vector<vtkImageData*> images;
- w.GetSelectedImages(images);
- selectedimage = images[0];
- //crea::VtkBasicSlicer(images.front());
- //images.front()->Delete();
-
- }else if (w.GetReturnCode() == wxID_CANCEL){
- vtkMetaImageReader *reader = vtkMetaImageReader::New();
- reader->SetFileName( "data/hola.mhd" );
- reader->Update();
- selectedimage = reader->GetOutput();
- }else{
- return TRUE;
- }
-
- std::string conceptsFN = "data/holaConceptsFile.cf";
- std::string imageSourcesFN = "data/holaImagesInstantsFile.of";
- std::string imageSectionsFN = "";
- std::string axeThingsFN = "";
-
- std::map<std::string, ImageSourceThing *> * sourcesMap = new std::map<std::string, ImageSourceThing *>();
- std::map<std::string, ImageSectionThing *>* sectionsMap = new std::map<std::string, ImageSectionThing *>();
- std::map<std::string, AxeThing *>* axesMap = new std::map<std::string, AxeThing *>();
- std::map<std::string, ContourThing *>* outlinesMap = new std::map<std::string, ContourThing *>();
-
- ImageSourceThing * thing = new ImageSourceThing(selectedimage);
- sourcesMap->insert(std::pair<std::string, ImageSourceThing *>( "Source Image 1", thing));
-
- OutlineModelBuilder * _builder = new OutlineModelBuilder( conceptsFN );
- _builder->buildImageSource_Envornment( imageSourcesFN, sourcesMap );
- _builder->buildImageSection_Envornment( imageSectionsFN, sectionsMap );
- _builder->buildAxe_Envornment(axeThingsFN, axesMap );
- _builder->buildCountour_Envornment( imageSectionsFN, outlinesMap );
+//EED01Juin2010 int min_image_type = GIMMICK_2D_IMAGE_SELECTION;
+//EED01Juin2010 int max_image_type = GIMMICK_3D_IMAGE_SELECTION;
+//EED01Juin2010 int output_dim = NATIVE;
+//EED01Juin2010 int threads = 1;
+
+//EED 1Juin2010
+ creaImageIO::WxSimpleDlg w(0,_T("Select your image"),"creaContours_Descriptor.dscp","creatisContours DB");
+ w.ShowModal();
+
+ std::vector<vtkImageData*> images;
+//EED 1Juin2010
+// creaImageIO::WxGimmickReaderDialog w(0,
+// -1,
+// "creaContours_Descriptor.dscp",
+// "creatisContours DB",
+// _T("WxGimmickDialog test"),
+// wxDefaultPosition,wxSize(1200,800)
+// ,min_image_type,
+// max_image_type,
+// output_dim,
+// threads);
+// w.ShowModal();
+
+//JCP
+ //std::string datadir( crea::wx2std(GetExecutablePath()) );
+ std::string datadir( crea::System::GetExecutablePath() );