- std::list<gdcmHeader*>::iterator it = CoherentGdcmFileList.begin();
- min = max = (*it)->GetImageNumber();
-
- for (; it != CoherentGdcmFileList.end(); it++, n++)
- {
- pos = (*it)->GetImageNumber();
-
- //else
- min = (min < pos) ? min : pos;
- }
-
- //bzeros(partition, n); //Cette fonction est déconseillée, utilisez plutôt memset.
- partition = new unsigned char[n];
- memset(partition, 0, n);
-
- std::vector<gdcmHeader*> CoherentGdcmFileVector(n);
-
- //VC++ don't understand what scope is !! it -> it2
- for (std::list<gdcmHeader*>::iterator it2 = CoherentGdcmFileList.begin();
- it2 != CoherentGdcmFileList.end(); it2++)
- {
- pos = (*it2)->GetImageNumber();
- CoherentGdcmFileVector[pos - min] = *it2;
- partition[pos - min]++;
- }
+ GdcmHeaderList::const_iterator it = CoherentGdcmFileList.begin();
+ min = max = (*it)->GetImageNumber();
+
+ for (; it != CoherentGdcmFileList.end(); ++it, ++n)
+ {
+ pos = (*it)->GetImageNumber();
+
+ //else
+ min = (min < pos) ? min : pos;
+ }
+
+ //bzeros(partition, n); //Cette fonction est déconseillée, utilisez plutôt memset.
+ partition = new unsigned char[n];
+ memset(partition, 0, n);
+
+ GdcmHeaderVector CoherentGdcmFileVector(n);
+
+ //VC++ don't understand what scope is !! it -> it2
+ for (GdcmHeaderList::const_iterator it2 = CoherentGdcmFileList.begin();
+ it2 != CoherentGdcmFileList.end(); ++it2)
+ {
+ pos = (*it2)->GetImageNumber();
+ CoherentGdcmFileVector[pos - min] = *it2;
+ partition[pos - min]++;
+ }