1 /*=========================================================================
4 Module: $RCSfile: gdcmVR.h,v $
6 Date: $Date: 2005/10/23 14:56:27 $
7 Version: $Revision: 1.24 $
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 =========================================================================*/
22 #include "gdcmCommon.h"
23 #include "gdcmVRKey.h"
32 //-----------------------------------------------------------------------------
33 typedef std::string VRAtr;
34 /// Value Representation Hash Table
35 typedef std::map<VRKey, VRAtr> VRHT;
37 //-----------------------------------------------------------------------------
39 * \brief Container for dicom Value Representation Hash Table
40 * \note This is a singleton
48 void Print(std::ostream &os = std::cout);
50 /// \brief Get the count for an element
51 int Count(VRKey const &key) { return vr.count(key); };
53 bool IsVROfBinaryRepresentable(VRKey const &tested);
54 bool IsVROfStringRepresentable(VRKey const &tested);
56 /// \brief Simple predicate that checks whether the given argument
57 /// corresponds to the Value Representation of a \ref SeqEntry
58 bool IsVROfSequence(VRKey const &tested) { return tested == "SQ"; }
60 // Remove inline optimization for VS6
61 #if defined(_MSC_VER) && (_MSC_VER == 1200)
62 bool IsValidVR(VRKey const &key);
64 /// \brief checks is a supposed-to-be VR is a 'legal' one.
65 bool IsValidVR(VRKey const &key) { return vr.find(key) != vr.end(); }
68 unsigned short GetAtomicElementLength(VRKey const &tested);
73 } // end namespace gdcm
75 //-----------------------------------------------------------------------------