X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FTestWrite.cxx;h=a5c0267f2affb74513fb53caec290aa4ac0b39ac;hb=4e91acd4c7ffc1eb58f3762419398d8e1d214956;hp=8fce916bd8c3f2f342a1f84a062fb49a58ea538f;hpb=aaeee7164728ec0749a525f0c74274865712ec37;p=gdcm.git diff --git a/Example/TestWrite.cxx b/Example/TestWrite.cxx index 8fce916b..a5c0267f 100644 --- a/Example/TestWrite.cxx +++ b/Example/TestWrite.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestWrite.cxx,v $ Language: C++ - Date: $Date: 2005/01/24 16:10:49 $ - Version: $Revision: 1.17 $ + Date: $Date: 2005/03/02 17:22:11 $ + 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 @@ -22,12 +22,12 @@ int main(int argc, char *argv[]) { - std::string zozo; + std::string fileNameToWrite; gdcm::File *e1; gdcm::FileHelper *f1; - void* imageData; + void *imageData; int dataSize; if (argc < 3) { @@ -62,10 +62,10 @@ int main(int argc, char *argv[]) << "--------------------- file :" << argv[1] << std::endl; - std::string toto = argv[1]; + std::string fileName = argv[1]; std::string mode = argv[2]; - e1 = new gdcm::File( toto.c_str() ); + e1 = new gdcm::File( fileName.c_str() ); if (!e1->IsReadable()) { std::cerr << "Sorry, not a Readable DICOM / ACR File" <WriteAcr(zozo); + f1->WriteAcr(fileNameToWrite); break; case 'd' : // Not document in the 'usage', because the method is knowed to be bugged. @@ -130,27 +130,27 @@ int main(int argc, char *argv[]) // ecriture d'un fichier DICOM Implicit VR // à partir d'un dcmFile correct. - zozo = toto + ".DCM"; + fileNameToWrite = fileName + ".DCM"; std::cout << "WriteDCM Implicit VR" << std::endl; - f1->WriteDcmImplVR(zozo); + f1->WriteDcmImplVR(fileNameToWrite); break; case 'x' : // ecriture d'un fichier DICOM Explicit VR // à partir d'un dcmFile correct. - zozo = toto + ".XDCM"; + fileNameToWrite = fileName + ".XDCM"; std::cout << "WriteDCM Explicit VR" << std::endl; - f1->WriteDcmExplVR(zozo); + f1->WriteDcmExplVR(fileNameToWrite); break; case 'r' : // Ecriture d'un Raw File, a afficher avec // affim filein= dimx= dimy= nbit= signe= - zozo = toto + ".RAW"; + fileNameToWrite = fileName + ".RAW"; std::cout << "WriteRaw" << std::endl; - f1->WriteRawData(zozo); + f1->WriteRawData(fileNameToWrite); break; case 'v' : @@ -160,7 +160,7 @@ int main(int argc, char *argv[]) std::cout << "videoinv for 8 bits" << std::endl; for (int i=0; iWriteDcmExplVR(zozo); + f1->WriteDcmExplVR(fileNameToWrite); break; } - return 0; + delete e1; + delete f1; + return 0; }