]> Creatis software - creaImageIO.git/commitdiff
some re-indent
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Mon, 31 May 2010 17:23:50 +0000 (17:23 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Mon, 31 May 2010 17:23:50 +0000 (17:23 +0000)
src/creaImageIODicomImageReader2.cpp
src/creaImageIOGimmickView.h
src/creaImageIOOutputModel.cpp
src/creaImageIOOutputModel.h
src/creaImageIOWxGimmickPanel.cpp
src/creaImageIOWxGimmickPanel.h
src/creaImageIOWxGimmickView.cpp
src/creaImageIOWxTreeView.cpp

index 7ae643b89696b20da733a34c3c9d59337343031c..fc7f56b7cee601b21c03d7eb3bc53a0bd177d5d9 100644 (file)
@@ -94,7 +94,7 @@ namespace creaImageIO
   
 
        void DicomImageReader::getAttributes(const std::string filename, 
-               std::map <std::string , std::string> &infos,std::vector<std::string> i_attr)
+               std::map <std::string , std::string> &infos, std::vector<std::string> i_attr)
        {
                gdcm::Reader reader;
                reader.SetFileName( filename.c_str() );
@@ -112,8 +112,8 @@ namespace creaImageIO
                                }
                        }
                }
-               
        }
+
   //=====================================================================
   void DicomImageReader::ReadAttributes(const std::string& filename, 
                      std::map<std::string,std::string>& attr)
index 7a0e839340e3a9c0a5b97b30b5e1604982aa9214..b073dc1a50590f1af302170251f3b236963dba37 100644 (file)
 
 namespace creaImageIO
 {
+        typedef std::map<std::string, std::string> mapInfoDicom;
 
        typedef struct 
        { 
                vtkImageData *img;
-               std::map<std::string, std::string> infos;
+               //std::map<std::string, std::string> infos;
+               mapInfoDicom infos; 
        }OutStrGimmick;
 
 
@@ -81,8 +83,8 @@ namespace creaImageIO
       virtual void GetSelectedFiles(std::vector<std::string>& s)
       { GimmickError("INTERNAL ERROR : GetSelectedFiles not implemented"); }
 
-         virtual void GetImages(int dim, std::vector<std::string> files, std::vector<vtkImageData*>& s) 
-         { GimmickError("INTERNAL ERROR : GetImages not implemented"); }
+      virtual void GetImages(int dim, std::vector<std::string> files, std::vector<vtkImageData*>& s) 
+      { GimmickError("INTERNAL ERROR : GetImages not implemented"); }
 
       virtual void OnSelectionChange(const std::vector<tree::Node*>& s, bool isSelection, int selection, bool mProcess)
       { GimmickError("INTERNAL ERROR : OnSelectionChange not implemented"); }
index 4eef7155f89fed7fc26a85433b3313933e9ecafb..7117c13d4c1fe0cd056a7b63a5ce89589d07ee50 100644 (file)
@@ -73,7 +73,7 @@ namespace creaImageIO
                }else {
                        std::sort( im.begin(), im.end() );
                }
-                               
+               
           return spacing;
        }
 
index 8b5b8240e13733c7640e637d7835f6b43225aeab..f2b121ae11a1bae5975143f2be00dfb53f81e692 100644 (file)
@@ -35,7 +35,7 @@ namespace creaImageIO
                void setDB(const std::string i_db, const std::string i_table);
 
                const std::string getTag();
-       
+
        private:
 
                OutputModelParser *m_outparser;
