From 52f3d800d1bfa583dbdf0115860cc183ca9319cd Mon Sep 17 00:00:00 2001 From: davila Date: Mon, 12 Jan 2015 11:04:51 +0100 Subject: [PATCH] #2500 creaImageIO Bug New Normal - Boost signals deprecated -> signals2 (cleanning warnings) --- src/creaImageIOGimmickView.cpp | 19 +++++++++---------- src/creaImageIOGimmickView.h | 4 ++-- src/creaImageIOListener.h | 4 ++-- src/creaImageIOSynchron.cpp | 6 +++--- src/creaImageIOTreeHandlerImageAdder.h | 4 ++-- src/creaImageIOWxGimmickPanel.h | 4 ++-- 6 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/creaImageIOGimmickView.cpp b/src/creaImageIOGimmickView.cpp index 0281042..2cca5ad 100644 --- a/src/creaImageIOGimmickView.cpp +++ b/src/creaImageIOGimmickView.cpp @@ -746,7 +746,7 @@ void GimmickView::ReadImagesNotThreadedInVector(std::vector& s, s else if (im.size()>1) // Test inutile ? JPR { /// \TODO fix unused variable 'first' - vtkImageData* first = mReader.GetImage( im.front()); +// vtkImageData* first = mReader.GetImage( im.front()); if (dimension == 2) { // n3D @@ -756,10 +756,8 @@ void GimmickView::ReadImagesNotThreadedInVector(std::vector& s, s vtkImageData* out = vtkImageData::New(); out->ShallowCopy(mReader.GetImage(*it)); s.push_back(out); - } - } - else - { + } // for + } else { // n2D to 3D // NO! // n *2D + T in a vector : @@ -768,9 +766,9 @@ void GimmickView::ReadImagesNotThreadedInVector(std::vector& s, s { vtkImageData* out = mReader.GetImage( (*it)); s.push_back(out); - } - } - } + } // for + } // if dimension + } // if im.size } //====================================================================== @@ -901,8 +899,9 @@ void GimmickView::Anonymize(std::vector i_filenames, int type) // We need a gdcm::FileHelper, since we want to load the pixels GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(file); - - uint8_t *imageData = fh->GetImageData(); + +//Borrame +//EED uint8_t *imageData = fh->GetImageData(); // Institution name file->AddAnonymizeElement(0x0008, 0x0080, "*"); diff --git a/src/creaImageIOGimmickView.h b/src/creaImageIOGimmickView.h index 02b35d8..d001690 100644 --- a/src/creaImageIOGimmickView.h +++ b/src/creaImageIOGimmickView.h @@ -46,7 +46,7 @@ // Signal/slot mechanism for progress events -#include +#include #include #define GIMMICK_NO_IMAGE_SELECTION 0 @@ -202,7 +202,7 @@ namespace creaImageIO vtkImageData* GetDefaultImage() { return mReader.GetImage(""); } //============================================= - typedef boost::signal ValidationSignalType; + typedef boost::signals2::signal ValidationSignalType; typedef ValidationSignalType::slot_function_type ValidationCallbackType; //============================================= diff --git a/src/creaImageIOListener.h b/src/creaImageIOListener.h index 6d50422..9f5e5d9 100644 --- a/src/creaImageIOListener.h +++ b/src/creaImageIOListener.h @@ -34,7 +34,7 @@ #include #include // Signal/slot mechanism -#include +#include #include #include @@ -63,7 +63,7 @@ namespace creaImageIO ///Related with signals //============================================= - typedef boost::signal MountingSignalType; + typedef boost::signals2::signal MountingSignalType; typedef MountingSignalType::slot_function_type MountingCallbackType; //============================================= diff --git a/src/creaImageIOSynchron.cpp b/src/creaImageIOSynchron.cpp index 9a6af0c..8ae670f 100644 --- a/src/creaImageIOSynchron.cpp +++ b/src/creaImageIOSynchron.cpp @@ -138,12 +138,12 @@ namespace creaImageIO do { pos = str.find('\\'); - if (pos!=-1) + if ( pos != (size_t)-1 ) { str.replace(pos, 1, "/"); } } - while (pos!=-1); + while ( pos != (size_t)-1 ); } //===================================================================== @@ -436,7 +436,7 @@ namespace creaImageIO query = "SELECT PATH, REMOVE FROM IGNORED_FILES WHERE"; if(keys.size() > 0) { - for (int i=0; i < keys.size(); i++) + for (int i=0; i < (int)keys.size(); i++) { query += " ADD_KEY = " + keys[i]; query += " AND"; diff --git a/src/creaImageIOTreeHandlerImageAdder.h b/src/creaImageIOTreeHandlerImageAdder.h index 435fbf9..79c855e 100644 --- a/src/creaImageIOTreeHandlerImageAdder.h +++ b/src/creaImageIOTreeHandlerImageAdder.h @@ -34,7 +34,7 @@ //#include // Signal/slot mechanism for progress events -#include +#include #include #if defined(USE_GDCM2) #include "creaImageIODicomScanner.h" @@ -112,7 +112,7 @@ namespace creaImageIO //============================================= //============================================= - typedef boost::signal ProgressSignalType; + typedef boost::signals2::signal ProgressSignalType; typedef ProgressSignalType::slot_function_type ProgressCallbackType; //============================================= diff --git a/src/creaImageIOWxGimmickPanel.h b/src/creaImageIOWxGimmickPanel.h index 77e5aa0..cb74ee1 100644 --- a/src/creaImageIOWxGimmickPanel.h +++ b/src/creaImageIOWxGimmickPanel.h @@ -32,7 +32,7 @@ #ifdef USE_WXWIDGETS // Signal/slot mechanism for progress events -#include +#include #include #include @@ -60,7 +60,7 @@ namespace creaImageIO ~WxGimmickPanel(); //============================================= - typedef boost::signal SendImageSignalType; + typedef boost::signals2::signal SendImageSignalType; typedef SendImageSignalType::slot_function_type SendImageCallbackType; //============================================= -- 2.47.1