From: davila Date: Thu, 11 Sep 2014 14:54:27 +0000 (+0200) Subject: #2451 creaImageIO Bug New Normal - not complete the Map with all DicomTags X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=bae8afe7ee037a3368be7060c3a0708582e7d413;p=creaImageIO.git #2451 creaImageIO Bug New Normal - not complete the Map with all DicomTags --- diff --git a/bbtk/src/bbcreaImageIOGetDicomAttributesFromMaps.cxx b/bbtk/src/bbcreaImageIOGetDicomAttributesFromMaps.cxx index bd45183..1dd7d1b 100644 --- a/bbtk/src/bbcreaImageIOGetDicomAttributesFromMaps.cxx +++ b/bbtk/src/bbcreaImageIOGetDicomAttributesFromMaps.cxx @@ -33,11 +33,9 @@ void GetDicomAttributesFromMaps::Process() for (i=0;isecond; - lstResult.push_back( strElement ); + tmpMap = bbGetInputIn()[i]; + strElement = tmpMap.find( bbGetInputKeyDicom() )->second; + lstResult.push_back( strElement ); } // for i bbSetOutputOut( lstResult ); diff --git a/src/creaImageIOGimmickView.cpp b/src/creaImageIOGimmickView.cpp index 245b0b5..0a76936 100644 --- a/src/creaImageIOGimmickView.cpp +++ b/src/creaImageIOGimmickView.cpp @@ -678,11 +678,8 @@ void GimmickView::ReadImagesNotThreaded(std::vector& s, std::vect else { readImages2(o_output,im, i_attr,i_zspc); - } - - } - else - { + } + } else { // multiple or single frame if ( isSingle(im.front()) ) { diff --git a/src/creaImageIOWxGimmickView.cpp b/src/creaImageIOWxGimmickView.cpp index 56a4f55..0ee66e5 100644 --- a/src/creaImageIOWxGimmickView.cpp +++ b/src/creaImageIOWxGimmickView.cpp @@ -358,7 +358,7 @@ namespace creaImageIO 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); @@ -369,6 +369,7 @@ namespace creaImageIO mGimmick->GetSetting(SETTINGS_OUTPUT_ASK, asking); mGimmick->GetSetting(SETTINGS_OUTPUT_DIM, dim); + if (asking == "true") { // display the output dialog box @@ -381,37 +382,35 @@ namespace creaImageIO dim = dlg->getDim(); mGimmick->UpdateSetting(SETTINGS_OUTPUT_ASK, dlg->getAsking()); mGimmick->UpdateSetting(SETTINGS_OUTPUT_DIM, dim); - } - else - { + } else { return; } - } - else - { + } else { } sscanf(dim.c_str(),"%d",&i_dim_out); - // Next we create the structure for dicom output infos OutputAttr Oattr; +//EED 01/09/2014 + if (i_dim_out==2) + { + Oattr.mult=true; + } // i_dim_out + + Oattr.db = crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())); if(i_attr.empty()) { // We don't send informations! - } - else if( i_attr.size() == 1 && i_attr.front() == "ALL") + } else if( i_attr.size() == 1 && i_attr.front() == "ALL") { // we send all database Oattr.inside.push_back("ALL"); - } - else if( (i_attr.size() == 1 && i_attr.front() != "ALL") + } else if( (i_attr.size() == 1 && i_attr.front() != "ALL") || (i_attr.size() >1) ) { mGimmick->fillVectInfos(i_attr, Oattr); - } - else - { + } else { // nothing }