Odil
A C++11 library for the DICOM standard
Toggle main menu visibility
Loading...
Searching...
No Matches
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
"
19
#include "
odil/webservices/BulkData.h
"
20
#include "
odil/webservices/HTTPResponse.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
BulkData.h
DataSet.h
Element.h
HTTPResponse.h
Utils.h
Value.h
odil::Value::DataSets
std::vector< std::shared_ptr< DataSet > > DataSets
Data sets container.
Definition
Value.h:60
odil::webservices::HTTPResponse
HTTP Response.
Definition
HTTPResponse.h:25
odil::webservices::WADORSResponse::operator!=
bool operator!=(WADORSResponse const &other) const
Difference operator.
odil::webservices::WADORSResponse::set_bulk_data
void set_bulk_data(std::vector< BulkData > const &bulk_data)
Set the response items.
odil::webservices::WADORSResponse::is_partial
bool is_partial() const
Return whether the requested content is partially transferred.
odil::webservices::WADORSResponse::get_bulk_data
std::vector< BulkData > const & get_bulk_data() const
Get the response items.
odil::webservices::WADORSResponse::respond_bulk_data
void respond_bulk_data()
Prepare a bulk data response.
odil::webservices::WADORSResponse::WADORSResponse
WADORSResponse(WADORSResponse &&)=default
odil::webservices::WADORSResponse::set_partial
void set_partial(bool partial)
Set whether the requested content is partially transferred.
odil::webservices::WADORSResponse::get_data_sets
Value::DataSets & get_data_sets()
Modify the response items.
odil::webservices::WADORSResponse::WADORSResponse
WADORSResponse(WADORSResponse const &)=default
odil::webservices::WADORSResponse::get_bulk_data
std::vector< BulkData > & get_bulk_data()
Modify the response items.
odil::webservices::WADORSResponse::get_type
Type get_type() const
Return the response type.
odil::webservices::WADORSResponse::get_http_response
HTTPResponse get_http_response() const
Generate the associated HTTP response.
odil::webservices::WADORSResponse::~WADORSResponse
~WADORSResponse()=default
odil::webservices::WADORSResponse::WADORSResponse
WADORSResponse(HTTPResponse const &response)
Parse an HTTPResponse as a WADORSResponse.
odil::webservices::WADORSResponse::operator==
bool operator==(WADORSResponse const &other) const
Equality operator.
odil::webservices::WADORSResponse::respond_pixel_data
void respond_pixel_data(std::string const &media_type="application/octet-stream")
Prepare a pixel data response.
odil::webservices::WADORSResponse::respond_dicom
void respond_dicom(Representation representation)
Prepare a DICOM response.
odil::webservices::WADORSResponse::WADORSResponse
WADORSResponse()
Constructor.
odil::webservices::WADORSResponse::get_representation
Representation const & get_representation() const
Return the representation.
odil::webservices::WADORSResponse::get_data_sets
Value::DataSets const & get_data_sets() const
Get the response items.
odil::webservices::WADORSResponse::operator=
WADORSResponse & operator=(WADORSResponse &&)=default
odil::webservices::WADORSResponse::set_data_sets
void set_data_sets(Value::DataSets const &data_sets)
Set the response items.
odil::webservices
Definition
BulkData.h:20
odil::webservices::Representation
Representation
Data representation for DICOM requests and responses.
Definition
Utils.h:36
odil::webservices::Type
Type
Type of the request or response (use for WADO & QIDO).
Definition
Utils.h:27
odil
Definition
Association.h:25
odil.h
ODIL_API
#define ODIL_API
Definition
odil.h:28
src
odil
webservices
WADORSResponse.h
Generated by
1.17.0