1 /*=========================================================================
4 Module: $RCSfile: TestDcm2Acr.cxx,v $
6 Date: $Date: 2005/02/02 10:06:31 $
7 Version: $Revision: 1.9 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
18 #include "gdcmFileHelper.h"
23 int main(int argc, char *argv[])
26 std::string fileNameToWrite;
30 std::cout << " Before gdcmFileHelper()" << std::endl;
31 std::cout << "\n\n---------------------------------------" << std::endl;
36 f1 = new gdcm::FileHelper(fileName);
40 std::string filename = GDCM_DATA_ROOT;
41 filename += "/test.acr";
42 f1 = new gdcm::FileHelper(filename);
44 std::cout << " After gdcmFileHelper()" << std::endl;
46 f1->GetFile()->Print();
48 int dataSize = f1->GetImageDataSize();
49 std::cout << "dataSize:" << dataSize << std::endl;
51 // void *imageData= f1->GetFile()->GetImageData();
53 // Ecriture d'un Raw File, a afficher avec affim filein= dim= nbit= signe=
54 //f1->WriteRawData("image.raw");
56 // ecriture d'un fichier DICOM à partir d'un dcmFile correct.
58 //f1->WriteDcmImplVR("image.dcm");
60 // ecriture d'un fichier ACR à partir d'un dcmFile correct.
62 fileNameToWrite = fileName + ".nema";
63 f1->WriteAcr(fileNameToWrite);
64 std::cout << "\n\n---------------------------------------\n\n" << std::endl;
66 f1->GetFile()->Print();