Program: gdcm
Module: $RCSfile: exSerieHelper.cxx,v $
Language: C++
- Date: $Date: 2005/08/30 14:40:28 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2005/11/14 15:55:17 $
+ Version: $Revision: 1.7 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::cout << "Dir Name :[" << dirName << "]" << std::endl;
- s = new gdcm::SerieHelper();
- s->SetLoadMode(GDCM_LD_ALL); // Load everything for each File
- //s->AddRestriction(tagKey, valueToCheck); // Keep only files where
+ s = gdcm::SerieHelper::New();
+ s->SetLoadMode(gdcm::LD_ALL); // Load everything for each File
+ //gdcm::TagKey t(0x0020,0x0013);
+ //s->AddRestriction(t, "340", gdcm::GDCM_LESS); // Keep only files where
// restriction is true
s->SetDirectory(dirName, true); // true : recursive exploration
<< std::endl;
int nbFiles;
- // For all the Coherent Files lists of the gdcm::Serie
- gdcm::FileList *l = s->GetFirstCoherentFileList();
+ // For all the Single SerieUID Files Sets of the gdcm::Serie
+ gdcm::FileList *l = s->GetFirstSingleSerieUIDFileSet();
while (l)
{
nbFiles = l->size() ;
std::cout << "Sort list : " << nbFiles << " long" << std::endl;
s->OrderFileList(l); // sort the list
}
- l = s->GetNextCoherentFileList();
+ l = s->GetNextSingleSerieUIDFileSet();
}
std::cout << " -------------------------------------------- Finish sorting"
<< std::endl;
- s->Print(); // Prints all the Coherent Files lists (sorted or not)
+ s->Print(); // Prints all the Single SerieUID File Sets (sorted or not)
std::cout << " -------------------------------------------- Finish printing"
<< std::endl;
// Display all the file names
std::string fileName;
- l = s->GetFirstCoherentFileList();
+ l = s->GetFirstSingleSerieUIDFileSet();
for (std::vector<gdcm::File* >::iterator it = l->begin();
it != l->end();
++it)
}
- delete s;
+ s->Delete();
return 0;
}