GDCM 2.0.17

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

Generated on Wed Feb 2 2011 19:21:02 for GDCM by doxygen 1.7.3
SourceForge.net Logo