]> Creatis software - gdcm.git/blobdiff - Example/PrintDocument.cxx
I tried to make a Test for gdcm::Exception
[gdcm.git] / Example / PrintDocument.cxx
index 940b816621e3da2990514845d6e8cb0e6f4b009e..c2a6ceec709e6e60d26d5e5a91e50b081c9b2e7f 100644 (file)
@@ -1,31 +1,35 @@
-#include <iostream>
-
-#include "gdcmException.h"
-#include "gdcmCommon.h"
+/*=========================================================================
+                                                                                
+  Program:   gdcm
+  Module:    $RCSfile: PrintDocument.cxx,v $
+  Language:  C++
+  Date:      $Date: 2005/02/02 10:06:31 $
+  Version:   $Revision: 1.11 $
+                                                                                
+  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 "gdcmFile.h"
 
-#include "gdcmDictEntry.h"
-#include "gdcmDict.h"
-#include "gdcmDictSet.h"
-#include "gdcmHeader.h"
-#include "gdcmUtil.h"
-#include "gdcmBinEntry.h"  
-#include "gdcmDocEntry.h" 
-#include "gdcmDocEntrySet.h"           
-#include "gdcmDocument.h"          
-#include "gdcmElementSet.h"        
-#include "gdcmSeqEntry.h" 
-#include "gdcmSQItem.h" 
-#include "gdcmValEntry.h" 
+#include <iostream>
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {
  
-   gdcmHeader *e1;
+   gdcm::File *e1;
    std::string fileName;   
 
    if (argc != 2) {
-      std::cout << " Usage : " << argv[0] 
-                << " filename." << std::endl;
+      std::cout << " Usage : "
+                << argv[0] 
+                << " filename."
+                << std::endl;
    }
 
    if (argc > 1) {
@@ -35,8 +39,7 @@ int main(int argc, char* argv[])
       fileName += "/test.acr";
    }
    
-   e1= new gdcmHeader 
-      (fileName.c_str(),false, true);
+   e1= new gdcm::File( fileName.c_str() );
 
    e1->SetPrintLevel(2);