-#include <iostream>
-#include "gdcm.h"
+/*=========================================================================
+
+ Program: gdcm
+ Module: $RCSfile: makeDicomDir.cxx,v $
+ Language: C++
+ Date: $Date: 2005/02/02 10:06:32 $
+ Version: $Revision: 1.12 $
+
+ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+ l'Image). All rights reserved. See Doc/License.txt or
+ http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
#include "gdcmDocEntry.h"
#include "gdcmDicomDir.h"
#include "gdcmDicomDirPatient.h"
#include "gdcmDirList.h"
-#include <fstream>
-#ifdef GDCM_NO_ANSI_STRING_STREAM
-# include <strstream>
-# define ostringstream ostrstream
-# else
-# include <sstream>
-#endif
-
-#define ostringstream ostrstream
-
-#include <sys/types.h>
-#include <errno.h>
-
-// for Directory pb
-#ifdef _MSC_VER
- #include <windows.h>
- #include <direct.h>
-#else
- #include <dirent.h>
- #include <unistd.h>
-#endif
-
-#include <vector>
-#include <algorithm>
+#include <iostream>
// ---
void StartMethod(void *toto) {
* and writes a file named NewDICOMDIR..
*/
-int main(int argc, char* argv[]) {
- gdcm::DicomDir *dcmdir;
+int main(int argc, char *argv[])
+{
+ gdcm::DicomDir *dcmdir;
std::string dirName;
if (argc > 1)
dcmdir->SetStartMethod(StartMethod, (void *) NULL);
dcmdir->SetEndMethod(EndMethod);
- gdcm::ListDicomDirPatient lp = dcmdir->GetDicomDirPatients();
- if (! lp.size() )
+ if ( !dcmdir->GetFirstEntry() )
{
std::cout << "makeDicomDir: no patient list present. Exiting."
<< std::endl;