GDCM  2.2.0
gdcmIOD.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 #ifndef GDCMIOD_H
00015 #define GDCMIOD_H
00016 
00017 #include "gdcmTypes.h"
00018 #include "gdcmTag.h"
00019 #include "gdcmIODEntry.h"
00020 
00021 #include <vector>
00022 
00023 namespace gdcm
00024 {
00025 class DataSet;
00026 class Defs;
00027 
00034 class GDCM_EXPORT IOD
00035 {
00036 public:
00037   typedef std::vector<IODEntry> MapIODEntry;
00038   typedef MapIODEntry::size_type SizeType;
00039 
00040   IOD() {}
00041   friend std::ostream& operator<<(std::ostream& _os, const IOD &_val);
00042 
00043   void Clear() { IODInternal.clear(); }
00044 
00045   void AddIODEntry(const IODEntry & iode)
00046     {
00047     IODInternal.push_back(iode);
00048     }
00049 
00050   SizeType GetNumberOfIODs() const {
00051     return IODInternal.size();
00052   }
00053 
00054   const IODEntry& GetIODEntry(SizeType idx) const
00055     {
00056     return IODInternal[idx];
00057     }
00058 
00059   Type GetTypeFromTag(const Defs &defs, const Tag& tag) const;
00060 
00061 private:
00062   //IOD &operator=(const IOD &_val); // purposely not implemented
00063   //IOD(const IOD &_val); // purposely not implemented
00064 
00065   MapIODEntry IODInternal;
00066 };
00067 //-----------------------------------------------------------------------------
00068 inline std::ostream& operator<<(std::ostream& _os, const IOD &_val)
00069 {
00070   IOD::MapIODEntry::const_iterator it = _val.IODInternal.begin();
00071   for(;it != _val.IODInternal.end(); ++it)
00072     {
00073     _os << *it << '\n';
00074     }
00075 
00076   return _os;
00077 }
00078 
00079 } // end namespace gdcm
00080 
00081 #endif //GDCMIOD_H

Generated on Sun Jun 3 2012 15:26:48 for GDCM by doxygen 1.8.0
SourceForge.net Logo