# gdcmDefs.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 GDCMDEFS_H
    00016 #define GDCMDEFS_H
    00017
    00018 #include "gdcmModules.h"
    00019 #include "gdcmMacros.h"
    00020 #include "gdcmIODs.h"
    00021
    00022 #include <string>
    00023
    00024 namespace gdcm
    00025 {
    00026 class DataSet;
    00027 class File;
    00028 class MediaStorage;
    00033 class GDCM_EXPORT Defs
    00034 {
    00035 public:
    00036   Defs();
    00037   ~Defs();
    00038
    00039   const Modules &GetModules() const { return Part3Modules; }
    00040   Modules &GetModules() { return Part3Modules; }
    00041
    00044   const Macros &GetMacros() const { return Part3Macros; }
    00045   Macros &GetMacros() { return Part3Macros; }
    00046
    00047   const IODs & GetIODs() const { return Part3IODs; }
    00048   IODs & GetIODs() { return Part3IODs; }
    00049
    00050   bool IsEmpty() const { return GetModules().IsEmpty(); }
    00051
    00052   bool Verify(const File& file) const;
    00053
    00054   // \deprecated DO NOT USE
    00055   bool Verify(const DataSet& ds) const;
    00056
    00057   Type GetTypeFromTag(const File& file, const Tag& tag) const;
    00058
    00059   static const char *GetIODNameFromMediaStorage(MediaStorage const &ms);
    00060
    00061   const IOD& GetIODFromFile(const File& file) const;
    00062
    00063 protected:
    00064   friend class Global;
    00065   void LoadDefaults();
    00066   void LoadFromFile(const char *filename);
    00067
    00068 private:
    00069   // Part 3 stuff:
    00070   Macros Part3Macros;
    00071   Modules Part3Modules;
    00072   IODs Part3IODs;
    00073
    00074   Defs &operator=(const Defs &val); // purposely not implemented
    00075   Defs(const Defs &val); // purposely not implemented
    00076 };
    00077
    00078
    00079 } // end namespace gdcm
    00080
    00081 #endif //GDCMDEFS_H