X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src%2FgdcmContentEntry.cxx;h=d48ac1c2e636abdd81dce78d57aeda0e16f7834a;hb=643a8d9fe7dc8470db4cf7a6de639beebb339076;hp=3c1ed7c4ea193633014feb654431c1424dfb3e86;hpb=2919038a10834b08a8ab3f168d14511721a007cd;p=gdcm.git diff --git a/src/gdcmContentEntry.cxx b/src/gdcmContentEntry.cxx index 3c1ed7c4..d48ac1c2 100644 --- a/src/gdcmContentEntry.cxx +++ b/src/gdcmContentEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmContentEntry.cxx,v $ Language: C++ - Date: $Date: 2005/01/25 16:32:45 $ - Version: $Revision: 1.2 $ + Date: $Date: 2005/01/28 15:10:56 $ + Version: $Revision: 1.7 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -28,13 +28,10 @@ namespace gdcm { -// CLEAN ME -#define MAX_SIZE_PRINT_ELEMENT_VALUE 128 - //----------------------------------------------------------------------------- // Constructor / Destructor /** - * \brief Constructor from a given DictEntry + * \brief Constructor for a given DictEntry * @param e Pointer to existing dictionary entry */ ContentEntry::ContentEntry(DictEntry *e) : DocEntry(e) @@ -43,7 +40,7 @@ ContentEntry::ContentEntry(DictEntry *e) : DocEntry(e) } /** - * \brief Constructor from a given DocEntry + * \brief Constructor for a given DocEntry * @param e Pointer to existing Doc entry */ ContentEntry::ContentEntry(DocEntry *e) @@ -52,7 +49,6 @@ ContentEntry::ContentEntry(DocEntry *e) Copy(e); } - /** * \brief Canonical destructor. */ @@ -62,60 +58,14 @@ ContentEntry::~ContentEntry () //----------------------------------------------------------------------------- // Public - -/** - * \brief Writes the std::string representable' value of a ContentEntry - * @param fp already open ofstream pointer - * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...) - */ -void ContentEntry::WriteContent(std::ofstream *fp, FileType filetype) +void ContentEntry::Copy(DocEntry *doc) { - DocEntry::WriteContent(fp, filetype); - - if ( GetGroup() == 0xfffe ) - { - return; //delimitors have NO value - } + DocEntry::Copy(doc); - const VRKey &vr = GetVR(); - unsigned int lgr = GetLength(); - if (vr == "US" || vr == "SS") - { - // some 'Short integer' fields may be multivaluated - // each single value is separated from the next one by '\' - // we split the string and write each value as a short int - std::vector tokens; - tokens.erase(tokens.begin(),tokens.end()); // clean any previous value - Util::Tokenize (GetValue(), tokens, "\\"); - for (unsigned int i=0; i tokens; - tokens.erase(tokens.begin(),tokens.end()); // clean any previous value - Util::Tokenize (GetValue(), tokens, "\\"); - for (unsigned int i=0; i(doc); + if(entry) + Value = entry->Value; +} //----------------------------------------------------------------------------- // Protected