]> Creatis software - gdcm.git/blobdiff - Example/WriteDicomSimple.cxx
Fix mistypings
[gdcm.git] / Example / WriteDicomSimple.cxx
index 846d0b75df249453572fd21cfb5a71d391a746c3..80856449be282ebc5f2bcbc9bae93b92f80fd302 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteDicomSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/11/07 10:33:47 $
-  Version:   $Revision: 1.18 $
+  Date:      $Date: 2007/06/26 15:42:14 $
+  Version:   $Revision: 1.20 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
    FINISH_USAGE
 
    // Initialize Arguments Manager   
-   gdcm::ArgMgr *am= new gdcm::ArgMgr(argc, argv);
+   GDCM_NAME_SPACE::ArgMgr *am= new GDCM_NAME_SPACE::ArgMgr(argc, argv);
   
    if (argc == 1 || am->ArgMgrDefined("usage") )
    {
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
    }
 
    if (am->ArgMgrDefined("debug"))
-      gdcm::Debug::DebugOn();
+      GDCM_NAME_SPACE::Debug::DebugOn();
       
    std::string fileOut = am->ArgMgrGetString("fileout",(char *)"WriteDicomSimple.dcm");   
    SIZE_X = am->ArgMgrGetInt("NX", 128);
@@ -83,44 +83,44 @@ int main(int argc, char *argv[])
    // ----------- End Arguments Manager ---------
    
    
-// Step 1 : Create an empty gdcm::FileHelper for the image
+// Step 1 : Create an empty GDCM_NAME_SPACE::FileHelper for the image
 //          (it deals with the acces to the pixels)
-   gdcm::FileHelper *fileH = gdcm::FileHelper::New();
+   GDCM_NAME_SPACE::FileHelper *fileH = GDCM_NAME_SPACE::FileHelper::New();
    
-//         Get the empty gdcm::File of the image 
+//         Get the empty GDCM_NAME_SPACE::File of the image 
 //         (it deals with the 'entries' od the image header)  
-   gdcm::File *header = fileH->GetFile();
+   GDCM_NAME_SPACE::File *header = fileH->GetFile();
     
    std::ostringstream str;
 
    // Set the image size
    str.str("");
    str << SIZE_X;
-   header->InsertEntryString(str.str(),0x0028,0x0011); // Columns
+   header->InsertEntryString(str.str(),0x0028,0x0011,"US"); // Columns
 
    str.str("");
    str << SIZE_Y;
-   header->InsertEntryString(str.str(),0x0028,0x0010); // Rows
+   header->InsertEntryString(str.str(),0x0028,0x0010,"US"); // Rows
 
    // Set the pixel type
    str.str("");
    str << COMPONENT_SIZE * 8;
-   header->InsertEntryString(str.str(),0x0028,0x0100); // Bits Allocated
-   header->InsertEntryString(str.str(),0x0028,0x0101); // Bits Stored
+   header->InsertEntryString(str.str(),0x0028,0x0100,"US"); // Bits Allocated
+   header->InsertEntryString(str.str(),0x0028,0x0101,"US"); // Bits Stored
 
    str.str("");
    str << ( COMPONENT_SIZE * 8 ) - 1;
-   header->InsertEntryString(str.str(),0x0028,0x0102); // High Bit
+   header->InsertEntryString(str.str(),0x0028,0x0102,"US"); // High Bit
 
    // Set the pixel representation
    str.str("");
    str << "0"; // Unsigned
-   header->InsertEntryString(str.str(),0x0028,0x0103); // Pixel Representation
+   header->InsertEntryString(str.str(),0x0028,0x0103,"US"); // Pixel Representation
 
    // Set the samples per pixel
    str.str("");
    str << COMPONENT;
-   header->InsertEntryString(str.str(),0x0028,0x0002); // Samples per Pixel
+   header->InsertEntryString(str.str(),0x0028,0x0002,"US"); // Samples per Pixel
 
 
 // Step 2 : Create the output image