odil
C++11libraryfortheDICOMstandard
VRFinder.h
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 _b7afd80f_327e_4d9a_b0fa_88c565add7b3
10 #define _b7afd80f_327e_4d9a_b0fa_88c565add7b3
11 
12 #include <functional>
13 #include <string>
14 #include <vector>
15 
16 #include "odil/DataSet.h"
17 #include "odil/odil.h"
18 #include "odil/Tag.h"
19 #include "odil/VR.h"
20 
21 namespace odil
22 {
23 
25 class ODIL_API VRFinder
26 {
27 public:
33  typedef
34  std::function<VR(Tag const &, DataSet const &, std::string const &)>
36 
38  static std::vector<Finder> const default_finders;
39 
41  std::vector<Finder> finders;
42 
44  VRFinder();
45 
52  VR operator()(
53  Tag const & tag, DataSet const & data_set,
54  std::string const & transfer_syntax) const;
55 
57  static VR public_dictionary(
58  Tag const & tag, DataSet const &, std::string const &);
59 
61  static VR group_length(
62  Tag const & tag, DataSet const &, std::string const &);
63 
65  static VR private_tag(
66  Tag const & tag, DataSet const &, std::string const &);
67 
69  static VR implicit_vr_little_endian(
70  Tag const & tag, DataSet const & data_set,
71  std::string const & transfer_syntax);
72 
74  static VR explicit_vr_little_endian(
75  Tag const & tag, DataSet const & data_set,
76  std::string const & transfer_syntax);
77 
78 private:
79  static std::vector<Finder> _get_default_finders();
80 };
81 
82 }
83 
84 #endif // _b7afd80f_327e_4d9a_b0fa_88c565add7b3
Definition: Association.cpp:39
A DICOM element tag.
Definition: Tag.h:24
std::vector< Finder > finders
User-defined finder functions, empty by default.
Definition: VRFinder.h:41
static std::vector< Finder > const default_finders
Default finder functions.
Definition: VRFinder.h:38
std::function< VR(Tag const &, DataSet const &, std::string const &)> Finder
Prototype of finder functions.
Definition: VRFinder.h:35
DICOM Data set.
Definition: DataSet.h:29
Find the VR of elements in an implicit VR data set.
Definition: VRFinder.h:25