gdcmPDBHeader.h
Go to the documentation of this file.
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef GDCMPDBHEADER_H
#define GDCMPDBHEADER_H
#include "gdcmTypes.h"
#include "gdcmDataSet.h"
#include "gdcmPDBElement.h"
namespace gdcm
{
/*
* Everything done in this code is for the sole purpose of writing interoperable
* software under Sect. 1201 (f) Reverse Engineering exception of the DMCA.
* If you believe anything in this code violates any law or any of your rights,
* please contact us (gdcm-developers@lists.sourceforge.net) so that we can
* find a solution.
*/
//-----------------------------------------------------------------------------
class DataElement;
class PrivateTag;
class GDCM_EXPORT PDBHeader
{
friend std::ostream& operator<<(std::ostream &_os, const PDBHeader &d);
public :
PDBHeader() = default;
~PDBHeader() = default;
bool LoadFromDataElement(DataElement const &de);
void Print(std::ostream &os) const;
static const PrivateTag & GetPDBInfoTag();
const PDBElement &GetPDBElementByName(const char *name);
bool FindPDBElementByName(const char *name);
protected:
const PDBElement& GetPDBEEnd() const;
private:
int readprotocoldatablock(const char *input, size_t inputlen, bool verbose);
std::vector<PDBElement> InternalPDBDataSet;
static PDBElement PDBEEnd;
bool IsXML;
std::string xmltxt;
};
//-----------------------------------------------------------------------------
inline std::ostream& operator<<(std::ostream &os, const PDBHeader &d)
{
d.Print( os );
return os;
}
} // end namespace gdcm
//-----------------------------------------------------------------------------
#endif //GDCMPDBHEADER_H
gdcm::DataElement
Class to represent a Data Element either Implicit or Explicit.
Definition gdcmDataElement.h:59
gdcm::PDBElement
Class to represent a PDB Element.
Definition gdcmPDBElement.h:30
gdcm::PDBHeader::GetPDBElementByName
const PDBElement & GetPDBElementByName(const char *name)
gdcm::PDBHeader::Print
void Print(std::ostream &os) const
Print.
gdcm::PDBHeader::GetPDBInfoTag
static const PrivateTag & GetPDBInfoTag()
Return the Private Tag where the PDB header is stored within a DICOM DataSet.
gdcm::PDBHeader::GetPDBEEnd
const PDBElement & GetPDBEEnd() const
gdcm::PDBHeader::FindPDBElementByName
bool FindPDBElementByName(const char *name)
Return true if the PDB element matching name is found or not.
gdcm::PDBHeader::operator<<
friend std::ostream & operator<<(std::ostream &_os, const PDBHeader &d)
Definition gdcmPDBHeader.h:87
gdcm::PDBHeader::~PDBHeader
~PDBHeader()=default
gdcm::PDBHeader::LoadFromDataElement
bool LoadFromDataElement(DataElement const &de)
Load the PDB Header from a DataElement of a DataSet.
gdcm::PDBHeader::PDBHeader
PDBHeader()=default
gdcm::PrivateTag
Class to represent a Private DICOM Data Element (Attribute) Tag (Group, Element, Owner).
Definition gdcmPrivateTag.h:39
gdcmDataSet.h
gdcmPDBElement.h
gdcmTypes.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21
gdcm::operator<<
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition gdcmDirectory.h:88