]> Creatis software - gdcm.git/blobdiff - src/gdcmTS.h
* Improvement #2 : the CommandManager is now a static class so,
[gdcm.git] / src / gdcmTS.h
index 6375a0a4d01fcba492a3da27edbd2c7f0046cc93..f2cea1c5b37de70691e33fd547c45b9a221e8f82 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmTS.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:34 $
-  Version:   $Revision: 1.18 $
+  Date:      $Date: 2005/11/28 16:31:23 $
+  Version:   $Revision: 1.26 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -19,7 +19,7 @@
 #ifndef GDCMTS_H
 #define GDCMTS_H
 
-#include "gdcmCommon.h"
+#include "gdcmRefCounter.h"
 
 #include <map>
 #include <string>
@@ -38,35 +38,39 @@ typedef std::map<TSKey, TSAtr> TSHT;    // Transfer Syntax Hash Table
  * \brief Container for dicom 'Transfer Syntax' Hash Table
  * \note   This is a singleton
  */
-class GDCM_EXPORT TS
+class GDCM_EXPORT TS : public RefCounter
 {
+   gdcmTypeMacro(TS);
+
 public:
-enum SpecialType {
-  ImplicitVRLittleEndian = 0,
-  ImplicitVRLittleEndianDLXGE,
-  ExplicitVRLittleEndian,
-  DeflatedExplicitVRLittleEndian,
-  ExplicitVRBigEndian,
-  JPEGBaselineProcess1,
-  JPEGExtendedProcess2_4,
-  JPEGExtendedProcess3_5,
-  JPEGSpectralSelectionProcess6_8,
-  JPEGFullProgressionProcess10_12,
-  JPEGLosslessProcess14,
-  JPEGLosslessProcess14_1,
-  JPEGLSLossless,
-  JPEGLSNearLossless,
-  JPEG2000Lossless,  
-  JPEG2000,
-  RLELossless,
-  UnknownTS
-};
+   enum SpecialType {
+   ImplicitVRLittleEndian = 0,
+   ImplicitVRBigEndianPrivateGE,
+   ExplicitVRLittleEndian,
+   DeflatedExplicitVRLittleEndian,
+   ExplicitVRBigEndian,
+   JPEGBaselineProcess1,
+   JPEGExtendedProcess2_4,
+   JPEGExtendedProcess3_5,
+   JPEGSpectralSelectionProcess6_8,
+   JPEGFullProgressionProcess10_12,
+   JPEGLosslessProcess14,
+   JPEGLosslessProcess14_1,
+   JPEGLSLossless,
+   JPEGLSNearLossless,
+   JPEG2000Lossless,  
+   JPEG2000,
+   RLELossless,
+   MPEG2MainProfile,  
+   UnknownTS
+   };
 
 public:
-   TS();
-   ~TS();
+/// \brief Constructs a gdcmTS with a RefCounter
+   static TS *New() {return new TS();}
 
-   void Print(std::ostream &os = std::cout);
+   virtual void Print(std::ostream &os = std::cout, 
+                      std::string const &indent = "" );
 
    int Count(TSKey const &key);
    TSAtr const &GetValue(TSKey const &key);
@@ -77,11 +81,16 @@ public:
    bool IsJPEG2000(TSKey const &key);
    bool IsJPEG(TSKey const &key);
    bool IsJPEGLS(TSKey const &key);
+   bool IsMPEG(TSKey const &key);
 
    // This should be deprecated very soon
    SpecialType GetSpecialTransferSyntax(TSKey const &key);
    const char* GetSpecialTransferSyntax(SpecialType t);
 
+protected:
+   TS();
+   ~TS();
+
 private:
    TSHT TsMap;
 };