1 /*=========================================================================
4 Module: $RCSfile: gdcmValEntry.h,v $
6 Date: $Date: 2005/01/21 11:40:56 $
7 Version: $Revision: 1.37 $
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 GDCMVALENTRY_H
20 #define GDCMVALENTRY_H
22 #include "gdcmDocEntry.h"
28 //-----------------------------------------------------------------------------
30 * \brief Any Dicom Document (File header or DicomDir) contains
31 * a set of DocEntry - Dicom entries -
32 * (when successfuly parsed against a given Dicom dictionary)
33 * ValEntry is an elementary DocEntry (as opposed to SeqEntry)
35 class GDCM_EXPORT ValEntry : public DocEntry
38 ValEntry(DictEntry *e);
39 ValEntry(DocEntry *d);
42 /// \brief Returns the 'Value' (e.g. "Dupond Marcel") converted into a
43 /// 'string', event if it's physically stored as an integer in the header of the
44 /// current Document (File or DicomDir)
45 std::string const &GetValue() const { return Value; };
47 /// Sets the value (string) of the current Dicom entry.
48 /// The size is updated
49 virtual void SetValue(std::string const &val);
51 virtual void Print(std::ostream &os = std::cout, std::string const & indent = "");
53 virtual void WriteContent(std::ofstream *fp, FileType filetype);
56 /// Sets the value (string) of the current Dicom entry
57 void SetValueOnly(std::string const &val) { Value = val; };
62 /// \brief Dicom entry value, internaly represented as a std::string.
63 /// The Value Representation (\ref VR) is independently used
64 /// in order to interpret (decode) this field.
67 } // end namespace gdcm
69 //-----------------------------------------------------------------------------