index 2b2ebb991e6dbd31b81a5910b07508db462d8d7a..a11e0a306c6ff0d52616c2f36b65e668bc500a9c 100644 (file)
@@ -8,23 +8,23 @@ namespace creaImageIO
 {
   // CTor
   WxGimmickPanel::WxGimmickPanel(wxWindow *parent, 
-                                              wxWindowID id,
-                                              const wxPoint& pos,
-                                              const wxSize& size,
-                                                  const std::string i_namedescp 
-                                                  const std::string i_namedb ,
-                                              int threads)
+                                 wxWindowID id,
+                                 const wxPoint& pos,
+                                 const wxSize& size,
+                                 const std::string i_namedescp
+                                 const std::string i_namedb,
+                                 int threads)
  :   wxPanel( parent, 
-                 id, 
-                 pos,
-                 size,
-                 wxRESIZE_BORDER | 
-             wxSYSTEM_MENU  |
-                 wxCLOSE_BOX |
-                 wxMAXIMIZE_BOX | 
-                 wxMINIMIZE_BOX | 
-                 wxCAPTION  
-              ),
+              id, 
+              pos,
+              size,
+              wxRESIZE_BORDER | 
+              wxSYSTEM_MENU   |
+              wxCLOSE_BOX     |
+              wxMAXIMIZE_BOX  | 
+              wxMINIMIZE_BOX  | 
+              wxCAPTION  
+             ),
      //mGimmick(0),
      mView(0)
   {
@@ -33,12 +33,11 @@ namespace creaImageIO
     wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL);
     
     try {
-      
-               mGimmick = boost::shared_ptr<Gimmick>(new Gimmick());
-               mGimmick->Initialize(i_namedescp,i_namedb);
-      int min_dim = GIMMICK_2D_IMAGE_SELECTION;
-         int max_dim = GIMMICK_3D_IMAGE_SELECTION;
-      mView = new WxGimmickView(mGimmick,
+            mGimmick = boost::shared_ptr<Gimmick>(new Gimmick());
+            mGimmick->Initialize(i_namedescp,i_namedb);
+            int min_dim = GIMMICK_2D_IMAGE_SELECTION;
+            int max_dim = GIMMICK_3D_IMAGE_SELECTION;
+            mView = new WxGimmickView(mGimmick,
                                this,
                                -1,
                                wxDefaultPosition,
@@ -46,9 +45,9 @@ namespace creaImageIO
                                min_dim,
                                max_dim,
                                threads);
-      mView->Initialize();
+            mView->Initialize();
          // Connect the AddProgress callback
-      mView->ConnectValidationObserver ( boost::bind( &WxGimmickPanel::OnSelectedImage , this, _1 ) );
+            mView->ConnectValidationObserver ( boost::bind( &WxGimmickPanel::OnSelectedImage , this, _1 ) );
     }
     catch (crea::Exception e)
     {
@@ -84,7 +83,7 @@ namespace creaImageIO
   ///Callback method on a selection
   void WxGimmickPanel::OnSelectedImage(bool t)
   {
-               mSendImageSignal(t);
+      mSendImageSignal(t);
   }
 
   void WxGimmickPanel::AddImagesToDB(std::string dir)
@@ -103,7 +102,7 @@ namespace creaImageIO
   //====================================================================
   void WxGimmickPanel::ConnectSendImageObserver(SendImageCallbackType callback)
   {
-    mSendImageSignal.connect(callback);
+      mSendImageSignal.connect(callback);
   }
 
 } // EO namespace creaImageIO
index ed206eef7a98abf56db00912c3244aa6ab1dcafc..419ec726a8185311794764a8143f7e9c537b5f47 100644 (file)
@@ -73,8 +73,6 @@ namespace creaImageIO
                mView->getSelectedFiles(outG, i_attr, mult, outmodel);
        }
 
-
-
     void OnSelectedImage(bool t);
 
     void AddImagesToDB(std::string dir);
index 2f317e1546fd9c0839a576186794a5b2dfb8ffbe..3bdc716a035281c5246112fb3053f221db311d09 100644 (file)
@@ -324,10 +324,10 @@ namespace creaImageIO
   /// By default if out_infos is empty, we dont' provide informations, we return only vtkImageData 
   /// if out_infos has only one entry "all" we provide all database informations
   void WxGimmickView::getSelectedFiles(std::vector<OutStrGimmick> &outG, std::vector< std::string> i_attr, 
-                                                                         bool mult, const std::string out_model)
+                                       bool mult, const std::string out_model)
   {
        // First we select the files
-    std::vector<std::string> files;
+        std::vector<std::string> files;
        std::string db_name = crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection()));
        GetTreeViewMap()[crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection()))]->GetSelectedAsString(files);
 
