]> Creatis software - gdcm.git/blob - src/gdcmTS.h
Some normalizations :
[gdcm.git] / src / gdcmTS.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmTS.h,v $
5   Language:  C++
6   Date:      $Date: 2005/01/23 10:12:34 $
7   Version:   $Revision: 1.18 $
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 "gdcmCommon.h"
23
24 #include <map>
25 #include <string>
26 #include <iostream>
27
28 namespace gdcm 
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
42 {
43 public:
44 enum SpecialType {
45   ImplicitVRLittleEndian = 0,
46   ImplicitVRLittleEndianDLXGE,
47   ExplicitVRLittleEndian,
48   DeflatedExplicitVRLittleEndian,
49   ExplicitVRBigEndian,
50   JPEGBaselineProcess1,
51   JPEGExtendedProcess2_4,
52   JPEGExtendedProcess3_5,
53   JPEGSpectralSelectionProcess6_8,
54   JPEGFullProgressionProcess10_12,
55   JPEGLosslessProcess14,
56   JPEGLosslessProcess14_1,
57   JPEGLSLossless,
58   JPEGLSNearLossless,
59   JPEG2000Lossless,  
60   JPEG2000,
61   RLELossless,
62   UnknownTS
63 };
64
65 public:
66    TS();
67    ~TS();
68
69    void Print(std::ostream &os = std::cout);
70
71    int Count(TSKey const &key);
72    TSAtr const &GetValue(TSKey const &key);
73    bool IsTransferSyntax(TSKey const &key);
74    bool IsRLELossless(TSKey const &key);
75    bool IsJPEGLossless(TSKey const&key);
76    bool IsJPEGLossy(TSKey const&key);
77    bool IsJPEG2000(TSKey const &key);
78    bool IsJPEG(TSKey const &key);
79    bool IsJPEGLS(TSKey const &key);
80
81    // This should be deprecated very soon
82    SpecialType GetSpecialTransferSyntax(TSKey const &key);
83    const char* GetSpecialTransferSyntax(SpecialType t);
84
85 private:
86    TSHT TsMap;
87 };
88 } // end namespace gdcm
89
90 //-----------------------------------------------------------------------------
91 #endif