X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FTestWriteSimple.cxx;h=957ec144c28042041835d422e650e62e371b9738;hb=90c918a795e4a1892af2cd120eb20d6311499387;hp=7c76e13eac3b1172ca8c4dcbfbc7ff624d6fb87b;hpb=6df14b12a643a8cc3061192b22e549eed18cca73;p=gdcm.git diff --git a/Example/TestWriteSimple.cxx b/Example/TestWriteSimple.cxx index 7c76e13e..957ec144 100644 --- a/Example/TestWriteSimple.cxx +++ b/Example/TestWriteSimple.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestWriteSimple.cxx,v $ Language: C++ - Date: $Date: 2005/01/22 12:39:11 $ - Version: $Revision: 1.10 $ + Date: $Date: 2005/07/08 12:02:02 $ + Version: $Revision: 1.12 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -18,7 +18,7 @@ #include "gdcmFile.h" #include "gdcmFileHelper.h" -int main(int argc, char* argv[]) +int main(int argc, char *argv[]) { if (argc < 3) { @@ -30,8 +30,11 @@ int main(int argc, char* argv[]) std::string header = argv[1]; const char *output = argv[2]; - gdcm::File *f1 = new gdcm::File( header ); - gdcm::FileHelper *f2 = new gdcm::FileHelper( f1 ); + gdcm::File *f1 = new gdcm::File( ); + f1->SetFileName ( header ); + f1->Load( ); + + 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 !?