]> Creatis software - gdcm.git/blobdiff - Example/PrintDicomDir.cxx
* Example/WriteDicomSimple.cxx : example to write a dicom file from nothing.
[gdcm.git] / Example / PrintDicomDir.cxx
index 852ba533ccfff87269dd986668292fc99e3e03a2..1baf901ca2bc892014c5d831b438ae19f69c7bbf 100644 (file)
@@ -1,22 +1,41 @@
-#include <iostream>
-#include "gdcm.h"
+/*=========================================================================
+                                                                                
+  Program:   gdcm
+  Module:    $RCSfile: PrintDicomDir.cxx,v $
+  Language:  C++
+  Date:      $Date: 2004/12/07 09:08:45 $
+  Version:   $Revision: 1.8 $
+                                                                                
+  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 "gdcmDocument.h"
 #include "gdcmDicomDir.h"
 #include "gdcmValEntry.h"
+#include "gdcmDicomDirPatient.h"
+#include "gdcmDicomDirStudy.h"
+#include "gdcmDicomDirSerie.h"
+#include "gdcmDicomDirImage.h"
+#include "gdcmTS.h"
 
 #include <fstream>
-
-using namespace std;
+#include <iostream>
 
 int main(int argc, char* argv[])
 {  
-   gdcmDicomDir *e1;
+   gdcm::DicomDir *e1;
    
-   ListDicomDirPatient::iterator  itPatient;
-   ListDicomDirStudy::iterator    itStudy;
-   ListDicomDirSerie::iterator    itSerie;
-   ListDicomDirImage::iterator    itImage;
-   TSKey v;
+   gdcm::ListDicomDirPatient::const_iterator  itPatient;
+   gdcm::ListDicomDirStudy::const_iterator    itStudy;
+   gdcm::ListDicomDirSerie::const_iterator    itSerie;
+   //gdcm::ListDicomDirImage::const_iterator    itImage;
+   gdcm::TSKey v;
     
    std::string file; 
    if (argc > 1) 
@@ -26,7 +45,7 @@ int main(int argc, char* argv[])
       file += "/DICOMDIR";
    }
 
-   e1 = new gdcmDicomDir( file );
+   e1 = new gdcm::DicomDir( file );
 
    if (argc > 2) {
       int level = atoi(argv[2]);   
@@ -73,7 +92,7 @@ int main(int argc, char* argv[])
 */
 
  
-   cout << std::endl << std::endl  
+   std::cout << std::endl << std::endl  
         << " =  PATIENT/STUDY/SERIE List ==================================" 
         << std::endl<< std::endl;