1 /*=========================================================================
4 Module: $RCSfile: gdcmDictEntry.h,v $
6 Date: $Date: 2005/11/05 13:24:39 $
7 Version: $Revision: 1.43 $
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 Multiplicity)
36 * - the corresponding name in english
38 class GDCM_EXPORT DictEntry : public DicomEntry
40 gdcmTypeMacro(DictEntry);
43 static DictEntry *New(uint16_t group, uint16_t elem,
44 VRKey const &vr = GDCM_VRUNKNOWN,
45 TagName const &vm = GDCM_UNKNOWN,
46 TagName const &name = GDCM_UNKNOWN);
49 void Print(std::ostream &os = std::cout, std::string const &indent = "");
51 // Content of DictEntry
52 virtual void SetVR(VRKey const &vr);
53 virtual void SetVM(TagName const &vm);
54 /// \brief returns the VM field of the current DictEntry
55 /// @return The 'Value Multiplicity' field
56 const TagName &GetVM() const { return VM; }
58 /// \brief tells if the V(alue) M(ultiplicity) is known (?!)
60 bool IsVMUnknown() const { return VM == GDCM_UNKNOWN; }
62 /// \brief Returns the Dicom Name of the current DictEntry
63 /// e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010)
64 /// @return the Dicom Name
65 const TagName &GetName() const { return Name; }
68 DictEntry(uint16_t group, uint16_t elem,
69 VRKey const &vr = GDCM_VRUNKNOWN,
70 TagName const &vm = GDCM_UNKNOWN,
71 TagName const &name = GDCM_UNKNOWN);
74 /// \brief Value Multiplicity (e.g. "1", "1-n", "2-n", "6")
77 /// \brief English name of the entry (e.g. "Patient's Name")
80 } // end namespace gdcm
81 //-----------------------------------------------------------------------------