X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDocEntry.cxx;h=f343fb60846218253972b1bf4c0bbb6c83e622b0;hb=aed339028b8f3af17ae97874379853c8a9534c88;hp=b5d013c9bee6cee0b4689ad06b20ca9e199a42da;hpb=003f9a9e167e2d3355773660e8fed130c653a251;p=gdcm.git diff --git a/src/gdcmDocEntry.cxx b/src/gdcmDocEntry.cxx index b5d013c9..f343fb60 100644 --- a/src/gdcmDocEntry.cxx +++ b/src/gdcmDocEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.cxx,v $ Language: C++ - Date: $Date: 2005/10/28 13:02:32 $ - Version: $Revision: 1.76 $ + Date: $Date: 2005/11/29 12:48:46 $ + Version: $Revision: 1.79 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -84,6 +84,10 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype) // // ----------- Writes the common part // + // To avoid gdcm to propagate oddities. + // --> Don't forget to *write* an even length value + if (lgth%2) + lgth ++; // ----------- Writes the common part : the Tag binary_write( *fp, group); //group number @@ -124,10 +128,10 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype) else { binary_write(*fp, vr.str()); - - if ( (vr == "OB") || (vr == "OW") || (vr == "SQ") /*|| (vr == "UN")*/ ) -// FIXME : what is the status of VR = "UN" -// --> uncomment or remove comment ! + + // See PS 3.5-2004 page 33, 36 + if ( (vr == "SQ") || (vr == "OB") || (vr == "OW") || (vr == "OF") + || (vr == "UN") || (vr == "UT") ) { binary_write(*fp, zero); if (vr == "SQ") @@ -215,7 +219,7 @@ bool DocEntry::IsSequenceDelimitor() } /** - * \brief Copies all the attributes from an other DocEntry + * \brief Copies all the attributes from an other DocEntry * @param doc entry to copy from */ void DocEntry::Copy(DocEntry *doc)