GDCM  2.2.0
gdcmPDBHeader.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 GDCMPDBHEADER_H
00015 #define GDCMPDBHEADER_H
00016 
00017 #include "gdcmTypes.h"
00018 #include "gdcmDataSet.h"
00019 #include "gdcmPDBElement.h"
00020 
00021 namespace gdcm
00022 {
00023 
00024 /*
00025  * Everything done in this code is for the sole purpose of writing interoperable
00026  * software under Sect. 1201 (f) Reverse Engineering exception of the DMCA.
00027  * If you believe anything in this code violates any law or any of your rights,
00028  * please contact us (gdcm-developers@lists.sourceforge.net) so that we can
00029  * find a solution.
00030  */
00031 //-----------------------------------------------------------------------------
00032 
00033 class DataElement;
00034 class PrivateTag;
00051 class GDCM_EXPORT PDBHeader
00052 {
00053   friend std::ostream& operator<<(std::ostream &_os, const PDBHeader &d);
00054 public :
00055   PDBHeader() {}
00056   ~PDBHeader() {}
00057 
00059   bool LoadFromDataElement(DataElement const &de);
00060 
00062   void Print(std::ostream &os) const;
00063 
00065   static const PrivateTag & GetPDBInfoTag();
00066 
00069   const PDBElement &GetPDBElementByName(const char *name);
00070 
00072   bool FindPDBElementByName(const char *name);
00073 
00074 protected:
00075   const PDBElement& GetPDBEEnd() const;
00076 
00077 private:
00078   int readprotocoldatablock(const char *input, size_t inputlen, bool verbose);
00079   std::vector<PDBElement> InternalPDBDataSet;
00080   static PDBElement PDBEEnd;
00081 };
00082 //-----------------------------------------------------------------------------
00083 inline std::ostream& operator<<(std::ostream &os, const PDBHeader &d)
00084 {
00085   d.Print( os );
00086   return os;
00087 }
00088 
00089 } // end namespace gdcm
00090 //-----------------------------------------------------------------------------
00091 #endif //GDCMPDBHEADER_H

Generated on Fri Mar 30 2012 12:44:04 for GDCM by doxygen 1.8.0
SourceForge.net Logo