Odil
A C++11 library for the DICOM standard
WADORSRequest.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 _32b5f072_8ebb_4df1_925d_abd5f0535eb6
10 #define _32b5f072_8ebb_4df1_925d_abd5f0535eb6
11 
12 #include <string>
13 #include <vector>
14 
15 #include "odil/odil.h"
18 #include "odil/webservices/URL.h"
19 #include "odil/webservices/Utils.h"
20 
21 namespace odil
22 {
23 
24 namespace webservices
25 {
26 
29 {
30 public:
33  URL const & base_url, std::string const & transfer_syntax="",
34  std::string const & character_set="",
35  bool include_media_type_in_query=false,
36  bool include_character_set_in_query=false);
37 
39  WADORSRequest(HTTPRequest const & request);
40 
42  bool operator==(WADORSRequest const & other) const;
43 
45  bool operator!=(WADORSRequest const & other) const;
46 
48  URL const & get_base_url() const;
49 
51  void set_base_url(URL const & url);
52 
54  std::string const & get_transfer_syntax() const;
55 
57  void set_transfer_syntax(std::string const & transfer_syntax);
58 
60  std::string const & get_character_set() const;
61 
63  void set_character_set(std::string const & character_set);
64 
66  bool get_include_media_type_in_query() const;
67 
69  void set_include_media_type_in_query(bool include_media_type_in_query);
70 
72  bool get_include_character_set_in_query() const;
73 
75  void set_include_character_set_in_query(bool include_charcter_set_in_query);
76 
78  Type get_type() const;
79 
81  Selector const & get_selector() const;
82 
84  URL const & get_url() const;
85 
87  std::string const & get_media_type() const;
88 
90  Representation const & get_representation() const;
91 
93  void request_dicom(
94  Representation representation, Selector const & selector);
95 
97  void request_bulk_data(Selector const & selector);
98 
100  void request_bulk_data(URL const & url);
101 
103  void request_pixel_data(
104  Selector const & selector,
105  std::string const & media_type="application/octet-stream");
106 
108  HTTPRequest get_http_request() const;
109 
110 private:
111  URL _base_url;
112  std::string _transfer_syntax;
113  std::string _character_set;
114  bool _include_media_type_in_query;
115  bool _include_character_set_in_query;
116 
117  Selector _selector;
118  URL _url;
119  std::string _media_type;
120  Representation _representation;
121  Type _type;
122 
124  static bool _is_selector_valid(Selector const & selector);
125 };
126 
127 }
128 
129 }
130 
131 #endif // _32b5f072_8ebb_4df1_925d_abd5f0535eb6
HTTP request.
Definition: HTTPRequest.h:25
bool operator!=(Value::DataSets const &left, Value::DataSets const &right)
Difference test.
Definition: Association.h:24
WADO-RS request generator and parser.
Definition: WADORSRequest.h:28
Uniform resource locator.
Definition: URL.h:25
#define ODIL_API
Definition: odil.h:28
Type
Type of the request or response (use for WADO & QIDO).
Definition: Utils.h:26
bool operator==(Value::DataSets const &left, Value::DataSets const &right)
Equality test.
Representation
Data representation for DICOM requests and responses.
Definition: Utils.h:35
Target (in the DICOM data model) of the request.
Definition: Selector.h:26