X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FReWrite.cxx;h=43241c1f2a76dd8e16b14131f7c4eabd9fd2a1f7;hb=b8ce88766307f0197209797c4a1fc49a1045ad3a;hp=7dfb4a0e1f5f2b6a6201ed66947d0490fe7d012b;hpb=6dc9a6a8aee263acf3dd2ce1d7f32c51b9133cc0;p=gdcm.git diff --git a/Example/ReWrite.cxx b/Example/ReWrite.cxx index 7dfb4a0e..43241c1f 100644 --- a/Example/ReWrite.cxx +++ b/Example/ReWrite.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: ReWrite.cxx,v $ Language: C++ - Date: $Date: 2005/06/14 09:04:59 $ - Version: $Revision: 1.5 $ + Date: $Date: 2005/06/17 12:37:20 $ + Version: $Revision: 1.7 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -98,7 +98,6 @@ int main(int argc, char *argv[]) if ( !res ) { delete e1; - delete am; return 0; } @@ -106,12 +105,11 @@ int main(int argc, char *argv[]) { std::cerr << "Sorry, not a Readable DICOM / ACR File" <GetImageDataRawSize(); - imageData = f1->GetImageDataRaw(); + imageData = f1->GetImageDataRaw();// somewhat important... can't remember f1->SetWriteModeToRaw(); } + if ( imageData == 0 ) // to avoid warning + { + std::cout << "Was unable to read pixels " << std::endl; + } std::cout <