]> Creatis software - creaImageIO.git/blobdiff - src/creaImageIOWxSimpleDlg.cpp
#3318 creaImageIO Bug New Normal - Display buttons (Chose image box)
[creaImageIO.git] / src / creaImageIOWxSimpleDlg.cpp
index eb9882edfa8ca568fbd62d33c3c4222391e88150..226f55fafddaca2251545fc7dea6fdce75b7b1cf 100644 (file)
@@ -37,7 +37,7 @@ namespace creaImageIO
                             wxString i_title,  
                             const std::string i_namedescp , 
                             const std::string i_namedb)
-    : wxDialog(parent, -1,_T("SELECT IMAGE(S)"), wxDefaultPosition, wxSize(230,150))
+    : wxDialog(parent, -1,_T("SELECT IMAGE(S)"), wxDefaultPosition, wxSize(500,300))
    {
                namedescp       = i_namedescp; 
                namedb          = i_namedb;
@@ -47,15 +47,15 @@ namespace creaImageIO
                        this->SetTitle(i_title);  
           }
           // Button to select file(s)
-          wxButton *fileBut = new wxButton(this, -1,_T("Select a single file"), wxPoint(10,7) );
+          wxButton *fileBut = new wxButton(this, -1,_T("Select a single file"), wxPoint(10,10) );
           Connect( fileBut->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxSimpleDlg::OnReadFile ); 
 
           // Button to select directory
-          wxButton *directoryBut = new wxButton(this, -1,_T("Select all the files in a directory"), wxPoint(10,40) );
+          wxButton *directoryBut = new wxButton(this, -1,_T("Select all the files in a directory"), wxPoint(10,50) );
           Connect( directoryBut->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxSimpleDlg::OnReadDirectory ); 
 
           // button to select creaImageIO
-          wxButton *gimmickBut = new wxButton(this, -1,_T("Select thru Dicom browser"), wxPoint(10,70) );
+          wxButton *gimmickBut = new wxButton(this, -1,_T("Select thru Dicom browser"), wxPoint(10,90) );
           Connect( gimmickBut->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxSimpleDlg::OnReadGimmick ); 
 
           /// \TODO  Button to select Bruker directory
@@ -140,21 +140,19 @@ namespace creaImageIO
                   WxGimmickReaderDialog dlg(0,-1, 
                                   namedescp,
                                   namedb, 
-                                  _T("Select image(s)        - Gimmick! (c) CREATIS-LRMN 2008"),
+                                  _T("Select image(s)        - Gimmick! (c)"),
                    wxDefaultPosition,
                    wxSize(810,750),
                    GIMMICK_2D_IMAGE_SELECTION,
                    GIMMICK_3D_IMAGE_SELECTION,
                    _3D,
-                                  1);
+                                  0);
                 dlg.ShowModal();
                 if (dlg.GetReturnCode() == wxID_OK)
             {
-//EED1                         dlg.stopReading();
-
-                               std::vector<creaImageIO::OutStrGimmick> outStrGimmick;
-                               dlg.getSelected(outStrGimmick, m_attrDicomTags,true,"");
-
+                       dlg.stopReading();
+                       std::vector<creaImageIO::OutStrGimmick> outStrGimmick;
+                       dlg.getSelected(outStrGimmick, m_attrDicomTags,true,"");
                        m_results.clear();
                        int size=(int)outStrGimmick.size();
                        int ii;
@@ -162,7 +160,6 @@ namespace creaImageIO
 //                     {
                                for (ii=0;ii<size;ii++)
                                {
-printf("EED1 WxSimpleDlg::OnReadGimmick %d \n", ii);
                                        m_results.push_back(outStrGimmick[ii].img);
                                        m_resultsDicomAtr.push_back( outStrGimmick[ii].infos );
                                }
@@ -175,7 +172,6 @@ printf("EED1 WxSimpleDlg::OnReadGimmick %d \n", ii);
 
                        infoimage               =       _T("EED Missing info <void> ???");
                        infoimageSource =       _T("GIMMICK");
-
                        dlg.OnExit();
                 }
                 SetReturnCode( dlg.GetReturnCode() );
@@ -286,7 +282,7 @@ printf("EED1 WxSimpleDlg::OnReadGimmick %d \n", ii);
                                                memcpy(out->GetScalarPointer(0,0,slice), img->GetScalarPointer(0,0,0), imsize);
                                                //img->Delete();
                                        } // for slice  
-
+                                       out->Modified();
 //EED This is NOT working. The iteration over the pointer vtkImageData
 //                             int slice=0;
 //                             std::vector<vtkImageData*>::iterator it;
@@ -310,7 +306,7 @@ printf("EED1 WxSimpleDlg::OnReadGimmick %d \n", ii);
                result = NULL;  
                } // getImagesSelected().size()!=0
 
-
+                       result->Modified();
                return result;
 
                }