]> Creatis software - gdcm.git/blobdiff - Example/Anonymize.cxx
avoid warnings
[gdcm.git] / Example / Anonymize.cxx
index 0c9190a88f264a0b8945a82a33c2154943ab7f93..8a2cf32c1da585219500d2a7653bd1533386dcfe 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: Anonymize.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/02/02 11:26:02 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2006/03/17 14:36:37 $
+  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
 
 #include <iostream>
 
+
+/// \todo : AnonymizeDirectory
+///         That should split the images : Patient/Study/Serie
+///         and keeps coherent the StudyInstanceUID, SeriesInstanceUID
+///         (Now, a new one is generated fore each image :-( )
 int main(int argc, char *argv[])
 {
    START_USAGE(usage)
    " \n Anonymize :\n                                                         ",
    " Anonymize a full gdcm-readable Dicom image                               ",
    "          Warning : probably segfaults if pixels are not gdcm readable.   ",
-   "                    Use AnonymizeNoLoad instead.                        ",
+   "                    Use AnonymizeNoLoad instead.                          ",
    " usage: Anonymize filein=inputFileName fileout=anonymizedFileName[debug]  ",
    "        debug    : user wants to run the program in 'debug mode'          ",
    FINISH_USAGE
@@ -138,8 +143,10 @@ int main(int argc, char *argv[])
    
    // Since we just Anonymized the file, we know no modification 
    // was performed on the pixels.
-   // We don't want this image appears as a 'Secondary Captured image'
-   fh->SetKeepMediaStorageSOPClassUID(true);
+   // The written image will not appear as a 'Secondary Captured image'
+   // nor as a DERIVED one  
+
+   fh->SetContentType(gdcm::UNMODIFIED_PIXELS_IMAGE);
    
    fh->WriteDcmExplVR(outputFileName);
    std::cout <<"End Anonymize" << std::cout;