]> Creatis software - gdcm.git/blob - src/gdcmTS.h
Fix mistypings
[gdcm.git] / src / gdcmTS.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmTS.h,v $
5   Language:  C++
6   Date:      $Date: 2007/08/22 16:14:05 $
7   Version:   $Revision: 1.30 $
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 _GDCMTS_H_
20 #define _GDCMTS_H_
21
22 #include "gdcmRefCounter.h"
23
24 #include <map>
25 #include <string>
26 #include <iostream>
27
28 namespace GDCM_NAME_SPACE 
29 {
30 //-----------------------------------------------------------------------------
31 typedef std::string TSKey;
32 typedef std::string TSAtr;
33 typedef std::map<TSKey, TSAtr> TSHT;    // Transfer Syntax Hash Table
34
35
36 //-----------------------------------------------------------------------------
37 /**
38  * \brief Container for dicom 'Transfer Syntax' Hash Table
39  * \note   This is a singleton
40  */
41 class GDCM_EXPORT TS : public RefCounter
42 {
43    gdcmTypeMacro(TS);
44
45 public:
46    enum SpecialType {
47    ImplicitVRLittleEndian = 0,
48    ImplicitVRBigEndianPrivateGE,
49    ExplicitVRLittleEndian,
50    DeflatedExplicitVRLittleEndian,
51    ExplicitVRBigEndian,
52    JPEGBaselineProcess1,
53    JPEGExtendedProcess2_4,
54    JPEGExtendedProcess3_5,
55    JPEGSpectralSelectionProcess6_8,
56    JPEGFullProgressionProcess10_12,
57    JPEGLosslessProcess14,
58    JPEGLosslessProcess14_1,
59    JPEGLSLossless,
60    JPEGLSNearLossless,
61    JPEG2000Lossless,  
62    JPEG2000,
63    RLELossless,
64    MPEG2MainProfile,
65    
66 // The following are *not* Transfer Syntaxes, but SOP uid   
67    UltrasoundImageStorage_Retired,
68    
69    UnknownTS
70    };
71
72 public:
73 /// \brief Constructs a gdcmTS with a RefCounter
74    static TS *New() {return new TS();}
75
76    virtual void Print(std::ostream &os = std::cout, 
77                       std::string const & = "" );
78
79    int Count(TSKey const &key);
80    TSAtr const &GetValue(TSKey const &key);
81    bool IsTransferSyntax(TSKey const &key);
82    bool IsRLELossless(TSKey const &key);
83    bool IsJPEGLossless(TSKey const&key);
84    bool IsJPEGLossy(TSKey const&key);
85    bool IsJPEG2000(TSKey const &key);
86    bool IsJPEG(TSKey const &key);
87    bool IsJPEGLS(TSKey const &key);
88    bool IsMPEG(TSKey const &key);
89    
90    // This should be deprecated very soon
91    SpecialType GetSpecialTransferSyntax(TSKey const &key);
92    const char* GetSpecialTransferSyntax(SpecialType t);
93    
94    // The following are *not* Transfer Syntaxes.      
95    bool IsUltrasoundImageStorage_Retired(TSKey const &key);
96   
97 protected:
98    TS();
99    ~TS();
100
101 private:
102    TSHT TsMap;
103 };
104 } // end namespace gdcm
105
106 //-----------------------------------------------------------------------------
107 #endif