1 /*=========================================================================
4 Module: $RCSfile: gdcmContentEntry.h,v $
6 Date: $Date: 2005/09/02 07:10:03 $
7 Version: $Revision: 1.6 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
19 #ifndef GDCMCONTENTENTRY_H
20 #define GDCMCONTENTENTRY_H
22 #include "gdcmDocEntry.h"
28 //-----------------------------------------------------------------------------
30 * \brief Any Dicom Document (File or DicomDir) contains
31 * a set of DocEntry - Dicom entries -
32 * (when successfuly parsed against a given Dicom dictionary)
33 * ContentEntry is an elementary DocEntry (as opposed to SeqEntry).
34 * Depending on the type of its content,
35 * ContentEntry is specialized as a ValEntry or a BinEntry
37 class GDCM_EXPORT ContentEntry : public DocEntry
40 virtual void WriteContent(std::ofstream *fp, FileType filetype) = 0;
42 /// Sets the value (string) of the current Dicom entry
43 virtual void SetValue(std::string const &val) { Value = val; }
44 /// \brief Returns the 'Value' (e.g. "Dupond^Marcel") converted
45 /// into a 'string', event if it's physically stored on disk as an integer
46 /// (e.g. : 0x000c returned as "12")
47 std::string const &GetValue() const { return Value; }
49 void Copy(DocEntry *doc);
52 // Contructors are protected, not to be invoked by end user.
53 ContentEntry(DictEntry *e);
54 ContentEntry(DocEntry *d);
55 // Destructor is protected, not to be invoked by end user.
60 /// \brief Dicom entry value, internaly represented as a std::string.
61 /// The Value Representation (\ref VR) is independently used
62 /// in order to interpret (decode) this field.
66 } // end namespace gdcm
68 //-----------------------------------------------------------------------------