gdcmType.h
Go to the documentation of this file.
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef GDCMTYPE_H
#define GDCMTYPE_H
#include "gdcmTypes.h"
#include <iostream>
namespace gdcm
{
class GDCM_EXPORT Type
{
public:
typedef enum {
T1 = 0,
T1C,
T2,
T2C,
T3,
UNKNOWN
} TypeType;
Type(TypeType type = UNKNOWN) : TypeField(type) { }
operator TypeType () const { return TypeField; }
friend std::ostream &operator<<(std::ostream &os, const Type &vr);
static const char *GetTypeString(TypeType type);
static TypeType GetTypeType(const char *type);
private:
TypeType TypeField;
};
//-----------------------------------------------------------------------------
inline std::ostream &operator<<(std::ostream &_os, const Type &val)
{
_os << Type::GetTypeString(val.TypeField);
return _os;
}
} // end namespace gdcm
#endif //GDCMTYPE_H
gdcm::Type
Type.
Definition gdcmType.h:42
gdcm::Type::TypeType
TypeType
Definition gdcmType.h:44
gdcm::Type::T1C
@ T1C
Definition gdcmType.h:46
gdcm::Type::T2
@ T2
Definition gdcmType.h:47
gdcm::Type::UNKNOWN
@ UNKNOWN
Definition gdcmType.h:50
gdcm::Type::T3
@ T3
Definition gdcmType.h:49
gdcm::Type::T1
@ T1
Definition gdcmType.h:45
gdcm::Type::T2C
@ T2C
Definition gdcmType.h:48
gdcm::Type::GetTypeType
static TypeType GetTypeType(const char *type)
gdcm::Type::GetTypeString
static const char * GetTypeString(TypeType type)
gdcm::Type::Type
Type(TypeType type=UNKNOWN)
Definition gdcmType.h:53
gdcmTypes.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21
gdcm::operator<<
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition gdcmDirectory.h:88