X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FAnonymize.cxx;h=7e33bfa6fc58ef5fb93ad7d41620f00e58d0c3f9;hb=df5a10107db5596ce0ce2089dc48d781956bdbfe;hp=69a7d8a14f9af2943a7c2179f0306b185847f458;hpb=ac2e8ecc8319069451f1fe5a4413915d56f9cbdc;p=gdcm.git diff --git a/Example/Anonymize.cxx b/Example/Anonymize.cxx index 69a7d8a1..7e33bfa6 100644 --- a/Example/Anonymize.cxx +++ b/Example/Anonymize.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: Anonymize.cxx,v $ Language: C++ - Date: $Date: 2005/07/21 04:55:50 $ - Version: $Revision: 1.3 $ + Date: $Date: 2005/10/25 14:52:26 $ + Version: $Revision: 1.6 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -76,8 +76,8 @@ int main(int argc, char *argv[]) gdcm::File *f; - f = new gdcm::File( ); - f->SetLoadMode( 0x00000000 ); + f = gdcm::File::New( ); + f->SetLoadMode( gdcm::LD_ALL ); f->SetFileName( fileName ); int res = f->Load(); @@ -85,7 +85,7 @@ int main(int argc, char *argv[]) { std::cerr << "Sorry, " << fileName <<" not a gdcm-readable " << "DICOM / ACR File" <Delete(); return 0; } std::cout << " ... is readable " << std::endl; @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) // ============================================================ // We need a gdcm::FileHelper, since we want to load the pixels - gdcm::FileHelper *fh = new gdcm::FileHelper(f); + gdcm::FileHelper *fh = gdcm::FileHelper::New(f); // (unit8_t DOESN'T mean it's mandatory for the image to be a 8 bits one) @@ -106,8 +106,8 @@ int main(int argc, char *argv[]) std::cerr << "Sorry, Pixels of" << fileName <<" are not " << " gdcm-readable." << std::endl << "Use exAnonymizeNoLoad" << std::endl; - delete f; - delete fh; + f->Delete(); + fh->Delete(); return 0; } @@ -143,8 +143,8 @@ int main(int argc, char *argv[]) // ============================================================ f->ClearAnonymizeList(); - delete f; - delete fh; + f->Delete(); + fh->Delete(); return 0; }