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"
22
23namespace odil
24{
25
26namespace webservices
27{
28
31{
32public:
35
37 WADORSResponse(HTTPResponse const & response);
38
39 WADORSResponse(WADORSResponse const &) =default;
41 ~WADORSResponse() =default;
43
45 bool operator==(WADORSResponse const & other) const;
46 //
48 bool operator!=(WADORSResponse const & other) const;
49
52
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
79
86 void respond_dicom(Representation representation);
87
90
93 std::string const & media_type="application/octet-stream");
94
97
98private:
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
std::vector< std::shared_ptr< DataSet > > DataSets
Data sets container.
Definition: Value.h:60
HTTP Response.
Definition: HTTPResponse.h:25
WADO-RS response generator and parser.
Definition: WADORSResponse.h:31
bool operator!=(WADORSResponse const &other) const
Difference operator.
void set_bulk_data(std::vector< BulkData > const &bulk_data)
Set the response items.
bool is_partial() const
Return whether the requested content is partially transferred.
std::vector< BulkData > const & get_bulk_data() const
Get the response items.
void respond_bulk_data()
Prepare a bulk data response.
WADORSResponse(WADORSResponse &&)=default
void set_partial(bool partial)
Set whether the requested content is partially transferred.
Value::DataSets & get_data_sets()
Modify the response items.
WADORSResponse(WADORSResponse const &)=default
std::vector< BulkData > & get_bulk_data()
Modify the response items.
Type get_type() const
Return the response type.
HTTPResponse get_http_response() const
Generate the associated HTTP response.
WADORSResponse(HTTPResponse const &response)
Parse an HTTPResponse as a WADORSResponse.
bool operator==(WADORSResponse const &other) const
Equality operator.
void respond_pixel_data(std::string const &media_type="application/octet-stream")
Prepare a pixel data response.
void respond_dicom(Representation representation)
Prepare a DICOM response.
Representation const & get_representation() const
Return the representation.
Value::DataSets const & get_data_sets() const
Get the response items.
WADORSResponse & operator=(WADORSResponse &&)=default
void set_data_sets(Value::DataSets const &data_sets)
Set the response items.
Representation
Data representation for DICOM requests and responses.
Definition: Utils.h:36
Type
Type of the request or response (use for WADO & QIDO).
Definition: Utils.h:27
Definition: Association.h:25
#define ODIL_API
Definition: odil.h:28