Odil
A C++11 library for the DICOM standard
WADORSResponse.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 _91f4f1d4_f2ff_48a2_8918_ade8aa161233
10 #define _91f4f1d4_f2ff_48a2_8918_ade8aa161233
11 
12 #include <string>
13 #include <vector>
14 
15 #include "odil/DataSet.h"
16 #include "odil/Element.h"
17 #include "odil/odil.h"
18 #include "odil/Value.h"
21 #include "odil/webservices/Utils.h"
22 
23 namespace odil
24 {
25 
26 namespace webservices
27 {
28 
30 class ODIL_API WADORSResponse
31 {
32 public:
34  WADORSResponse();
35 
37  WADORSResponse(HTTPResponse const & response);
38 
39  WADORSResponse(WADORSResponse const &) =default;
40  WADORSResponse(WADORSResponse &&) =default;
41  ~WADORSResponse() =default;
42  WADORSResponse & operator=(WADORSResponse &&) =default;
43 
45  bool operator==(WADORSResponse const & other) const;
46  //
48  bool operator!=(WADORSResponse const & other) const;
49 
51  Value::DataSets const & get_data_sets() const;
52 
54  Value::DataSets & get_data_sets();
55 
57  void set_data_sets(Value::DataSets const & data_sets);
58 
60  std::vector<BulkData> const & get_bulk_data() const;
61 
63  std::vector<BulkData> & get_bulk_data();
64 
66  void set_bulk_data(std::vector<BulkData> const & bulk_data);
67 
69  bool is_partial() const;
70 
72  void set_partial(bool partial);
73 
75  Type get_type() const;
76 
78  Representation const & get_representation() const;
79 
86  void respond_dicom(Representation representation);
87 
89  void respond_bulk_data();
90 
92  void respond_pixel_data(
93  std::string const & media_type="application/octet-stream");
94 
96  HTTPResponse get_http_response() const;
97 
98 private:
99  Value::DataSets _data_sets;
100  std::vector<BulkData> _bulk_data;
101  bool _is_partial;
102  Type _type;
103  Representation _representation;
104  std::string _media_type;
105 };
106 
107 }
108 
109 }
110 
111 #endif //_91f4f1d4_f2ff_48a2_8918_ade8aa161233
112 
odil::operator==
bool operator==(Value::DataSets const &left, Value::DataSets const &right)
Equality test.
odil::webservices::WADORSResponse
WADO-RS response generator and parser.
Definition: WADORSResponse.h:39
odil
Definition: Association.h:23
ODIL_API
#define ODIL_API
Definition: odil.h:27
odil::webservices::HTTPResponse
HTTP Response.
Definition: HTTPResponse.h:33
Element.h
Utils.h
odil.h
odil::webservices::Type
Type
Type of the request or response (use for WADO & QIDO).
Definition: Utils.h:35
BulkData.h
odil::operator!=
bool operator!=(Value::DataSets const &left, Value::DataSets const &right)
Difference test.
odil::Value::DataSets
std::vector< std::shared_ptr< DataSet > > DataSets
Data sets container.
Definition: Value.h:64
HTTPResponse.h
DataSet.h
Value.h
odil::webservices::Representation
Representation
Data representation for DICOM requests and responses.
Definition: Utils.h:44