]> Creatis software - gdcm.git/blobdiff - Example/FindTags.cxx
Fix mistypings
[gdcm.git] / Example / FindTags.cxx
index a1b9e4f7c5f213f5dd2d725d79131a5ae7ae71c3..e808d85b7d5d983eeaf979e78329638f5d230080 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: FindTags.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/18 08:35:43 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2007/05/23 14:18:04 $
+  Version:   $Revision: 1.17 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -26,8 +26,8 @@ int main(int argc, char *argv[])
 {
    std::string fileName;
 
-   gdcm::FileHelper *h;
-   gdcm::File *f = new gdcm::File();
+   GDCM_NAME_SPACE::FileHelper *h;
+   GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New();
    
    
    if(argc > 1 ) 
@@ -42,7 +42,7 @@ int main(int argc, char *argv[])
    f->Load();
    // Should test if it worked !
    
-   h = new gdcm::FileHelper(f);
+   h = GDCM_NAME_SPACE::FileHelper::New(f);
    
    std::string ManufacturerName="SIEMENS ";
    std::string RecCode="ACR-NEMA 2.0";
@@ -76,8 +76,8 @@ int main(int argc, char *argv[])
 // existerait-il qq chose qui marche à tout coup?
 
 // Location
-   std::string zizi = gdcm::Util::Format("%f",l);
-   Location = gdcm::Util::DicomString(zizi.c_str());
+   std::string zizi = GDCM_NAME_SPACE::Util::Format("%f",l);
+   Location = GDCM_NAME_SPACE::Util::DicomString(zizi.c_str());
    h->SetEntryString(Location, 0x0020,0x0050);
 
 // sinon, la longueur du champ est erronée (?!?) 
@@ -91,8 +91,8 @@ int main(int argc, char *argv[])
 
 // Image Location 
 
-   zizi = gdcm::Util::Format("%d",0x7FE0);
-   ImageLocation = gdcm::Util::DicomString(zizi.c_str());
+   zizi = GDCM_NAME_SPACE::Util::Format("%d",0x7FE0);
+   ImageLocation = GDCM_NAME_SPACE::Util::DicomString(zizi.c_str());
 //h->SetEntryString(Location, 0x0028,0x0200);
 //h->GetFile()->SetEntryLength(strlen(ImageLocation.c_str())-1, 0x0020,0x0050); // prudence !
 
@@ -113,6 +113,9 @@ int main(int argc, char *argv[])
 
    std::cout << "----------------apres Write---------------------" << std::endl;
 
+   h->Delete();
+   f->Delete();
+
    return 0;
 }