Odil
A C++11 library for the DICOM standard
xml_converter.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 _61eb6ed2_447a_43b5_a6ba_ca7c2a5fb492
10 #define _61eb6ed2_447a_43b5_a6ba_ca7c2a5fb492
11 
12 #include <functional>
13 #include <utility>
14 
15 #include <boost/property_tree/ptree.hpp>
16 
17 #include "odil/DataSet.h"
18 
19 #include "odil/odil.h"
20 
21 namespace odil
22 {
23 
24 typedef
25  std::function<std::pair<std::string, std::string>(DataSet const &, Tag const &)>
27 
29 ODIL_API boost::property_tree::ptree as_xml(
30  DataSet const & data_set,
31  BulkDataCreator const & bulk_data_creator=BulkDataCreator());
32 
34 ODIL_API DataSet as_dataset(boost::property_tree::ptree const & xml);
35 
36 } // namespace odil
37 
38 #endif // _61eb6ed2_447a_43b5_a6ba_ca7c2a5fb492
Definition: Association.h:24
#define ODIL_API
Definition: odil.h:28
DataSet as_dataset(Json::Value const &json)
Create a data set from its JSON representation.
std::function< std::pair< std::string, std::string >DataSet const &, Tag const &)> BulkDataCreator
Definition: xml_converter.h:26
boost::property_tree::ptree as_xml(DataSet const &data_set, BulkDataCreator const &bulk_data_creator=BulkDataCreator())
Convert a data set to its XML representation.