1 /*=========================================================================
4 Module: $RCSfile: TestSerieHelper.cxx,v $
6 Date: $Date: 2005/02/02 14:26:34 $
7 Version: $Revision: 1.1 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
18 #include "gdcmSerieHelper.h"
20 #include "gdcmDebug.h"
23 typedef std::list<gdcm::File* > GdcmFileList;
25 int TestSerieHelper(int argc, char* argv[])
34 dirName = GDCM_DATA_ROOT;
38 // gdcm::Debug::SetDebugOn();
40 std::cout << "Dir Name :[" << dirName << "]" << std::endl;
42 s = new gdcm::SerieHelper();
43 s->SetDirectory(dirName, true); // true : recursive exploration
44 std::cout << " -------------------------------------------Finish parsing :["
45 << dirName << "]" << std::endl;
48 std::cout << " -----------------------------------------Finish printing (1)"
52 // For all the Coherent Files lists of the gdcm::Serie
53 GdcmFileList *l = s->GetFirstCoherentFileList();
57 if ( l->size() > 3 ) // Why not ? Just an example, for testing
59 std::cout << "Sort list : " << nbFiles << " long" << std::endl;
60 s->OrderGdcmFileList(l); // sort the list
62 l = s->GetNextCoherentFileList();
64 std::cout << " ----------------------------------------------Finish sorting"
66 s->Print(); // Prints all the Coherent Files lists (sorted or not)
67 std::cout << " ---------------------------------------------Finish printing"