From: donadio Date: Thu, 14 May 2009 15:51:20 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: EED.02Oct2009~27 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0e89441a8389a384ae45ae73e382edfd6d35b252;p=creaContours.git *** empty log message *** --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5076630..cb80249 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,20 +34,23 @@ IF (creaMaracasVisu_FOUND) ENDIF(creaMaracasVisu_FOUND) -FIND_PACKAGE(creaImageIO REQUIRED) -IF (creaImageIO_FOUND) - INCLUDE(${creaImageIO_USE_FILE}) -ENDIF(creaImageIO_FOUND) +#FIND_PACKAGE(creaImageIO REQUIRED) +#IF (creaImageIO_FOUND) +# INCLUDE(${creaImageIO_USE_FILE}) +#ENDIF(creaImageIO_FOUND) +FIND_PACKAGE(creaImageIO2 REQUIRED) +IF (creaImageIO2_FOUND) + INCLUDE(${creaImageIO2_USE_FILE}) +ENDIF(creaImageIO2_FOUND) - -SET(USE_GDCM OFF) +SET(USE_GDCM ON) SET(USE_GDCM_VTK ON) SET(USE_WXWIDGETS ON) SET(USE_VTK ON) SET(USE_ITK ON) -SET(USE_BOOST OFF) +SET(USE_BOOST ON) CREA_FIND_AND_USE_LIBRARIES() diff --git a/appli/wxContourGUIExample/CMakeLists.txt b/appli/wxContourGUIExample/CMakeLists.txt index 27220a7..953818b 100644 --- a/appli/wxContourGUIExample/CMakeLists.txt +++ b/appli/wxContourGUIExample/CMakeLists.txt @@ -15,7 +15,8 @@ TARGET_LINK_LIBRARIES( wxContourGUIExample ${ITK_LIBRARIES} ${creaEnvironment_LIBRARIES} ${creaMaracasVisu_LIBRARIES} - ${creaImageIO_LIBRARIES} +# ${creaImageIO_LIBRARIES} + ${creaImageIO2_LIBRARIES} Interface_Icons_NDimensions_lib Interface_ManagerContour_NDimensions_lib kernel_ManagerContour_NDimensions_lib diff --git a/appli/wxContourGUIExample/wxContourGUIExample.cxx b/appli/wxContourGUIExample/wxContourGUIExample.cxx index 7b15059..e80ea04 100644 --- a/appli/wxContourGUIExample/wxContourGUIExample.cxx +++ b/appli/wxContourGUIExample/wxContourGUIExample.cxx @@ -7,7 +7,9 @@ //#include "OutlineModelManager.h" //#include "wxContourEventHandler.h" -#include +//#include +#include +#include #include //#include "wxContourMainPanel.h" @@ -265,50 +267,49 @@ bool wxTheApplication :: OnInit() { wxInitAllImageHandlers(); - int image_type = GIMMICK_3D_IMAGE_SELECTION; - int threads = 1; + int min_image_type = GIMMICK_2D_IMAGE_SELECTION; + int max_image_type = GIMMICK_3D_IMAGE_SELECTION; + int output_dim = NATIVE; + int threads = 1; - creaImageIO::WxGimmickDialog w(0, - -1, - _T("WxGimmickDialog test"), - wxDefaultPosition, - wxSize(1200,800), - image_type, - threads); - w.ShowModal(); + //creaImageIO::WxGimmickDialog w(0,-1,_T("WxGimmickDialog test"),wxDefaultPosition,wxSize(1200,800),max_image_type,threads); + creaImageIO::WxGimmickReaderDialog w(0,-1,_T("WxGimmickDialog test"),wxDefaultPosition,wxSize(1200,800),min_image_type,max_image_type,output_dim,threads); + w.ShowModal(); - std::string datadir( GetExecutablePath() ) ; + std::string datadir( crea::wx2std(GetExecutablePath()) ); -#ifdef MACOSX /* assume this is OSX */ - datadir=datadir+"/../../.."; -#endif // MACOSX - - //vtkImageData* selectedimage=NULL; - std::vector images; - if(w.GetReturnCode() == wxID_OK){ - - std::vector s; - w.GetSelectedFiles(s); - std::vector::iterator i; - for (i=s.begin();i!=s.end();++i){ - std::cout << *i << std::endl; - } - - std::cout << "$$$$ "<Delete(); + #ifdef MACOSX /* assume this is OSX */ + datadir=datadir+"/../../.."; + #endif // MACOSX + + + std::vector images; - }else if (w.GetReturnCode() == wxID_CANCEL){ - vtkMetaImageReader *reader = vtkMetaImageReader::New(); - std::string filename= datadir + "/data/hola.mhd"; - reader->SetFileName( filename.c_str() ); - reader->Update(); - images.push_back(reader->GetOutput()); - }else{ - return -1; - } + if(w.GetReturnCode() == wxID_OK) + { + std::vector s; + w.GetSelectedFiles(s); + std::vector::iterator i; + for (i=s.begin();i!=s.end();++i) + { + std::cout << *i << std::endl; + } + std::cout << "$$$$ "<SetFileName( filename.c_str() ); + reader->Update(); + images.push_back(reader->GetOutput()); + } + else + { + return -1; + } wxFrame* frame1 = new wxFrame(NULL, wxID_ANY, wxT("ROI Application - Evaluation version, 09 Feb 2009 "), wxPoint(400,50), wxSize(800, 600) );