X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FWriteDicomSimple.cxx;h=455b9063f9c0761406facdbd77f4b92baa538ca1;hb=0f14224ae88b397db01e3de8edca0ab671f4ffa4;hp=03ae9b3c65866c0413a32333e998c33c3560da5b;hpb=3e82e8b67eddf5d4b95b6aa2a2e2615aced4c452;p=gdcm.git diff --git a/Example/WriteDicomSimple.cxx b/Example/WriteDicomSimple.cxx index 03ae9b3c..455b9063 100644 --- a/Example/WriteDicomSimple.cxx +++ b/Example/WriteDicomSimple.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: WriteDicomSimple.cxx,v $ Language: C++ - Date: $Date: 2005/02/02 10:06:32 $ - Version: $Revision: 1.11 $ + Date: $Date: 2005/10/18 08:35:43 $ + Version: $Revision: 1.14 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ */ #include "gdcmFile.h" #include "gdcmFileHelper.h" - + #include #include @@ -63,39 +63,39 @@ int main(int argc, char *argv[]) // Set the image size str.str(""); str << SIZE_X; - header->InsertValEntry(str.str(),0x0028,0x0011); // Columns + header->InsertEntryString(str.str(),0x0028,0x0011); // Columns str.str(""); str << SIZE_Y; - header->InsertValEntry(str.str(),0x0028,0x0010); // Rows + header->InsertEntryString(str.str(),0x0028,0x0010); // Rows // Set the pixel type str.str(""); str << COMPONENT_SIZE * 8; - header->InsertValEntry(str.str(),0x0028,0x0100); // Bits Allocated - header->InsertValEntry(str.str(),0x0028,0x0101); // Bits Stored + header->InsertEntryString(str.str(),0x0028,0x0100); // Bits Allocated + header->InsertEntryString(str.str(),0x0028,0x0101); // Bits Stored str.str(""); - str << COMPONENT_SIZE * 8 - 1; - header->InsertValEntry(str.str(),0x0028,0x0102); // High Bit + str << ( COMPONENT_SIZE * 8 ) - 1; + header->InsertEntryString(str.str(),0x0028,0x0102); // High Bit // Set the pixel representation str.str(""); str << "0"; // Unsigned - header->InsertValEntry(str.str(),0x0028,0x0103); // Pixel Representation + header->InsertEntryString(str.str(),0x0028,0x0103); // Pixel Representation // Set the samples per pixel str.str(""); str << COMPONENT; - header->InsertValEntry(str.str(),0x0028,0x0002); // Samples per Pixel + header->InsertEntryString(str.str(),0x0028,0x0002); // Samples per Pixel // Set the Window / Level str.str(""); str << COLOR_WINDOW; - header->InsertValEntry(str.str(),0x0028,0x1051); // Window Width + header->InsertEntryString(str.str(),0x0028,0x1051); // Window Width str.str(""); str << COLOR_LEVEL; - header->InsertValEntry(str.str(),0x0028,0x1050); // Window Center + header->InsertEntryString(str.str(),0x0028,0x1050); // Window Center if( !header->IsReadable() ) { @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) { for(int c=0;c