2 // 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)
4 #include "bbcreaImageIOGetDicomAttributesFromMaps.h"
5 #include "bbcreaImageIOPackage.h"
6 namespace bbcreaImageIO
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaImageIO,GetDicomAttributesFromMaps)
10 BBTK_BLACK_BOX_IMPLEMENTATION(GetDicomAttributesFromMaps,bbtk::AtomicBlackBox);
12 // 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)
14 void GetDicomAttributesFromMaps::Process()
16 // THE MAIN PROCESSING METHOD BODY
17 // Here we simply set the input 'In' value to the output 'Out'
18 // And print out the output value
19 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
20 // void bbSet{Input|Output}NAME(const TYPE&)
21 // const TYPE& bbGet{Input|Output}NAME() const
23 // * NAME is the name of the input/output
24 // (the one provided in the attribute 'name' of the tag 'input')
25 // * TYPE is the C++ type of the input/output
26 // (the one provided in the attribute 'type' of the tag 'input')
28 std::vector< std::string > lstResult;
29 std::map <std::string,std::string> tmpMap;
30 int i,size=bbGetInputIn().size();
32 // The MAP.find() function is not working in all the cases
36 tmpMap = bbGetInputIn()[i];
37 std::map<std::string, std::string>::iterator it;
38 for ( it = tmpMap.begin(); it != tmpMap.end(); it++ )
40 if (it->first==bbGetInputKeyDicom())
42 lstResult.push_back( it->second );
46 bbSetOutputOut( lstResult );
49 // 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)
51 void GetDicomAttributesFromMaps::bbUserSetDefaultValues()
54 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
55 // Here we initialize the input 'In' to 0
60 // 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)
62 void GetDicomAttributesFromMaps::bbUserInitializeProcessing()
65 // THE INITIALIZATION METHOD BODY :
67 // but this is where you should allocate the internal/output pointers
73 // 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)
75 void GetDicomAttributesFromMaps::bbUserFinalizeProcessing()
78 // THE FINALIZATION METHOD BODY :
80 // but this is where you should desallocate the internal/output pointers
85 // EO namespace bbcreaImageIO