]> Creatis software - gdcm.git/blobdiff - Example/ReWrite.cxx
Fix some comments
[gdcm.git] / Example / ReWrite.cxx
index e049bec852269f2c8b1a77c259640f2b370c28da..6d500d98c44846050b3d9255c1d3229707bb3c97 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: ReWrite.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/25 14:52:27 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2006/03/17 14:36:37 $
+  Version:   $Revision: 1.19 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
    " Re write a full gdcm-readable Dicom image                              ",
    "     (usefull when the file header is not very straight).               ",
    "                                                                        ",
-   " usage: ReWrite filein=inputFileName fileout=anonymizedFileName         ", 
+   " usage: ReWrite filein=inputFileName fileout=outputFileName             ", 
    "       [mode=write mode] [noshadow] [noseq][debug]                      ", 
    "                                                                        ",
    "        mode = a (ACR), x (Explicit VR Dicom), r (RAW : only pixels)    ",
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
       return 0;
    }
 
-   char *mode = am->ArgMgrGetString("mode",(char *)"X");
+   const char *mode = am->ArgMgrGetString("mode","X");
 
    int loadMode = gdcm::LD_ALL;
    if ( am->ArgMgrDefined("noshadowseq") )
@@ -160,6 +160,11 @@ int main(int argc, char *argv[])
    std::cout << " TransferSyntaxName= [" << transferSyntaxName << "]" 
              << std::endl;
 
+   // Since we just ReWrite the image, we know no modification 
+   // was performed on the pixels.
+   // We don't want this image appears as a 'Secondary Captured image'
+   fh->SetContentType(gdcm::UNMODIFIED_PIXELS_IMAGE);
+
    switch (mode[0])
    {
       case 'A' :