Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Toolbox/OrthancDatasets/OrthancNativeDataset.h @ 2174:2410a171ebfb
refactoring using DicomWebDataset and OrthancNativeDataset
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 22 Oct 2024 21:52:34 +0200 |
parents | |
children | c5f94c10cd61 |
comparison
equal
deleted
inserted
replaced
2172:239fb2c893c1 | 2174:2410a171ebfb |
---|---|
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-2023 Osimis S.A., Belgium | |
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | |
7 * | |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU Lesser General Public License | |
10 * as published by the Free Software Foundation, either version 3 of | |
11 * the License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * Lesser General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU Lesser General Public | |
19 * License along with this program. If not, see | |
20 * <http://www.gnu.org/licenses/>. | |
21 **/ | |
22 | |
23 | |
24 #pragma once | |
25 | |
26 #include "IDicomDataset.h" | |
27 | |
28 #include <DicomFormat/DicomMap.h> | |
29 | |
30 | |
31 namespace OrthancStone | |
32 { | |
33 class OrthancNativeDataset : public IDicomDataset | |
34 { | |
35 private: | |
36 std::unique_ptr<Orthanc::DicomMap> dicom_; | |
37 | |
38 const Json::Value* LookupValue(std::string& type, | |
39 const Orthanc::DicomPath& path) const; | |
40 | |
41 public: | |
42 OrthancNativeDataset(const Orthanc::DicomMap& dicom) : | |
43 dicom_(dicom.Clone()) | |
44 { | |
45 } | |
46 | |
47 OrthancNativeDataset(const Json::Value& dicom); | |
48 | |
49 virtual bool GetStringValue(std::string& result, | |
50 const Orthanc::DicomPath& path) const ORTHANC_OVERRIDE; | |
51 | |
52 virtual bool GetSequenceSize(size_t& size, | |
53 const Orthanc::DicomPath& path) const ORTHANC_OVERRIDE; | |
54 }; | |
55 } |