From 4df41c05225bee74ec2f3803f210882a2e1204ee Mon Sep 17 00:00:00 2001 From: Frederic Cervenansky Date: Wed, 1 Jun 2011 09:03:05 +0000 Subject: [PATCH] acces to DICOM infos from GIMMICK --- src/creaImageIOExternalGimmick.cpp | 17 ++++++++++++++++ src/creaImageIOWxSimpleDlg.cpp | 31 ++++++++++++++---------------- src/creaImageIOWxSimpleDlg.h | 15 +++++++++++++-- 3 files changed, 44 insertions(+), 19 deletions(-) diff --git a/src/creaImageIOExternalGimmick.cpp b/src/creaImageIOExternalGimmick.cpp index 7e56ab9..34b0cb6 100644 --- a/src/creaImageIOExternalGimmick.cpp +++ b/src/creaImageIOExternalGimmick.cpp @@ -29,6 +29,23 @@ vtkImageData* getImageDataDialog() } + +std::vector getImagesInfoDialog() +{ + wxString infoImage; + std::vector s; + creaImageIO::WxSimpleDlg w(0,_T("Select your image"),"creaContours_Descriptor.dscp","creatisContours DB"); + w.setInfo(true); + w.ShowModal(); + if(w.GetReturnCode() == wxID_OK) + { + s = w.getMapInfos(); + } + + return s; +} + + /*EED Borrame vtkImageData* getImageDataDialog() { // wxApp::OnInit(); diff --git a/src/creaImageIOWxSimpleDlg.cpp b/src/creaImageIOWxSimpleDlg.cpp index a9b1b4b..072e9e7 100644 --- a/src/creaImageIOWxSimpleDlg.cpp +++ b/src/creaImageIOWxSimpleDlg.cpp @@ -1,8 +1,5 @@ #include "creaImageIOWxSimpleDlg.h" -#include "creaImageIOWxGimmickReaderDialog.h" -//#include -//#include -//#include + namespace creaImageIO { @@ -35,7 +32,7 @@ namespace creaImageIO Connect( gimmickBut->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxSimpleDlg::OnReadGimmick ); /// \TODO Button to select Bruker directory - + bInfo = false; Layout(); } @@ -54,8 +51,6 @@ namespace creaImageIO fileDlg->GetPaths(wxArray); if(wxArray.size() >0) { - /* typedef itk::Image< float, 4 > ImageType; - ReadImage(crea::wx2std(wxArray[0]).c_str());*/ infoimage=_T("FILE(s):")+wxArray[0]; std::vector files; @@ -120,28 +115,30 @@ namespace creaImageIO dlg.ShowModal(); if (dlg.GetReturnCode() == wxID_OK) { - // infoimage=_T("DICOM: ???_EED_???"); -//EED 07JUIN2010 dlg.GetSelectedImages(m_results,3); std::vector out; std::vector attr; -// attr.push_back("D0028_0010"); -// attr.push_back("D0008_0023"); -// attr.push_back("D0008_1070"); dlg.stopReading(); dlg.getSelected(out, attr,true,""); -// crea::VtkBasicSlicer(out.front().img); m_results.clear(); int size=out.size(); int ii; - for (ii=0;ii - +#include "creaImageIOWxGimmickReaderDialog.h" namespace creaImageIO { /** @@ -34,8 +34,15 @@ namespace creaImageIO wxString getInfoImage(); - private: + void setInfo(bool i_val){bInfo = i_val;} + + // OutStrGimmick: + // - vtkImageData * + // - std::map mapDicomInfos (std::map + std::vector getMapInfos(){return m_resultsInfo;} + private: + bool bInfo; std::string namedescp; std::string namedb; wxString infoimage; @@ -45,5 +52,9 @@ namespace creaImageIO /// vtkImageData vector std::vector m_results; + + std::vector m_resultsInfo; + + }; } -- 2.47.1