GDCM 2.2.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

gdcmType.h
Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004
    00005   Copyright (c) 2006-2011 Mathieu Malaterre
    00006   All rights reserved.
    00007   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00008
    00009      This software is distributed WITHOUT ANY WARRANTY; without even
    00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00011      PURPOSE.  See the above copyright notice for more information.
    00012
    00013 =========================================================================*/
    00014
    00015 #ifndef GDCMTYPE_H
    00016 #define GDCMTYPE_H
    00017
    00018 #include "gdcmTypes.h"
    00019
    00020 #include <iostream>
    00021
    00022 namespace gdcm
    00023 {
    00024
    00041 class GDCM_EXPORT Type
    00042 {
    00043 public:
    00044   typedef enum {
    00045     T1 = 0,
    00046     T1C,
    00047     T2,
    00048     T2C,
    00049     T3,
    00050     UNKNOWN
    00051   } TypeType;
    00052
    00053   Type(TypeType type = UNKNOWN) : TypeField(type) { }
    00054
    00055   operator TypeType () const { return TypeField; }
    00056   friend std::ostream &operator<<(std::ostream &os, const Type &vr);
    00057
    00058   static const char *GetTypeString(TypeType type);
    00059   static TypeType GetTypeType(const char *type);
    00060
    00061 private:
    00062   TypeType TypeField;
    00063 };
    00064 //-----------------------------------------------------------------------------
    00065 inline std::ostream &operator<<(std::ostream &_os, const Type &val)
    00066 {
    00067   _os << Type::GetTypeString(val.TypeField);
    00068   return _os;
    00069 }
    00070
    00071 } // end namespace gdcm
    00072
    00073 #endif //GDCMTYPE_H