+ std::cout << "List to sort : " << nbFiles << " long" << std::endl;
+ //---------------------------------------------------------
+ s->OrderFileList(l); // sort the list (and compute ZSpacing !)
+ //---------------------------------------------------------
+ std::cout << "List after sorting : " << l->size() << " long" << std::endl;
+
+ zspacing = s->GetZSpacing();
+ // Just to show : GetZSpacing from a GDCM_NAME_SPACE::SerieHelper is right
+ std::cout << "GetZSpacing() of sorted SingleSerieUIDFileSet "
+ << "from GDCM_NAME_SPACE::SerieHelper: " << zspacing << std::endl;
+ std::cout << " ('-1' means all the files have the same position)" << std::endl;
+
+ // Check the vector content
+ int fileCount = 0;
+ // for (std::vector<GDCM_NAME_SPACE::File* >::iterator it2 = l->begin();
+ for (GDCM_NAME_SPACE::FileList::const_iterator it2 = l->begin();
+ it2 != l->end();
+ ++it2)
+ {
+ // Just to show : GetZSpacing from a GDCM_NAME_SPACE::File may be different
+ std::cout << (*it2)->GetFileName() << " --> Get{X/Y/Z}Spacing() from GDCM_NAME_SPACE::File : "
+ << (*it2)->GetXSpacing() << " "
+ << (*it2)->GetYSpacing() << " "
+ << (*it2)->GetZSpacing() << std::endl;
+ fileCount++;
+ }
+ std::cout << "Iterate trough vector, nb of files : " << fileCount << std::endl;
+
+ //break; // we only deal with the first one ... Why not ?