+ ///this is a trick to build up a lexicographical compliant name :
+ /// eg : fich001.ima vs fich100.ima as opposed to fich1.ima vs fich100.ima
+ std::string name = GDCM_NAME_SPACE::Util::GetName( *it );
+
+ std::cout << "name :[" << name << "]\n";
+
+ if (hasSkel)
+ {
+ int imageNum; // Within FileName
+ GDCM_NAME_SPACE::Util::Tokenize (name, tokensForFileName, skel);
+ imageNum = atoi ( tokensForFileName[0].c_str() );
+ // probabely we could write something much more complicated using C++ !
+ sprintf (newName, "%s%06d.dcm", skel, imageNum);
+ tokens[IND_FileName] = newName;
+ tokensForFileName.clear();
+ }
+ else
+ {
+ tokens[IND_FileName] = name;
+ }
+