From 4695af60407895e5f0851ffcb9afdb138c9870f7 Mon Sep 17 00:00:00 2001 From: jpr Date: Sun, 17 Jul 2005 04:25:12 +0000 Subject: [PATCH] Check some more usages --- Testing/TestSerieHelper.cxx | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/Testing/TestSerieHelper.cxx b/Testing/TestSerieHelper.cxx index 5ab5a289..76ef8544 100644 --- a/Testing/TestSerieHelper.cxx +++ b/Testing/TestSerieHelper.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestSerieHelper.cxx,v $ Language: C++ - Date: $Date: 2005/07/08 13:39:57 $ - Version: $Revision: 1.5 $ + Date: $Date: 2005/07/17 04:25:12 $ + Version: $Revision: 1.6 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -35,15 +35,19 @@ int TestSerieHelper(int argc, char *argv[]) //if (argc > 2) // gdcm::Debug::DebugOn(); + std::cout << "Dir Name :[" << dirName << "]" << std::endl; s = new gdcm::SerieHelper(); + s->SetLoadMode(0x00000000); // Load everything for each File + //s->AddRestriction(tagKey, valueToCheck); // Keep only files where + // restriction is true s->SetDirectory(dirName, true); // true : recursive exploration - std::cout << " -------------------------------------------Finish parsing :[" + std::cout << " ---------------------------------------- Finish parsing :[" << dirName << "]" << std::endl; s->Print(); - std::cout << " -----------------------------------------Finish printing (1)" + std::cout << " ---------------------------------------- Finish printing (1)" << std::endl; int nbFiles; @@ -59,12 +63,30 @@ int TestSerieHelper(int argc, char *argv[]) } l = s->GetNextCoherentFileList(); } - std::cout << " ----------------------------------------------Finish sorting" + std::cout << " -------------------------------------------- Finish sorting" << std::endl; s->Print(); // Prints all the Coherent Files lists (sorted or not) - std::cout << " ---------------------------------------------Finish printing" + std::cout << " -------------------------------------------- Finish printing" << std::endl; + + // Only for the first Coherent File List + // ( Why not ? Just an example, for testing ) + // Display all the file names + + std::string fileName; + l = s->GetFirstCoherentFileList(); + for (std::vector::iterator it = l->begin(); + it != l->end(); + ++it) + { + fileName = (*it)->GetFileName(); + std::cout << fileName << std::endl; + // Remark : vtkGdcmReader users can use this loop to AddFileName(fileName) + // in the right order + } + + delete s; return 0; -- 2.45.1