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 
19 namespace odil
20 {
21 
22 namespace webservices
23 {
24 
26 class ODIL_API Selector
27 {
28 public:
29 
31  Selector(
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 
81 private:
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
odil::operator==
bool operator==(Value::DataSets const &left, Value::DataSets const &right)
Equality test.
odil
Definition: Association.h:24
ODIL_API
#define ODIL_API
Definition: odil.h:28
odil.h
odil::webservices::Selector
Target (in the DICOM data model) of the request.
Definition: Selector.h:38
odil::operator!=
bool operator!=(Value::DataSets const &left, Value::DataSets const &right)
Difference test.