X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src%2FgdcmValEntry.cxx;h=8b14f72f1e7d34f4e0f1ae0eada41234b434a826;hb=3c51b39e18ba55faf14c5bbac129662e824d3adb;hp=2ab55cbfaf39685372e476628e464dde7c47ed3d;hpb=49c0af19f5bf0f2402d37d8abf7fb139e7453245;p=gdcm.git diff --git a/src/gdcmValEntry.cxx b/src/gdcmValEntry.cxx index 2ab55cbf..8b14f72f 100644 --- a/src/gdcmValEntry.cxx +++ b/src/gdcmValEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmValEntry.cxx,v $ Language: C++ - Date: $Date: 2004/08/01 00:59:22 $ - Version: $Revision: 1.19 $ + Date: $Date: 2004/08/27 15:48:44 $ + Version: $Revision: 1.22 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -32,7 +32,7 @@ */ gdcmValEntry::gdcmValEntry(gdcmDictEntry* e) : gdcmDocEntry(e) { - voidArea = NULL; // will be in BinEntry ? + VoidArea = NULL; // will be in BinEntry ? } /** @@ -45,10 +45,10 @@ gdcmValEntry::gdcmValEntry(gdcmDocEntry* e) : gdcmDocEntry(e->GetDictEntry()) ReadLength = e->GetReadLength(); ImplicitVR = e->IsImplicitVR(); Offset = e->GetOffset(); - printLevel = e->GetPrintLevel(); + PrintLevel = e->GetPrintLevel(); SQDepthLevel = e->GetDepthLevel(); - voidArea = NULL; // will be in BinEntry ? + VoidArea = NULL; // will be in BinEntry ? } @@ -57,10 +57,10 @@ gdcmValEntry::gdcmValEntry(gdcmDocEntry* e) : gdcmDocEntry(e->GetDictEntry()) */ gdcmValEntry::~gdcmValEntry () { - if (!voidArea) // will be in BinEntry + if (!VoidArea) // will be in BinEntry { - free(voidArea); - voidArea = NULL; // let's be carefull ! + free(VoidArea); + VoidArea = NULL; // let's be carefull ! } } @@ -92,7 +92,7 @@ void gdcmValEntry::Print(std::ostream & os) v = GetValue(); // not applicable for SQ ... d2 = CreateCleanString(v); // replace non printable characters by '.' if( (GetLength()<=MAX_SIZE_PRINT_ELEMENT_VALUE) || - (printLevel>=3) || (d2.find("gdcm::NotLoaded.") < d2.length()) ) + (PrintLevel>=3) || (d2.find("gdcm::NotLoaded.") < d2.length()) ) { s << " [" << d2 << "]"; } @@ -181,6 +181,12 @@ void gdcmValEntry::Print(std::ostream & os) void gdcmValEntry::Write(FILE *fp, FileType filetype) { gdcmDocEntry::Write(fp, filetype); + + if ( GetGroup() == 0xfffe ) + { + return; //delimitors have NO value + } + std::string vr = GetVR(); int lgr = GetReadLength(); if (vr == "US" || vr == "SS")