X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmContentEntry.cxx;h=22ca6d2f6a6b0442c0173320de5f436513699d5f;hb=0408b1aa8aaf0d1e17391984490ad2bbe89a922b;hp=2e4530c3b4e7b2d5bd98d5ec16e272fcd3a3447a;hpb=7cbed4e7f082b4d2df1edda48bb3fde175a60b6e;p=gdcm.git diff --git a/src/gdcmContentEntry.cxx b/src/gdcmContentEntry.cxx index 2e4530c3..22ca6d2f 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 15:21:20 $ - Version: $Revision: 1.1 $ + Date: $Date: 2005/01/30 17:30:57 $ + Version: $Revision: 1.8 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -28,21 +28,19 @@ 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) { + Value = GDCM_UNFOUND; } /** - * \brief Constructor from a given DocEntry + * \brief Constructor for a given DocEntry * @param e Pointer to existing Doc entry */ ContentEntry::ContentEntry(DocEntry *e) @@ -51,7 +49,6 @@ ContentEntry::ContentEntry(DocEntry *e) Copy(e); } - /** * \brief Canonical destructor. */ @@ -60,61 +57,18 @@ ContentEntry::~ContentEntry () } //----------------------------------------------------------------------------- -// Public +// Print -/** - * \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) +//----------------------------------------------------------------------------- +// Public +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