gdcmTS.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmTS.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/08/22 16:14:05 $
00007   Version:   $Revision: 1.30 $
00008                                                                                 
00009   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
00010   l'Image). All rights reserved. See Doc/License.txt or
00011   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
00012                                                                                 
00013      This software is distributed WITHOUT ANY WARRANTY; without even
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015      PURPOSE.  See the above copyright notices for more information.
00016                                                                                 
00017 =========================================================================*/
00018 
00019 #ifndef _GDCMTS_H_
00020 #define _GDCMTS_H_
00021 
00022 #include "gdcmRefCounter.h"
00023 
00024 #include <map>
00025 #include <string>
00026 #include <iostream>
00027 
00028 namespace GDCM_NAME_SPACE 
00029 {
00030 //-----------------------------------------------------------------------------
00031 typedef std::string TSKey;
00032 typedef std::string TSAtr;
00033 typedef std::map<TSKey, TSAtr> TSHT;    // Transfer Syntax Hash Table
00034 
00035 
00036 //-----------------------------------------------------------------------------
00041 class GDCM_EXPORT TS : public RefCounter
00042 {
00043    gdcmTypeMacro(TS);
00044 
00045 public:
00046    enum SpecialType {
00047    ImplicitVRLittleEndian = 0,
00048    ImplicitVRBigEndianPrivateGE,
00049    ExplicitVRLittleEndian,
00050    DeflatedExplicitVRLittleEndian,
00051    ExplicitVRBigEndian,
00052    JPEGBaselineProcess1,
00053    JPEGExtendedProcess2_4,
00054    JPEGExtendedProcess3_5,
00055    JPEGSpectralSelectionProcess6_8,
00056    JPEGFullProgressionProcess10_12,
00057    JPEGLosslessProcess14,
00058    JPEGLosslessProcess14_1,
00059    JPEGLSLossless,
00060    JPEGLSNearLossless,
00061    JPEG2000Lossless,  
00062    JPEG2000,
00063    RLELossless,
00064    MPEG2MainProfile,
00065    
00066 // The following are *not* Transfer Syntaxes, but SOP uid   
00067    UltrasoundImageStorage_Retired,
00068    
00069    UnknownTS
00070    };
00071 
00072 public:
00074    static TS *New() {return new TS();}
00075 
00076    virtual void Print(std::ostream &os = std::cout, 
00077                       std::string const & = "" );
00078 
00079    int Count(TSKey const &key);
00080    TSAtr const &GetValue(TSKey const &key);
00081    bool IsTransferSyntax(TSKey const &key);
00082    bool IsRLELossless(TSKey const &key);
00083    bool IsJPEGLossless(TSKey const&key);
00084    bool IsJPEGLossy(TSKey const&key);
00085    bool IsJPEG2000(TSKey const &key);
00086    bool IsJPEG(TSKey const &key);
00087    bool IsJPEGLS(TSKey const &key);
00088    bool IsMPEG(TSKey const &key);
00089    
00090    // This should be deprecated very soon
00091    SpecialType GetSpecialTransferSyntax(TSKey const &key);
00092    const char* GetSpecialTransferSyntax(SpecialType t);
00093    
00094    // The following are *not* Transfer Syntaxes.      
00095    bool IsUltrasoundImageStorage_Retired(TSKey const &key);
00096   
00097 protected:
00098    TS();
00099    ~TS();
00100 
00101 private:
00102    TSHT TsMap;
00103 };
00104 } // end namespace gdcm
00105 
00106 //-----------------------------------------------------------------------------
00107 #endif

Generated on Fri Aug 24 12:53:19 2007 for gdcm by  doxygen 1.4.6