From: jean-pierre roux Date: Mon, 31 May 2010 17:23:50 +0000 (+0000) Subject: some re-indent X-Git-Tag: CREATOOLS.2-0-3~21 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=creaImageIO.git;a=commitdiff_plain;h=9f388912ec5438d32d4da941152eaae550f796ed some re-indent --- diff --git a/src/creaImageIODicomImageReader2.cpp b/src/creaImageIODicomImageReader2.cpp index 7ae643b..fc7f56b 100644 --- a/src/creaImageIODicomImageReader2.cpp +++ b/src/creaImageIODicomImageReader2.cpp @@ -94,7 +94,7 @@ namespace creaImageIO void DicomImageReader::getAttributes(const std::string filename, - std::map &infos,std::vector i_attr) + std::map &infos, std::vector 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& attr) diff --git a/src/creaImageIOGimmickView.h b/src/creaImageIOGimmickView.h index 7a0e839..b073dc1 100644 --- a/src/creaImageIOGimmickView.h +++ b/src/creaImageIOGimmickView.h @@ -25,11 +25,13 @@ namespace creaImageIO { + typedef std::map mapInfoDicom; typedef struct { vtkImageData *img; - std::map infos; + //std::map infos; + mapInfoDicom infos; }OutStrGimmick; @@ -81,8 +83,8 @@ namespace creaImageIO virtual void GetSelectedFiles(std::vector& s) { GimmickError("INTERNAL ERROR : GetSelectedFiles not implemented"); } - virtual void GetImages(int dim, std::vector files, std::vector& s) - { GimmickError("INTERNAL ERROR : GetImages not implemented"); } + virtual void GetImages(int dim, std::vector files, std::vector& s) + { GimmickError("INTERNAL ERROR : GetImages not implemented"); } virtual void OnSelectionChange(const std::vector& s, bool isSelection, int selection, bool mProcess) { GimmickError("INTERNAL ERROR : OnSelectionChange not implemented"); } diff --git a/src/creaImageIOOutputModel.cpp b/src/creaImageIOOutputModel.cpp index 4eef715..7117c13 100644 --- a/src/creaImageIOOutputModel.cpp +++ b/src/creaImageIOOutputModel.cpp @@ -73,7 +73,7 @@ namespace creaImageIO }else { std::sort( im.begin(), im.end() ); } - + return spacing; } diff --git a/src/creaImageIOOutputModel.h b/src/creaImageIOOutputModel.h index 8b5b824..f2b121a 100644 --- a/src/creaImageIOOutputModel.h +++ b/src/creaImageIOOutputModel.h @@ -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; diff --git a/src/creaImageIOWxGimmickPanel.cpp b/src/creaImageIOWxGimmickPanel.cpp index 2b2ebb9..a11e0a3 100644 --- a/src/creaImageIOWxGimmickPanel.cpp +++ b/src/creaImageIOWxGimmickPanel.cpp @@ -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(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(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 diff --git a/src/creaImageIOWxGimmickPanel.h b/src/creaImageIOWxGimmickPanel.h index ed206ee..419ec72 100644 --- a/src/creaImageIOWxGimmickPanel.h +++ b/src/creaImageIOWxGimmickPanel.h @@ -73,8 +73,6 @@ namespace creaImageIO mView->getSelectedFiles(outG, i_attr, mult, outmodel); } - - void OnSelectedImage(bool t); void AddImagesToDB(std::string dir); diff --git a/src/creaImageIOWxGimmickView.cpp b/src/creaImageIOWxGimmickView.cpp index 2f317e1..3bdc716 100644 --- a/src/creaImageIOWxGimmickView.cpp +++ b/src/creaImageIOWxGimmickView.cpp @@ -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 &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 files; + std::vector 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[" <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; } } } diff --git a/src/creaImageIOWxTreeView.cpp b/src/creaImageIOWxTreeView.cpp index 01b8ad4..db67f8b 100644 --- a/src/creaImageIOWxTreeView.cpp +++ b/src/creaImageIOWxTreeView.cpp @@ -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);