X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbcreaImageIOGetDicomAttributesFromMaps.cxx;h=98bdb5742217c7d01ccbd5210274da2c0be0786e;hb=refs%2Fheads%2Fvtk8itk4wx3-mingw64;hp=bd451839c85536627b66387d5b37c8cee57bb680;hpb=68975087396fa3f3e1adb04073cd30dc79b535a3;p=creaImageIO.git diff --git a/bbtk/src/bbcreaImageIOGetDicomAttributesFromMaps.cxx b/bbtk/src/bbcreaImageIOGetDicomAttributesFromMaps.cxx index bd45183..98bdb57 100644 --- a/bbtk/src/bbcreaImageIOGetDicomAttributesFromMaps.cxx +++ b/bbtk/src/bbcreaImageIOGetDicomAttributesFromMaps.cxx @@ -13,7 +13,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(GetDicomAttributesFromMaps,bbtk::AtomicBlackBox); //===== void GetDicomAttributesFromMaps::Process() { - // THE MAIN PROCESSING METHOD BODY // Here we simply set the input 'In' value to the output 'Out' // And print out the output value @@ -29,18 +28,22 @@ void GetDicomAttributesFromMaps::Process() std::vector< std::string > lstResult; std::map tmpMap; int i,size=bbGetInputIn().size(); - std::string strElement; + +// The MAP.find() function is not working in all the cases for (i=0;isecond; - lstResult.push_back( strElement ); + tmpMap = bbGetInputIn()[i]; + std::map::iterator it; + for ( it = tmpMap.begin(); it != tmpMap.end(); it++ ) + { + if (it->first==bbGetInputKeyDicom()) + { + lstResult.push_back( it->second ); + } // if it->first + }//for it } // for i bbSetOutputOut( lstResult ); - } //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)