]> Creatis software - gdcm.git/blob - src/gdcmVR.h
* src/gdcmDocument.[h|cxx] : remove all copy of DocEntry when parsing a file
[gdcm.git] / src / gdcmVR.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmVR.h,v $
5   Language:  C++
6   Date:      $Date: 2005/01/06 17:16:16 $
7   Version:   $Revision: 1.16 $
8                                                                                 
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.
12                                                                                 
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.
16                                                                                 
17 =========================================================================*/
18
19 #ifndef GDCMVR_H
20 #define GDCMVR_H
21
22 #include "gdcmCommon.h"
23 #include <map>
24 #include <string>
25 #include <iostream>
26
27 namespace gdcm 
28 {
29
30 //-----------------------------------------------------------------------------
31 typedef std::string VRKey;
32 typedef std::string VRAtr;
33 /// Value Representation Hash Table
34 typedef std::map<VRKey, VRAtr> VRHT;
35
36 //-----------------------------------------------------------------------------
37 /*
38  * Container for dicom Value Representation Hash Table
39  * \note   This is a singleton
40  */
41 class GDCM_EXPORT VR 
42 {
43 public:
44    VR(void);
45    ~VR();
46
47    void Print(std::ostream &os = std::cout);
48    int Count(VRKey const & key);
49    bool IsVROfBinaryRepresentable(VRKey const & tested);
50    bool IsVROfStringRepresentable(VRKey const & tested);
51    bool IsVROfSequence(VRKey const & tested);
52
53    bool IsValidVR(VRKey const & key);
54
55 private:
56    VRHT vr;
57 };
58 } // end namespace gdcm
59
60 //-----------------------------------------------------------------------------
61 #endif