//=====
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
std::vector< std::string > lstResult;
std::map <std::string,std::string> tmpMap;
int i,size=bbGetInputIn().size();
- std::string strElement;
+
+// The MAP.find() function is not working in all the cases
for (i=0;i<size;i++)
{
- tmpMap = bbGetInputIn()[i];
- printf("EED GetDicomAttributesFromMaps::Process %d", tmpMap.size() );
-
- strElement = tmpMap.find( bbGetInputKeyDicom() )->second;
- lstResult.push_back( strElement );
+ tmpMap = bbGetInputIn()[i];
+ std::map<std::string, std::string>::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)