GDCM
2.0.18
|
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 #if 0 00015 #ifndef GDCMMACROENTRY_H 00016 #define GDCMMACROENTRY_H 00017 00018 #include "gdcmTypes.h" 00019 #include "gdcmType.h" 00020 00021 #include <string> 00022 00023 namespace gdcm 00024 { 00030 class GDCM_EXPORT MacroEntry 00031 { 00032 public: 00033 MacroEntry(const char *name = "", const char *type = "3", const char *description = ""):Name(name)/*,Type(type)*/,DescriptionField(description) { 00034 DataElementType = Type::GetTypeType(type); 00035 } 00036 virtual ~MacroEntry() {} // important 00037 friend std::ostream& operator<<(std::ostream& _os, const MacroEntry &_val); 00038 00039 void SetName(const char *name) { Name = name; } 00040 const char *GetName() const { return Name.c_str(); } 00041 00042 void SetType(const Type &type) { DataElementType = type; } 00043 const Type &GetType() const { return DataElementType; } 00044 00045 /* 00046 * WARNING: 'Description' is currently a std::string, but it might change in the future 00047 * do not expect it to remain the same, and always use the ModuleEntry::Description typedef 00048 * instead. 00049 */ 00050 typedef std::string Description; 00051 void SetDescription(const char *d) { DescriptionField = d; } 00052 const Description & GetDescription() const { return DescriptionField; } 00053 00054 protected: 00055 // PS 3.3 repeats the name of an attribute, but often contains typos 00056 // for now we will not use this info, but instead access the DataDict instead 00057 std::string Name; 00058 00059 // An attribute, encoded as a Data Element, may or may not be required in a 00060 // Data Set, depending on that Attribute's Data Element Type. 00061 Type DataElementType; 00062 00063 // TODO: for now contains the raw description (with enumerated values, defined terms...) 00064 Description DescriptionField; 00065 }; 00066 //----------------------------------------------------------------------------- 00067 inline std::ostream& operator<<(std::ostream& _os, const MacroEntry &_val) 00068 { 00069 _os << _val.Name << "\t" << _val.DataElementType << "\t" << _val.DescriptionField; 00070 return _os; 00071 } 00072 00073 00074 } // end namespace gdcm 00075 00076 #endif //GDCMMODULEENTRY_H 00077 #endif 00078 00079 #ifndef GDCMMACROENTRY_H 00080 #define GDCMMACROENTRY_H 00081 #include "gdcmModuleEntry.h" 00082 #endif