Odil
A C++11 library for the DICOM standard
PresentationContext.h
Go to the documentation of this file.
1 /*************************************************************************
2  * odil - Copyright (C) Universite de Strasbourg
3  * Distributed under the terms of the CeCILL-B license, as published by
4  * the CEA-CNRS-INRIA. Refer to the LICENSE file or to
5  * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
6  * for details.
7  ************************************************************************/
8 
9 #ifndef _30f1a581_9ae6_4a02_a455_bf2b6ea58bc6
10 #define _30f1a581_9ae6_4a02_a455_bf2b6ea58bc6
11 
12 #include <cstdint>
13 #include <istream>
14 #include <string>
15 #include <vector>
16 
17 #include "odil/odil.h"
18 #include "odil/pdu/Object.h"
19 
20 namespace odil
21 {
22 
23 namespace pdu
24 {
25 
31 {
32 public:
35 
37  PresentationContext(std::istream & stream);
38 
40  virtual ~PresentationContext() =0;
41 
43  uint8_t get_item_type() const;
44 
46  uint8_t get_id() const;
47 
49  void set_id(uint8_t id);
50 
51 protected:
54  std::string const & type, std::string const & value);
55 
57  void _add_fields();
58 
60  std::vector<std::string> _get_syntaxes(std::string const & type) const;
61 
64  std::string const & type, std::vector<std::string> const & syntaxes);
65 };
66 
67 }
68 
69 }
70 
71 #endif // _30f1a581_9ae6_4a02_a455_bf2b6ea58bc6
odil::pdu::PresentationContext::get_item_type
uint8_t get_item_type() const
Return the Item-type.
odil::pdu::Object
Base class for all PDU-related high-level objects (PDU, items and sub-items).
Definition: Object.h:28
odil::pdu::PresentationContext::PresentationContext
PresentationContext()
Constructor.
odil
Definition: Association.h:25
ODIL_API
#define ODIL_API
Definition: odil.h:28
odil::pdu::PresentationContext::set_id
void set_id(uint8_t id)
Set the Presentation context id.
odil.h
odil::pdu::PresentationContext
Presentation Context item, either for a A-ASSOCIATE-RQ PDU (PS 3.8, 9.3.2.2) or for a A-ASSOCIATE-AC ...
Definition: PresentationContext.h:31
odil::pdu::PresentationContext::PresentationContext
PresentationContext(std::istream &stream)
Read from a stream.
odil::pdu::PresentationContext::_add_fields
void _add_fields()
Add common fields.
odil::pdu::PresentationContext::_set_syntaxes
void _set_syntaxes(std::string const &type, std::vector< std::string > const &syntaxes)
Set the Abstract or Transfer syntaxes.
odil::pdu::PresentationContext::~PresentationContext
virtual ~PresentationContext()=0
Destructor, make the class pure virtual.
Object.h
odil::pdu::PresentationContext::_get_syntaxes
std::vector< std::string > _get_syntaxes(std::string const &type) const
Return the Abstract or Transfer syntaxes.
odil::pdu::PresentationContext::_make_string_item
static Item _make_string_item(std::string const &type, std::string const &value)
Create an Abstract Syntax or Transfer Syntax sub-item.
odil::pdu::Item
A sequence of fields forming a full PDU or a part of it.
Definition: Item.h:29
odil::pdu::PresentationContext::get_id
uint8_t get_id() const
Return the Presentation context id.