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

Generated on Sat Dec 4 2010 08:58:45 for GDCM by doxygen 1.7.2
SourceForge.net Logo