Odil
A C++11 library for the DICOM standard
Selector.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 _b1a6d333_684d_4b50_a9b9_68af24027a10
10#define _b1a6d333_684d_4b50_a9b9_68af24027a10
11
12#include <string>
13#include <utility>
14#include <vector>
15#include <map>
16
17#include "odil/odil.h"
18
19namespace odil
20{
21
22namespace webservices
23{
24
27{
28public:
29
32 std::map<std::string, std::string> const & selector={},
33 std::vector<int> const & frames={});
34
35 Selector(Selector const &) = default;
36 Selector(Selector &&) = default;
37 Selector & operator=(Selector const &) = default;
38 Selector & operator=(Selector &&) = default;
39 ~Selector() = default;
40
42 static std::pair<std::string, Selector> from_path(std::string const & path);
43
45 bool operator==(Selector const & other) const;
46
48 bool operator!=(Selector const & other) const;
49
54 std::string get_path(bool include_frames) const;
55
57 bool is_study_present() const;
59 bool is_series_present() const;
61 bool is_instance_present() const;
62
64 std::string const & get_study() const;
66 std::string const & get_series() const;
68 std::string const & get_instance() const;
70 std::vector<int> const & get_frames() const;
71
73 Selector & set_study(std::string const & study);
75 Selector & set_series(std::string const & series);
77 Selector & set_instance(std::string const & instance);
79 Selector & set_frames(std::vector<int> const & frames);
80
81private:
82 std::string _study;
83 std::string _series;
84 std::string _instance;
85 std::vector<int> _frames;
86 bool _study_present;
87 bool _series_present;
88 bool _instance_present;
89};
90
91}
92
93}
94
95#endif // _b1a6d333_684d_4b50_a9b9_68af24027a10
Target (in the DICOM data model) of the request.
Definition: Selector.h:27
bool operator==(Selector const &other) const
Equality operator.
bool operator!=(Selector const &other) const
Difference operator.
std::vector< int > const & get_frames() const
return the wanted frames
Selector(Selector const &)=default
Selector & operator=(Selector &&)=default
static std::pair< std::string, Selector > from_path(std::string const &path)
Build selector from URL path, return service path and selector.
Selector(std::map< std::string, std::string > const &selector={}, std::vector< int > const &frames={})
Default constructor.
bool is_instance_present() const
return if instance field is present in the selector
std::string get_path(bool include_frames) const
Return the associated URL path, with the optional "frames" component.
std::string const & get_study() const
return the wanted study
Selector & operator=(Selector const &)=default
Selector & set_series(std::string const &series)
set the wanted series
std::string const & get_instance() const
return the wanted instance
Selector(Selector &&)=default
Selector & set_frames(std::vector< int > const &frames)
set the wanted frames
Selector & set_study(std::string const &study)
set the wanted study
bool is_study_present() const
return if study field is present in the selector
std::string const & get_series() const
return the wanted series
Selector & set_instance(std::string const &instance)
set the wanted instance
bool is_series_present() const
return if series field is present in the selector
Definition: Association.h:25
#define ODIL_API
Definition: odil.h:28