X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDocEntry.cxx;h=8c750d71769c2ba7b3ed59466d8b3afcde4d8a25;hb=03acf3c119c6657129b8aeae8cb2205e481a105b;hp=db3461fe04fcf541021e1ba28cfa0065b0df53df;hpb=f5c7e83afd484a025285c64a09a89bd227087245;p=gdcm.git diff --git a/src/gdcmDocEntry.cxx b/src/gdcmDocEntry.cxx index db3461fe..8c750d71 100644 --- a/src/gdcmDocEntry.cxx +++ b/src/gdcmDocEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.cxx,v $ Language: C++ - Date: $Date: 2004/12/16 13:46:37 $ - Version: $Revision: 1.35 $ + Date: $Date: 2005/01/06 20:03:27 $ + Version: $Revision: 1.38 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -38,7 +38,7 @@ namespace gdcm * \brief Constructor from a given DictEntry * @param in Pointer to existing dictionary entry */ -DocEntry::DocEntry(DictEntry* in) +DocEntry::DocEntry(DictEntry *in) { ImplicitVR = false; DicomDict = in; @@ -57,7 +57,7 @@ DocEntry::DocEntry(DictEntry* in) * \brief Prints the common part of ValEntry, BinEntry, SeqEntry * @param os ostream we want to print in */ -void DocEntry::Print(std::ostream& os) +void DocEntry::Print(std::ostream &os) { size_t o; std::string st; @@ -68,6 +68,8 @@ void DocEntry::Print(std::ostream& os) o = GetOffset(); vr = GetVR(); + if(vr==GDCM_UNKNOWN) + vr=" "; s << DictEntry::TranslateToKey(GetGroup(),GetElement()); @@ -118,7 +120,7 @@ void DocEntry::Print(std::ostream& os) * @param fp already open file pointer * @param filetype type of the file to be written */ -void DocEntry::WriteContent(std::ofstream* fp, FileType filetype) +void DocEntry::WriteContent(std::ofstream *fp, FileType filetype) { uint32_t ffff = 0xffffffff; uint16_t group = GetGroup(); @@ -163,7 +165,7 @@ void DocEntry::WriteContent(std::ofstream* fp, FileType filetype) uint16_t z = 0; uint16_t shortLgr = lgr; - if (vr == "unkn") + if (vr == GDCM_UNKNOWN) { // Unknown was 'written' // deal with Little Endian @@ -242,7 +244,7 @@ uint32_t DocEntry::GetFullLength() * \ingroup DocEntry * \brief Copies all the attributes from an other DocEntry */ -void DocEntry::Copy (DocEntry* e) +void DocEntry::Copy (DocEntry *e) { // DicomDict = e->DicomDict; UsableLength = e->UsableLength;