From 1d55c1cf210e95a6dc12fb8af67b2d21e48fb408 Mon Sep 17 00:00:00 2001 From: Frederic Cervenansky Date: Mon, 18 Apr 2011 14:15:46 +0000 Subject: [PATCH] correction of minor bugs: quotes and last slice in first place --- CMakeLists.txt | 4 +++- appli/CMakeLists.txt | 4 +++- appli/TestWxGimmickReaderDialog/main.cxx | 3 +++ src/CMakeLists.txt | 11 ++++++++++- src/creaImageIOSQLiteTreeHandler.cpp | 8 +++++++- src/creaImageIOSQLiteTreeHandler.h | 1 + src/creaImageIOSynchron.cpp | 17 ++++++++++++----- src/creaImageIOSynchron.h | 1 + src/creaImageIOWxTreeView.cpp | 8 +++++--- src/creaImageIOWxViewer.cpp | 3 ++- win64/sqlite/CMakeLists.txt | 8 ++++++++ 11 files changed, 55 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 84061b5..b1d6dfc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ add_definitions(-DBOOST_FILESYSTEM_VERSION=2) SET(USE_GDCM_VTK ON) SET(USE_VTK ON) -SET(USE_ITK OFF) + SET(USE_BOOST ON) OPTION(USE_WXWIDGETS "Use WxWidgets GUI" ON) OPTION(USE_QT4 "USE QT4GUI" OFF) @@ -76,7 +76,9 @@ IF(USE_GDCM2) OPTION(USE_GDCM_ANOM "use gdcm2 anonymizer tool" OFF) #TO DO TEST IF GDCM_USE_SYSTEM_OPENSSL is valid ENDIF(USE_GDCM2) +OPTION(USE_ITK "use ITK" ON) CREA_FIND_AND_USE_LIBRARIES() +message ("itk libs : ${ITK_LIBRARIES}") SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}) SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}) diff --git a/appli/CMakeLists.txt b/appli/CMakeLists.txt index 289e7a2..5a96249 100644 --- a/appli/CMakeLists.txt +++ b/appli/CMakeLists.txt @@ -15,7 +15,9 @@ IF(!USE_INSTALL_APP) ADD_SUBDIRECTORY(TestQtGimmick) ENDIF(USE_QT4) - +IF(USE_ITK) + ADD_SUBDIRECTORY(TestWxItkView) +ENDIF(USE_ITK) #ADD_SUBDIRECTORY(TestWxGimmickReaderDialogJava) #LSE (BUILD_V2) # ADD_SUBDIRECTORY(TestWxGimmickDialog) diff --git a/appli/TestWxGimmickReaderDialog/main.cxx b/appli/TestWxGimmickReaderDialog/main.cxx index e2de0d0..e79b069 100644 --- a/appli/TestWxGimmickReaderDialog/main.cxx +++ b/appli/TestWxGimmickReaderDialog/main.cxx @@ -7,6 +7,7 @@ + //#pragma comment(lib, "creaImageIO.lib") //#pragma comment(lib, "DelayImp.lib") // @@ -29,6 +30,8 @@ IMPLEMENT_APP(myApp); CREA_WXMAIN_WITH_CONSOLE + + bool myApp::OnInit( ) { wxApp::OnInit(); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 064b4ef..bce3f2b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,6 +71,13 @@ FILE(GLOB SOURCES_CREAIMAGEIO_IMG_READER ${SOURCES_CREAIMAGEIO_IMG_DICOM_READER} ${SOURCES_CREAIMAGEIO_MULTI_IMG_READER} ) +IF(USE_ITK) +FILE(GLOB SOURCES_CREAIMAGEIO_ITK_DLG + creaImageIOWxIsimpleDlg.h + creaImageIOWxIsimpleDlg.txx + ) +ENDIF(USE_ITK) + #-------------------------------------------- # The wxWidgets-based components if (USE_WXWIDGETS) @@ -160,7 +167,7 @@ SOURCE_GROUP("Source Files\\Readers" FILES ${SOURCES_CREAIMAGEIO_IMG_READER} ${SOURCES_CREAIMAGEIO_IMG_DICOM_READER}) SOURCE_GROUP("Source Files\\Tree" FILES ${SOURCES_CREAIMAGEIO_TREE}) - +SOURCE_GROUP("Source Files\\ITK" FILES ${SOURCES_CREAIMAGEIO_ITK_DLG}) IF(USE_WXWIDGETS) @@ -182,6 +189,7 @@ SET( PRIMITIVE_SRCS ${SOURCES_CREAIMAGEIO_IMG_DICOM_READER} ${GUI_SRCS} ${SOURCES_CREAIMAGEIO_TREE} + ${SOURCES_CREAIMAGEIO_ITK_DLG} ) @@ -236,6 +244,7 @@ TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${VTK_LIBRARIES} ${GDCM_LIBRARIES} ${BOOST_LIBRARIES} + ${ITK_LIBRARIES} sqlite3) ELSE(NOT USE_XERCES) TARGET_LINK_LIBRARIES(${LIBRARY_NAME} diff --git a/src/creaImageIOSQLiteTreeHandler.cpp b/src/creaImageIOSQLiteTreeHandler.cpp index 478a4be..dfcea65 100644 --- a/src/creaImageIOSQLiteTreeHandler.cpp +++ b/src/creaImageIOSQLiteTreeHandler.cpp @@ -771,7 +771,7 @@ GimmickDebugMessage(1, "query : '" <GetAttribute("ID"); sql +="'"; @@ -1105,5 +1105,11 @@ GimmickDebugMessage(1, "query : '" < GetIgnoreList(const std::string &i_key); + const std::string convert(const std::string &i_word); }; //================================================================================================================ diff --git a/src/creaImageIOWxTreeView.cpp b/src/creaImageIOWxTreeView.cpp index 85cf000..34db01a 100644 --- a/src/creaImageIOWxTreeView.cpp +++ b/src/creaImageIOWxTreeView.cpp @@ -304,17 +304,19 @@ namespace creaImageIO break; long adr = GetCtrl(l-1)->GetItemData(item); tree::Node* n = ((ItemData*)adr)->node; - if(mLastSelected==item) + /* FCY 18-04-2011: don't understand the real purpose of these lines, + if uncomment add last frame in first place + if(mLastSelected==item) { std::vector::iterator it; it = sel.begin(); it = sel.insert ( it , n ); } else - { + {*/ sel.push_back(n); - } + //} } /*int n = GetCtrl(l-1)->GetItemCount(); diff --git a/src/creaImageIOWxViewer.cpp b/src/creaImageIOWxViewer.cpp index 92ec86c..603d128 100644 --- a/src/creaImageIOWxViewer.cpp +++ b/src/creaImageIOWxViewer.cpp @@ -120,6 +120,7 @@ namespace creaImageIO imagePointers=pointers; mslide->SetMax(pointers.size()); + mslide->SetMin(1); // Refresh don't work, TO MODIFY mslide->Refresh(); mslide->ClearTicks(); @@ -306,7 +307,7 @@ std::cout << std::endl; void WxViewer::OnSlide(wxCommandEvent &Event) { - mCurrent = mslide->GetValue(); + mCurrent = mslide->GetValue() -1; StartPlayer(); } //================================================================ diff --git a/win64/sqlite/CMakeLists.txt b/win64/sqlite/CMakeLists.txt index 2aa17fa..558a32e 100644 --- a/win64/sqlite/CMakeLists.txt +++ b/win64/sqlite/CMakeLists.txt @@ -15,9 +15,17 @@ if ( WIN32 ) endif ( MSVC ) endif ( WIN32 ) + FIND_PACKAGE(GDCM REQUIRED) + INCLUDE_DIRECTORIES(${GDCM_INCLUDE_DIRS}) + + +# ${GDCM_DIR}/bin/Debug/gdcmDSED.lib + # ${GDCM_DIR}/bin/Debug/gdcmMSFF.lib) + add_library ( sqlite3 SHARED ${SOURCES} ${HEADERS} + gdcmDSED.lib ) INSTALL ( TARGETS sqlite3 -- 2.47.1