- // Get the directory name
- const char *directory = argv[1];
-#if 0
- gdcm::SerieHelper *s;
- std::cout << "Dir Name :[" << directory << "]" << std::endl;
-
- s = gdcm::SerieHelper::New();
- s->SetLoadMode(gdcm::LD_NOSHADOW | gdcm::LD_NOSEQ);
- // 0008|0060 [CS] [Modality] [CT]
- gdcm::TagKey modality(0x0008,0x0060);
- s->AddRestriction(modality, "CT", gdcm::GDCM_EQUAL); // Keep only files where
- // restriction is true
- s->SetDirectory(directory, true); // true : recursive exploration
-
-// std::cout << " ---------------------------------------- Finish parsing :["
-// << directory << "]" << std::endl;
-//
-// s->Print();
-// std::cout << " ---------------------------------------- Finish printing (1)"
-// << std::endl;
-
- int nbFiles;
- // For all the Single SerieUID Files Sets of the gdcm::Serie
- gdcm::FileList *l = s->GetFirstSingleSerieUIDFileSet();
- while (l)
- {
- nbFiles = l->size() ;
- //if ( l->size() > 3 ) // Why not ? Just an example, for testing
- {
- //std::cout << "Sort list : " << nbFiles << " long" << std::endl;
- s->OrderFileList(l); // sort the list
- }
- l = s->GetNextSingleSerieUIDFileSet();
- }
- s->Delete();
-#endif
+ // Get the reference & directory name
+ const char *reference = argv[1];
+ const char *directory = argv[2];