1504
|
1 /**
|
|
2 * Stone of Orthanc
|
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
|
|
4 * Department, University Hospital of Liege, Belgium
|
|
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium
|
|
6 *
|
|
7 * This program is free software: you can redistribute it and/or
|
|
8 * modify it under the terms of the GNU Affero General Public License
|
|
9 * as published by the Free Software Foundation, either version 3 of
|
|
10 * the License, or (at your option) any later version.
|
|
11 *
|
|
12 * This program is distributed in the hope that it will be useful, but
|
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
15 * Affero General Public License for more details.
|
|
16 *
|
|
17 * You should have received a copy of the GNU Affero General Public License
|
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19 **/
|
|
20
|
|
21
|
|
22 #pragma once
|
|
23
|
1571
|
24 #if !defined(ORTHANC_ENABLE_DCMTK)
|
|
25 # error The macro ORTHANC_ENABLE_DCMTK must be defined
|
|
26 #endif
|
|
27
|
|
28 #if ORTHANC_ENABLE_DCMTK != 1
|
|
29 # error Support for DCMTK must be enabled to use SimplifiedOrthancDataset
|
|
30 #endif
|
|
31
|
1504
|
32 #include "IOrthancConnection.h"
|
|
33 #include "IDicomDataset.h"
|
|
34
|
1571
|
35 #include <Compatibility.h> // For ORTHANC_OVERRIDE
|
|
36
|
1504
|
37 namespace OrthancStone
|
|
38 {
|
|
39 class SimplifiedOrthancDataset : public IDicomDataset
|
|
40 {
|
|
41 private:
|
|
42 Json::Value root_;
|
|
43
|
|
44 const Json::Value* LookupPath(const DicomPath& path) const;
|
|
45
|
|
46 void CheckRoot() const;
|
|
47
|
|
48 public:
|
|
49 SimplifiedOrthancDataset(IOrthancConnection& orthanc,
|
|
50 const std::string& uri);
|
|
51
|
1571
|
52 explicit SimplifiedOrthancDataset(const std::string& content);
|
1504
|
53
|
|
54 virtual bool GetStringValue(std::string& result,
|
1571
|
55 const DicomPath& path) const ORTHANC_OVERRIDE;
|
1504
|
56
|
|
57 virtual bool GetSequenceSize(size_t& size,
|
1571
|
58 const DicomPath& path) const ORTHANC_OVERRIDE;
|
1504
|
59 };
|
|
60 }
|