gdcmPresentationContext.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 GDCMPRESENTATIONCONTEXT_H
#define GDCMPRESENTATIONCONTEXT_H
#include "gdcmTypes.h"
#include "gdcmUIDs.h"
#include <vector>
namespace gdcm
{
class GDCM_EXPORT PresentationContext
{
public:
PresentationContext();
PresentationContext( UIDs::TSName asname,
UIDs::TSName tsname = UIDs::ImplicitVRLittleEndianDefaultTransferSyntaxforDICOM );
void SetAbstractSyntax( const char *absyn ) { AbstractSyntax = absyn; }
const char *GetAbstractSyntax() const { return AbstractSyntax.c_str(); }
void AddTransferSyntax( const char *tsstr );
typedef std::vector<std::string> TransferSyntaxArrayType;
typedef TransferSyntaxArrayType::size_type SizeType;
const char *GetTransferSyntax(SizeType i) const { return TransferSyntaxes[i].c_str(); }
SizeType GetNumberOfTransferSyntaxes() const { return TransferSyntaxes.size(); }
void SetPresentationContextID( uint8_t id );
uint8_t GetPresentationContextID() const;
void Print(std::ostream &os) const;
bool operator==(const PresentationContext & pc) const
{
assert( TransferSyntaxes.size() == 1 ); // TODO
assert( pc.TransferSyntaxes.size() == 1 );
return AbstractSyntax == pc.AbstractSyntax && TransferSyntaxes == pc.TransferSyntaxes;
}
protected :
std::string AbstractSyntax;
std::vector<std::string> TransferSyntaxes;
uint8_t /*PresentationContext*/ID;
};
} // end namespace gdcm
#endif //GDCMPRESENTATIONCONTEXT_H
gdcm::PresentationContext::PresentationContext
PresentationContext(UIDs::TSName asname, UIDs::TSName tsname=UIDs::ImplicitVRLittleEndianDefaultTransferSyntaxforDICOM)
gdcm::PresentationContext::operator==
bool operator==(const PresentationContext &pc) const
Definition gdcmPresentationContext.h:54
gdcm::PresentationContext::SizeType
TransferSyntaxArrayType::size_type SizeType
Definition gdcmPresentationContext.h:45
gdcm::PresentationContext::PresentationContext
PresentationContext()
gdcm::PresentationContext::ID
uint8_t ID
Definition gdcmPresentationContext.h:64
gdcm::PresentationContext::TransferSyntaxArrayType
std::vector< std::string > TransferSyntaxArrayType
Definition gdcmPresentationContext.h:44
gdcm::PresentationContext::SetAbstractSyntax
void SetAbstractSyntax(const char *absyn)
Definition gdcmPresentationContext.h:40
gdcm::PresentationContext::SetPresentationContextID
void SetPresentationContextID(uint8_t id)
gdcm::PresentationContext::TransferSyntaxes
std::vector< std::string > TransferSyntaxes
Definition gdcmPresentationContext.h:63
gdcm::PresentationContext::AddTransferSyntax
void AddTransferSyntax(const char *tsstr)
gdcm::PresentationContext::Print
void Print(std::ostream &os) const
gdcm::PresentationContext::AbstractSyntax
std::string AbstractSyntax
Definition gdcmPresentationContext.h:62
gdcm::PresentationContext::GetAbstractSyntax
const char * GetAbstractSyntax() const
Definition gdcmPresentationContext.h:41
gdcm::PresentationContext::GetTransferSyntax
const char * GetTransferSyntax(SizeType i) const
Definition gdcmPresentationContext.h:46
gdcm::PresentationContext::GetNumberOfTransferSyntaxes
SizeType GetNumberOfTransferSyntaxes() const
Definition gdcmPresentationContext.h:47
gdcm::PresentationContext::GetPresentationContextID
uint8_t GetPresentationContextID() const
gdcm::UIDs::TSName
TSName
Definition gdcmUIDs.h:501
gdcm::UIDs::ImplicitVRLittleEndianDefaultTransferSyntaxforDICOM
@ ImplicitVRLittleEndianDefaultTransferSyntaxforDICOM
Definition gdcmUIDs.h:503
gdcmTypes.h
gdcmUIDs.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21