X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FWriteRead.cxx;h=7e75baaeee21c00110375660d4e32b81a310145d;hb=1d6b53d6cc3487013b10aa9b604ae948585dbfb7;hp=54f9140a21da5c07ef7b2c0d9812cf242e4ad9fc;hpb=1d69b92978803204089d270599133917d944c651;p=gdcm.git diff --git a/Example/WriteRead.cxx b/Example/WriteRead.cxx index 54f9140a..7e75baae 100644 --- a/Example/WriteRead.cxx +++ b/Example/WriteRead.cxx @@ -1,16 +1,33 @@ +/*========================================================================= + + Program: gdcm + Module: $RCSfile: WriteRead.cxx,v $ + Language: C++ + Date: $Date: 2004/12/03 20:16:56 $ + Version: $Revision: 1.9 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "gdcmHeader.h" +#include "gdcmFile.h" + #include -#include -#include "gdcm.h" int main(int argc, char* argv[]) { - std::string toto; - char zozo[200]; + std::string zozo; gdcm::Header* e1, *e2; gdcm::File * f1, *f2; - void* imageData, *imageData2; + uint8_t* imageData, *imageData2; int dataSize, dataSize2; if( argc < 2 ) @@ -19,7 +36,7 @@ int main(int argc, char* argv[]) return 1; } - toto = argv[1]; + std::string toto = argv[1]; // --------------------- we read the input image @@ -38,7 +55,7 @@ int main(int argc, char* argv[]) // --------------------- we write it as an Explicit VR DICOM file - sprintf(zozo, "temp.XDCM" ); + zozo = "temp.XDCM"; std::cout << "WriteDCM Explicit VR" << std::endl; f1->WriteDcmExplVR(zozo);