Odil
A C++11 library for the DICOM standard
Loading...
Searching...
No Matches
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
20namespace odil
21{
22
23namespace pdu
24{
25
31{
32public:
35
37 PresentationContext(std::istream & stream);
38
41
43 uint8_t get_item_type() const;
44
46 uint8_t get_id() const;
47
49 void set_id(uint8_t id);
50
51protected:
54 std::string const & type, std::string const & value);
55
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
A sequence of fields forming a full PDU or a part of it.
Definition Item.h:29
Base class for all PDU-related high-level objects (PDU, items and sub-items).
Definition Object.h:28
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
static Item _make_string_item(std::string const &type, std::string const &value)
Create an Abstract Syntax or Transfer Syntax sub-item.
std::vector< std::string > _get_syntaxes(std::string const &type) const
Return the Abstract or Transfer syntaxes.
uint8_t get_id() const
Return the Presentation context id.
void set_id(uint8_t id)
Set the Presentation context id.
PresentationContext(std::istream &stream)
Read from a stream.
void _set_syntaxes(std::string const &type, std::vector< std::string > const &syntaxes)
Set the Abstract or Transfer syntaxes.
virtual ~PresentationContext()=0
Destructor, make the class pure virtual.
uint8_t get_item_type() const
Return the Item-type.
void _add_fields()
Add common fields.
Definition Association.h:25
#define ODIL_API
Definition odil.h:28