1 /*=========================================================================
4 Module: $RCSfile: gdcmDictEntry.h,v $
6 Date: $Date: 2005/10/21 07:38:00 $
7 Version: $Revision: 1.40 $
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 GDCMDICTENTRY_H
20 #define GDCMDICTENTRY_H
22 #include "gdcmDicomEntry.h"
26 //-----------------------------------------------------------------------------
29 * the DictEntry in an element contained by the Dict.
31 * - the key referenced by the DICOM norm or the constructor (for private keys)
32 * i.e. the Group number
34 * - the VR (Value Representation)
35 * - the VM (Value Multplicity)
36 * - the corresponding name in english
38 class GDCM_EXPORT DictEntry : public DicomEntry
41 gdcmTypeMacro(DictEntry)
44 static DictEntry *New(uint16_t group, uint16_t elem,
45 VRKey const &vr = GDCM_VRUNKNOWN,
46 TagName const &vm = GDCM_UNKNOWN,
47 TagName const &name = GDCM_UNKNOWN);
50 void Print(std::ostream &os = std::cout, std::string const &indent = "");
52 // Content of DictEntry
53 virtual void SetVR(VRKey const &vr);
54 virtual void SetVM(TagName const &vm);
55 /// \brief returns the VM field of the current DictEntry
56 /// @return The 'Value Multiplicity' field
57 const TagName &GetVM() const { return VM; }
59 /// \brief tells if the V(alue) M(ultiplicity) is known (?!)
61 bool IsVMUnknown() const { return VM == GDCM_UNKNOWN; }
63 /// \brief Returns the Dicom Name of the current DictEntry
64 /// e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010)
65 /// @return the Dicom Name
66 const TagName &GetName() const { return Name; }
69 DictEntry(uint16_t group, uint16_t elem,
70 VRKey const &vr = GDCM_VRUNKNOWN,
71 TagName const &vm = GDCM_UNKNOWN,
72 TagName const &name = GDCM_UNKNOWN);
75 /// \brief Value Multiplicity (e.g. "1", "1-n", "6")
78 /// e.g. "Patient's Name"
81 } // end namespace gdcm
82 //-----------------------------------------------------------------------------