X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbcreaImageIOGetDicomAttributesFromMaps.cxx;fp=bbtk%2Fsrc%2FbbcreaImageIOGetDicomAttributesFromMaps.cxx;h=98bdb5742217c7d01ccbd5210274da2c0be0786e;hb=0d75ab3cb25deacda0547d4156ebef481396c62e;hp=1dd7d1b2b359d38190d51ec92c26c7803b4fc4dd;hpb=11e2ea359bee86f7601ea92cbcf8652a2d956c9a;p=creaImageIO.git diff --git a/bbtk/src/bbcreaImageIOGetDicomAttributesFromMaps.cxx b/bbtk/src/bbcreaImageIOGetDicomAttributesFromMaps.cxx index 1dd7d1b..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,16 +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 ); + 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)