# gdcmDicts.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004   Module:  $URL$
    00005
    00006   Copyright (c) 2006-2010 Mathieu Malaterre
    00007   All rights reserved.
    00008   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00009
    00010      This software is distributed WITHOUT ANY WARRANTY; without even
    00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00012      PURPOSE.  See the above copyright notice for more information.
    00013
    00014 =========================================================================*/
    00015 #ifndef GDCMDICTS_H
    00016 #define GDCMDICTS_H
    00017
    00018 #include "gdcmDict.h"
    00019 #include "gdcmCSAHeaderDict.h"
    00020
    00021 #include <string>
    00022
    00023 namespace gdcm
    00024 {
    00029 class GDCM_EXPORT Dicts
    00030 {
    00031   friend std::ostream& operator<<(std::ostream &_os, const Dicts &d);
    00032 public:
    00033   Dicts();
    00034   ~Dicts();
    00035
    00039   // DataSet::GetPrivateCreator
    00040   const DictEntry &GetDictEntry(const Tag& tag, const char *owner = NULL) const;
    00041
    00042   const DictEntry &GetDictEntry(const PrivateTag& tag) const;
    00043
    00044   //enum PublicTypes {
    00045   //  DICOMV3_DICT,
    00046   //  ACRNEMA_DICT,
    00047   //  NIH_DICT
    00048   //};
    00049   const Dict &GetPublicDict() const;
    00050
    00051   const PrivateDict &GetPrivateDict() const;
    00052   PrivateDict &GetPrivateDict();
    00053
    00054   const CSAHeaderDict &GetCSAHeaderDict() const;
    00055
    00056   bool IsEmpty() const { return GetPublicDict().IsEmpty(); }
    00057
    00058 protected:
    00059   typedef enum {
    00060     PHILIPS,
    00061     GEMS,
    00062     SIEMENS
    00063   //  ...
    00064   } ConstructorType;
    00065   static const char *GetConstructorString(ConstructorType type);
    00066
    00067   friend class Global;
    00068   void LoadDefaults();
    00069
    00070 private:
    00071   // Public dict:
    00072   Dict PublicDict;
    00073
    00074   // Private Dicts:
    00075   PrivateDict ShadowDict;
    00076
    00077   CSAHeaderDict CSADict;
    00078   Dicts &operator=(const Dicts &_val); // purposely not implemented
    00079   Dicts(const Dicts &_val); // purposely not implemented
    00080 };
    00081 //-----------------------------------------------------------------------------
    00082 inline std::ostream& operator<<(std::ostream &os, const Dicts &d)
    00083 {
    00084   (void)d;
    00085   return os;
    00086 }
    00087
    00088
    00089 } // end namespace gdcm
    00090
    00091 #endif //GDCMDICTS_H