38 const std::string i_namedescp ,
39 const std::string i_namedb)
40 : wxDialog(parent, -1,_T(
"SELECT IMAGE(S)"), wxDefaultPosition, wxSize(230,150))
47 this->SetTitle(i_title);
50 wxButton *fileBut =
new wxButton(
this, -1,_T(
"Select a single file"), wxPoint(10,7) );
54 wxButton *directoryBut =
new wxButton(
this, -1,_T(
"Select all the files in a directory"), wxPoint(10,40) );
58 wxButton *gimmickBut =
new wxButton(
this, -1,_T(
"Select thru Dicom browser"), wxPoint(10,70) );
72 wxFileDialog* fileDlg =
new wxFileDialog( 0, _T(
"Select file"), _T(
""), _T(
""), crea::std2wx(
"*"), wxOPEN |wxFD_MULTIPLE, wxDefaultPosition);
74 printf(
"EED WxSimpleDlg::OnReadFile 1 \n");
75 resultShowModal = fileDlg->ShowModal();
76 if ( resultShowModal==wxID_OK )
78 printf(
"EED WxSimpleDlg::OnReadFile 2 \n");
79 wxArrayString wxArray;
80 fileDlg->GetPaths(wxArray);
83 printf(
"EED WxSimpleDlg::OnReadFile 3 \n");
86 std::vector<std::string> files;
87 for(
int i = 0; i < wxArray.GetCount(); i++)
89 printf(
"EED WxSimpleDlg::OnReadFile 4 \n");
90 files.push_back( crea::wx2std(wxArray[i]));
97 printf(
"EED WxSimpleDlg::OnReadFile 5 \n");
101 SetReturnCode( resultShowModal );
103 EndModal( resultShowModal );
113 long style = wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST;
114 wxDirDialog* dirDlg =
new wxDirDialog( 0, _T(
"Select the directory to display"), _T(
""), style);
116 resultShowModal = dirDlg->ShowModal();
117 if ( resultShowModal==wxID_OK )
120 infoimage=_T(
"DIRECTORY:")+dirDlg->GetPath();
126 SetReturnCode( resultShowModal );
128 EndModal( resultShowModal );
141 _T(
"Select image(s) - Gimmick! (c) CREATIS-LRMN 2008"),
149 if (dlg.GetReturnCode() == wxID_OK)
151 std::vector<creaImageIO::OutStrGimmick> out;
152 std::vector<std::string> attr;
156 int size=(int)out.size();
157 printf(
"EED WxSimpleDlg::OnReadGimmick size=%d \n");
161 for (ii=0;ii<size;ii++)
168 for (ii=0;ii<size;ii++)
175 SetReturnCode( dlg.GetReturnCode() );
176 EndModal( dlg.GetReturnCode() );