@@ -925,7 +925,7 @@ namespace creaImageIO
   void WxGimmickView::OnTools(wxCommandEvent& event)
   {
        mViewer->StopPlayer();
-               
+       
        wxDialog* dial = new wxDialog (this,-1,_T("Tools"),wxDefaultPosition, wxSize(550,350));
 
        wxSizer* buttonsSizer = dial->CreateSeparatedButtonSizer(wxOK|wxCANCEL);
@@ -951,7 +951,7 @@ namespace creaImageIO
                {
                        std::string inputDir  = crea::wx2std(gimmickTools->getInputDir());
                        std::string outputDir = crea::wx2std(gimmickTools->getOutputDir());
-                       
+
                        bool addToDB = gimmickTools->getAddToDBCheckBoxValue();
 
                        if (inputDir.compare("")!=0 && outputDir.compare("")!=0)
@@ -967,14 +967,21 @@ namespace creaImageIO
                                        b2d.Execute();
                                        if (addToDB)
                                        {
+       std::cout <<"after addToDB" << std::endl;
                                                mProgressDialog = new wxProgressDialog(_T("Adding directory"),_T(""),1000,this,wxPD_ELAPSED_TIME |wxPD_CAN_ABORT );
+       std::cout <<"after new wxProgressDialog" << std::endl;                                          
                                                mCurrentDirectory = gimmickTools->getOutputDir();
+       std::cout <<"after gimmickTools->getOutputDir[" <<mCurrentDirectory << std::endl;                                               
                                                mGimmick->AddDir(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),outputDir,true);
+       std::cout <<"after mGimmick->AddDir" << std::endl;                                      
                                                mProgressDialog->Pulse(_T("Updating view..."));
-
+       std::cout <<"after mProgressDialog->Pulse" << std::endl;
                                                UpdateTreeViewLevel(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),1);
+       std::cout <<"after UpdateTreeViewLevel" << std::endl;                                           
                                                delete mProgressDialog;
+       std::cout <<"after delete mProgressDialog" << std::endl;                                                        
                                                DisplayAddSummary();
+       std::cout <<"after dDisplayAddSummary" << std::endl;                                            
                                        }       
                                }
                        }
index 01b8ad41764a4e61d31a77145c9bea44997e91a2..db67f8bcc07f7b2ee1afddffb5366f65a0de0f6d 100644 (file)
@@ -1254,15 +1254,14 @@ namespace creaImageIO
                          found=true;
                  }
          }
-
          return !found;
   }
  //================================================================
   //================================================================
 
        RemoveAlertDlg::RemoveAlertDlg(wxWindow *parent, 
-                                              wxString title,    
-                                                  const wxSize& size)
+                                       wxString title,    
+                                       const wxSize& size)
  :   wxDialog( parent, 
                  wxID_ANY, 
                  title,
@@ -1276,7 +1275,7 @@ namespace creaImageIO
                //wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY,crea::std2wx(out),wxDefaultPosition, wxSize(500,20));
                wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY,
                                        _T("To reload deleted patient, you should synchronize your database before."),
-                                       wxDefaultPosition, wxSize(500,20));
+                                       wxDefaultPosition, wxSize(650,20));  // 650 vs 500 ? // JPRx
                mcheck = new wxCheckBox(this, 5478, _T("Do not display this warning again!"));
                Connect( mcheck->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED , (wxObjectEventFunction) &RemoveAlertDlg::onCheck ); 
                wxSizer* buttonsSizer = this->CreateSeparatedButtonSizer(wxOK|wxCANCEL);