X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=src%2FgdcmDocEntry.cxx;h=4f3b2be0e8c3c7d1818e0c8e872e1f0483c3ab5d;hb=259d893061b237f67812d3902008df85e562277f;hp=5f313486e8e6065d719c6daaaca6605c57ba9bf6;hpb=44a9814938a6824d3a66b932429084517da6dadf;p=gdcm.git diff --git a/src/gdcmDocEntry.cxx b/src/gdcmDocEntry.cxx index 5f313486..4f3b2be0 100644 --- a/src/gdcmDocEntry.cxx +++ b/src/gdcmDocEntry.cxx @@ -3,12 +3,12 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.cxx,v $ Language: C++ - Date: $Date: 2004/09/13 12:10:53 $ - Version: $Revision: 1.19 $ + Date: $Date: 2004/10/06 13:12:42 $ + Version: $Revision: 1.24 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or - http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details. + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR @@ -48,7 +48,7 @@ gdcmDocEntry::gdcmDocEntry(gdcmDictEntry* in) * \brief Prints the common part of gdcmValEntry, gdcmBinEntry, gdcmSeqEntry * @param os ostream we want to print in */ -void gdcmDocEntry::Print(std::ostream & os) +void gdcmDocEntry::Print(std::ostream& os) { PrintLevel = 2; // FIXME @@ -65,11 +65,11 @@ void gdcmDocEntry::Print(std::ostream & os) o = GetOffset(); vr = GetVR(); - s << GetKey(); - + s << gdcmDictEntry::TranslateToKey(GetGroup(),GetElement()); + if (PrintLevel >= 2) { - s << "lg : "; + s << " lg : "; lgth = GetReadLength(); // ReadLength, as opposed to UsableLength if (lgth == 0xffffffff) { @@ -78,13 +78,13 @@ void gdcmDocEntry::Print(std::ostream & os) s << std::setw(10-strlen(st)) << " "; s << st << " "; s.setf(std::ios::left); - s << std::setw(8) << "-1"; + s << std::setw(8) << "-1"; } else { sprintf(st,"x(%x)",lgth); s.setf(std::ios::left); - s << std::setw(10-strlen(st)) << " "; + s << std::setw(10-strlen(st)) << " "; s << st << " "; s.setf(std::ios::left); s << std::setw(8) << lgth; @@ -114,7 +114,7 @@ void gdcmDocEntry::Print(std::ostream & os) * @param fp already open file pointer * @param filetype type of the file to be written */ -void gdcmDocEntry::Write(FILE *fp, FileType filetype) +void gdcmDocEntry::Write(FILE* fp, FileType filetype) { uint32_t FFFF = 0xffffffff; uint16_t group = GetGroup(); @@ -209,7 +209,8 @@ void gdcmDocEntry::Write(FILE *fp, FileType filetype) /** * \ingroup gdcmDocEntry - * \brief Gets the full length of the elementary DocEntry (not only value length) + * \brief Gets the full length of the elementary DocEntry (not only value + * length) depending on the VR. */ uint32_t gdcmDocEntry::GetFullLength() {