1 /*=========================================================================
4 Module: $RCSfile: TestSerieHelper.cxx,v $
6 Date: $Date: 2005/05/26 18:50:45 $
7 Version: $Revision: 1.4 $
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 int TestSerieHelper(int argc, char *argv[])
32 dirName = GDCM_DATA_ROOT;
36 // gdcm::Debug::DebugOn();
38 std::cout << "Dir Name :[" << dirName << "]" << std::endl;
40 s = new gdcm::SerieHelper();
41 s->SetDirectory(dirName, true); // true : recursive exploration
42 std::cout << " -------------------------------------------Finish parsing :["
43 << dirName << "]" << std::endl;
46 std::cout << " -----------------------------------------Finish printing (1)"
50 // For all the Coherent Files lists of the gdcm::Serie
51 gdcm::FileList *l = s->GetFirstCoherentFileList();
55 if ( l->size() > 3 ) // Why not ? Just an example, for testing
57 std::cout << "Sort list : " << nbFiles << " long" << std::endl;
58 s->OrderFileList(l); // sort the list
60 l = s->GetNextCoherentFileList();
62 std::cout << " ----------------------------------------------Finish sorting"
64 s->Print(); // Prints all the Coherent Files lists (sorted or not)
65 std::cout << " ---------------------------------------------Finish printing"