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-2009 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;
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 Thu Jul 1 06:40:25 2010 for GDCM by doxygen 1.6.3
SourceForge.net Logo