]> Creatis software - creaImageIO.git/commitdiff
Allow reading image files without name extention
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Fri, 3 Jul 2009 13:12:37 +0000 (13:12 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Fri, 3 Jul 2009 13:12:37 +0000 (13:12 +0000)
src/creaImageIOWxGimmick.cpp
src2/creaImageIOWxGimmickView.cpp

index 4b8f3f3f76dbc77d6716617baa36dc5224249b51..63470ba141b56f8d126d92715499c4a1fc90b79d 100644 (file)
@@ -718,8 +718,7 @@ namespace creaImageIO
        mTreeListCtrl->SetItemText(item,std2wx(lab));
       }
     else 
-      {
-       
+      {        
        int c = 0;
        Settings::ColumnListType::iterator col;
        // If Study and Series level are merged and node type is Series
@@ -788,7 +787,7 @@ namespace creaImageIO
 
   //================================================================
   void WxGimmick::UpdateColumnsTitles(wxTreeItemId& item,
-                                                   DicomNode::Type t)
+                                      DicomNode::Type t)
   {
     //    std::cout << "Update columns titles "<<t<<std::endl;
     int c = 0;
@@ -1114,7 +1113,6 @@ namespace creaImageIO
   //================================================================
   void WxGimmick::OnItemExpanded(wxTreeEvent& event)                   
   {
-
     //    std::cout << "* Expanded *"<<std::endl;
     //  }
 
@@ -1264,7 +1262,6 @@ namespace creaImageIO
   
   void WxGimmick::OnItemRightClick(wxTreeEvent& event)
   {
-
     wxTreeItemId itemId = event.GetItem();
     if (itemId.IsOk())
       {
@@ -1275,8 +1272,6 @@ namespace creaImageIO
     event.Skip();
   }
   //=====================================================================
-  
-
 
   //=====================================================================
   void WxGimmick::ShowMenu(wxTreeItemId id, const wxPoint& pt)
@@ -1377,13 +1372,11 @@ namespace creaImageIO
       }
     GetEventHandler()->ProcessEvent(ev);
     //
-  
+
     if (menu.GetMenuItemCount()>0) menu.AppendSeparator();
     menu.Append(PopUp_Settings, wxT("&Settings..."));
     menu.Append(PopUp_About, wxT("&About..."));
   
-
-  
     /*
       wxMenu* newmenu = new wxMenu;
       wxMenu* openmenu = new wxMenu;
@@ -1443,9 +1436,6 @@ namespace creaImageIO
       }
       }
     */
-
-
  
     PopupMenu(&menu, pt);
 #endif // wxUSE_MENUS
@@ -1482,7 +1472,6 @@ namespace creaImageIO
   }
   //=====================================================================
   
-
  
   //=====================================================================
   void  WxGimmick::OnPopUpOpenCollection(wxCommandEvent& event)
@@ -1512,22 +1501,21 @@ namespace creaImageIO
   void  WxGimmick::OnPopUpDeleteCollection(wxCommandEvent& event)
   {
     if (wxMessageBox(_T("This will physically delete the collection's file on disk and cannot be reverted. Proceed ?"),_T("Confirm"),wxYES_NO,this)==wxNO) return;
-    
+  
     wxBusyCursor busy;
 
-   
     //   std::cout << "OnPopUpClose"<<std::endl;
     //  wxTreeItemId id = event.GetId();
     TreeItemData *data = (TreeItemData *)mTreeListCtrl->GetItemData(mItemOfMenu);
     DicomDatabase* r = data->GetDicomNode()->GetDicomDatabase();
-
     wxRemoveFile(std2wx(r->GetFileName()));
     //   std::cout << "OnPopUpClose '"<<r->GetName()<<"'"<<std::endl;
     DeleteDicomDatabase(mItemOfMenu,r);
-    
   }
   //=====================================================================
-  
+
   void DisplayUpdateSummary( DicomDatabase::UpdateSummary& summary,
                             wxWindow* parent )
   {
@@ -1550,18 +1538,18 @@ namespace creaImageIO
            summary.update_database_time,
            (int)(summary.update_database_time*100./summary.total_time),
            summary.total_time );
-    
+
     mess << times;
-    
     wxMessageBox(std2wx(mess.str()),_T("Update summary"),wxOK,parent);
   }
-  
-  
+
+
   //=====================================================================
   void  WxGimmick::OnPopUpAddFile(wxCommandEvent& event)
   {
     long style = wxOPEN | wxFILE_MUST_EXIST | wxFD_MULTIPLE;
-    std::string wc("*.*");
+    std::string wc("*");
     wxFileDialog* FD = new wxFileDialog( 0, 
                                         _T("Select file"),
                                         mCurrentDirectory,
@@ -1569,7 +1557,7 @@ namespace creaImageIO
                                         std2wx(wc),
                                         style,
                                         wxDefaultPosition);
-    
+
     if (FD->ShowModal()==wxID_OK)
       {
        wxBusyCursor busy;
index 447b35bc298a4a9a99a7e6e2f552f7138836614c..c3e2b07c20807c32ca585a052bdc2bfeb4d5120c 100644 (file)
@@ -347,7 +347,7 @@ namespace creaImageIO
   {
     mViewer->StopPlayer();
    long style = wxOPEN | wxFILE_MUST_EXIST | wxFD_MULTIPLE;
-    std::string wc("*.*");
+    std::string wc("*");
     wxFileDialog* FD = new wxFileDialog( 0, 
                                         _T("Select file"),
                                         _T(""),