X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FPrintFile.cxx;h=8e42f004dfa91d426524ca02ee106f65ef54e751;hb=7fba5f430c8147f53cfdf667981fc9f380cf64ba;hp=3cd654f92d9b87e9a559a6f5ea57fd2c0fb105a8;hpb=4fbe563dc18455266f880586fa2aca2cfb1012bc;p=gdcm.git diff --git a/Example/PrintFile.cxx b/Example/PrintFile.cxx index 3cd654f9..8e42f004 100644 --- a/Example/PrintFile.cxx +++ b/Example/PrintFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintFile.cxx,v $ Language: C++ - Date: $Date: 2005/11/18 11:45:34 $ - Version: $Revision: 1.72 $ + Date: $Date: 2005/11/28 11:54:45 $ + Version: $Revision: 1.75 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -49,7 +49,6 @@ void ShowLutData(gdcm::File *f) std::string lutDescriptor = sqi->GetEntryString(0x0028,0x3002); if ( /*lutDescriptor == GDCM_UNFOUND*/ 0 ) { - //gdcmWarningMacro( "LUT Descriptor is missing" ); std::cout << "LUT Descriptor is missing" << std::endl; return; } @@ -68,8 +67,7 @@ void ShowLutData(gdcm::File *f) << std::endl; if ( nbRead != 3 ) { - //gdcmWarningMacro( "Wrong LUT descriptor" ); - std::cout << "Wrong LUT descriptor" << std::endl; + std::cout << "Wrong LUT descriptor" << std::endl; } //LUT Data (CTX dependent) gdcm::DataEntry *b = sqi->GetDataEntry(0x0028,0x3006); @@ -229,6 +227,12 @@ int main(int argc, char *argv[]) f->AddForceLoadElement((uint32_t)elemsToForceLoad[2*ri], (uint32_t)elemsToForceLoad[2*ri+1] ); } +// TODO : find why such a polution +// To avoid polluting the output with messages +// 'Last system error was : No such file or directory' + +errno = 0; + bool res = f->Load(); // gdcm::File::IsReadable() is no usable here, because we deal with @@ -399,7 +403,6 @@ int main(int argc, char *argv[]) &length, &deb, &nbits ); if ( nbRead != 3 ) { - //gdcmWarningMacro( "Wrong LUT descriptor" ); std::cout << "Wrong LUT descriptor" << std::endl; } gdcm::DataEntry *b = sqi->GetDataEntry(0x0028,0x3006); @@ -469,7 +472,7 @@ int main(int argc, char *argv[]) std::cout<Delete(); - delete fh; + fh->Delete(); } else // ====== Deal with a Directory ====== {