+/**/
+ else // ici, on traite le cas *vraiment* n*2D as 3D // JPR
+ {
+ typedef std::vector<GDCM_NAME_SPACE::File* > FileList;
+ FileList fileVector;
+ //GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New();
+ GDCM_NAME_SPACE::SerieHelper *sh = GDCM_NAME_SPACE::SerieHelper::New();
+ std::vector<std::string>::iterator it;
+ for (it=im.begin(); it!=im.end(); ++it)
+ {
+ //std::cout << "avant Load ---------" << *it << std::endl;
+
+ ///\TODO liberer les GDCM_NAME_SPACE::File a la fin! // JPR
+ GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New();
+
+ f->SetFileName(*it);
+ f->Load();
+ if (f->IsReadable())
+ fileVector.push_back(f);
+ else
+ std::cout << "File [" << *it << "] not GDCM Readable; Skipped!" << std::endl;
+ }
+
+ /*
+ for (int i=0; i<fileVector.size();i++)
+ {
+ std::cout << "avant tri ---------" << fileVector[i]->GetFileName() << std::endl;
+ }
+ */
+ if (!sh->IsCoherent(&fileVector))
+ {
+ std::cout << "---------fileset is NOT coherent ?!?" << *it << std::endl;
+ //return;
+ }
+ else
+ {
+ sh->OrderFileList(&fileVector);
+ }
+ /*
+ for (int i=0; i<fileVector.size();i++)
+ {
+ std::cout << "apres tri ---------" << fileVector[i]->GetFileName() << std::endl;
+ }
+ */
+ vtkGdcmReader *reader = vtkGdcmReader::New();
+ reader->SetCoherentFileList(&fileVector);
+ reader->Update();
+ s.push_back(reader->GetOutput());
+ reader->GetOutput()->Print(std::cout);
+ }
+ /**/