]> Creatis software - gdcm.git/commitdiff
use new SetContentType method.
authorjpr <jpr>
Wed, 1 Mar 2006 09:51:56 +0000 (09:51 +0000)
committerjpr <jpr>
Wed, 1 Mar 2006 09:51:56 +0000 (09:51 +0000)
Example/Anonymize.cxx
Example/BatchUncompress.cxx
Example/PatchHeader.cxx
Example/PhilipsToBrucker2.cxx
Example/ReWrite.cxx

index 0c9190a88f264a0b8945a82a33c2154943ab7f93..1229c1076f88a732c6c47c52654c43c87fb281b0 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/01 09:51:56 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -138,8 +138,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;
index 66fab7fe5a6b6c9dfe143f2c0732f93c988af915..b14a5aeecb66928f069a6fc4d385be4b01f06e11 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: BatchUncompress.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/01/18 10:21:37 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2006/03/01 09:51:56 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -55,6 +55,9 @@ int main(int argc, char *argv[])
     uint8_t *imageData = output->GetImageData();
 
     output->SetImageData( imageData, dataSize);
+    // lossy compression would be a pixel modification.
+    // uncompress is *not* 
+    fh->SetContentType(gdcm::UNMODIFIED_PIXELS_IMAGE);    
     output->WriteDcmExplVR( outputfilename );
 
     delete output;
index f93cc5d348cce84839671b6fe18ca79a69b78089..adc06698e0a5a82fed885c5db9196a00a732f342 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PatchHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/01/26 15:52:42 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2006/03/01 09:51:56 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -312,7 +312,7 @@ int main(int argc, char *argv[])
 
       // 
       //      No need to load the pixels in memory.      
-   //      File will be overwritten
+      //      File will be overwritten
       // 
 
       // open the file
index 8a46e53625a90dab7313e47501a239f8154e3729..6cff480f7f71a0d1b77583bd2507db132d70f41f 100755 (executable)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PhilipsToBrucker2.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/02/03 18:00:53 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2006/03/01 09:51:56 $
+  Version:   $Revision: 1.18 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -50,9 +50,9 @@ int main(int argc, char *argv[])
    " - orders the gdcm-readable found Files according to their                ",
    "           (0x0010, 0x0010) Patient's Name                                ",
    "           (0x0020, 0x000e) Series Instance UID                           ",
-   "           (0x0020, 0x0032) Image Position (Patient)                      ",
+   "           (0x0020, 0x0032)PhilipsToBrucker2. Image Position (Patient)                      ",
    "           (0x0018, 0x1060) Trigger Time                                  ",
-   "           (0x0018, 0x1312) In-plane Phase Encoding Direction             ",
+   "           (0x0018, 0x1312) In-pl)ane Phase Encoding Direction             ",
    " - fills a single level (*) Directory with *all* the files,               ",
    "           converted into a Brucker-like Dicom, InTags compliant          ",
    "   (*) actually : creates as many directories as Patients                 ",
@@ -117,7 +117,7 @@ int main(int argc, char *argv[])
    dirNamein  = am->ArgMgrGetString("dirin","."); 
 
    const char *dirNameout;   
-   dirNameout  = am->ArgMgrGetString("dirout",".");  
+   dirNameout  = am->ArgMgrGetString(")dirout",".");  
    
    int loadMode = gdcm::LD_ALL;
    if ( am->ArgMgrDefined("noshadowseq") )
@@ -237,7 +237,7 @@ int main(int argc, char *argv[])
              << std::endl;     
    std::string uniqueSeriesIdentifier;
  
-   for (gdcm::DirListType::iterator it = fileNames.begin();  
+   for (gdcm::DirListType::iterator it) = fileNames.begin();  
                                     it != fileNames.end();
                                   ++it)
    {
@@ -341,7 +341,7 @@ int main(int argc, char *argv[])
             tokens[3] = newName;
             tokensForFileName.clear();    
          }
-         else 
+         else
             tokens[3] = name;
  
  
@@ -596,7 +596,7 @@ int main(int argc, char *argv[])
       // 'SOP Class UID'               (0x0008,0x0016)
       // 'Image Type'                  (0x0008,0x0008)
       // 'Conversion Type'             (0x0008,0x0064)
-      fh->SetKeepMediaStorageSOPClassUID(true);
+      fh->SetContentType(gdcm::UNMODIFIED_PIXELS_IMAGE);
       if (!fh->Write(fullWriteFilename))
       {
          std::cout << "Fail to write :[" << fullWriteFilename << "]"
index 1cabef1b08662ea4395dac370a2a6ad77a2d505f..188b0b34825ff7293d957fa58fb30c354fd39732 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: ReWrite.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/01/26 15:52:43 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2006/03/01 09:51:56 $
+  Version:   $Revision: 1.18 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -163,7 +163,7 @@ int main(int argc, char *argv[])
    // 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->SetKeepMediaStorageSOPClassUID(true);
+   fh->SetContentType(gdcm::UNMODIFIED_PIXELS_IMAGE);
 
    switch (mode[0])
    {