X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=Example%2FTestWriteSimple.cxx;h=12d111d066f2efd5d9f95fed5146fe4a9f1d6a0d;hb=93748f382dadb5c9240c4156ce7bbe9dcc8da44f;hp=f474e3cbe2c8d0e61b9683b80e5e4f3e772da6d5;hpb=978f699b97794e209f9d20e2a33a72404bda54ef;p=gdcm.git diff --git a/Example/TestWriteSimple.cxx b/Example/TestWriteSimple.cxx index f474e3cb..12d111d0 100644 --- a/Example/TestWriteSimple.cxx +++ b/Example/TestWriteSimple.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestWriteSimple.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 04:26:18 $ - Version: $Revision: 1.5 $ + Date: $Date: 2005/01/20 16:31:42 $ + Version: $Revision: 1.8 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -15,7 +15,8 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ -#include "gdcm.h" +#include "gdcmHeader.h" +#include "gdcmFileHelper.h" int main(int argc, char* argv[]) { @@ -30,8 +31,8 @@ int main(int argc, char* argv[]) std::string header = argv[1]; const char *output = argv[2]; - gdcm::Header *f1 = new gdcm::Header( header ); - gdcm::File *f2 = new gdcm::File( f1 ); + gdcm::Header *f1 = new gdcm::Header( header ); + gdcm::FileHelper *f2 = new gdcm::FileHelper( f1 ); // If the following call is important, then the API sucks. Why is it // required to allocate PixelData when we are not using it !? @@ -41,9 +42,9 @@ int main(int argc, char* argv[]) int dataSize = f2->GetImageDataSize(); // unsigned char cast is necessary to be able to delete the buffer // since deleting a void* is not allowed in c++ - uint8_t* imageData = (uint8_t*)f2->GetImageData(); + uint8_t *imageData = (uint8_t *)f2->GetImageData(); - f2->SetImageData( imageData, dataSize); + f2->SetImageData( imageData, dataSize ); f2->WriteDcmExplVR( output );