]> Creatis software - gdcm.git/blob - src/gdcmTS.h
Prepare (future) MPEG integration
[gdcm.git] / src / gdcmTS.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmTS.h,v $
5   Language:  C++
6   Date:      $Date: 2005/04/22 13:37:57 $
7   Version:   $Revision: 1.20 $
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   MPEG2MainProfile,  
63   UnknownTS
64 };
65
66 public:
67    TS();
68    ~TS();
69
70    void Print(std::ostream &os = std::cout);
71
72    int Count(TSKey const &key);
73    TSAtr const &GetValue(TSKey const &key);
74    bool IsTransferSyntax(TSKey const &key);
75    bool IsRLELossless(TSKey const &key);
76    bool IsJPEGLossless(TSKey const&key);
77    bool IsJPEGLossy(TSKey const&key);
78    bool IsJPEG2000(TSKey const &key);
79    bool IsJPEG(TSKey const &key);
80    bool IsJPEGLS(TSKey const &key);
81    bool IsMPEG(TSKey const &key);
82
83    // This should be deprecated very soon
84    SpecialType GetSpecialTransferSyntax(TSKey const &key);
85    const char* GetSpecialTransferSyntax(SpecialType t);
86
87 private:
88    TSHT TsMap;
89 };
90 } // end namespace gdcm
91
92 //-----------------------------------------------------------------------------
93 #endif