comparison OrthancStone/Sources/Oracle/ParseDicomFromFileCommand.h @ 1512:244ad1e4e76a

reorganization of folders
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 07 Jul 2020 16:21:02 +0200
parents Framework/Oracle/ParseDicomFromFileCommand.h@121d01aa328e
children 85e117739eca
comparison
equal deleted inserted replaced
1511:9dfeee74c1e6 1512:244ad1e4e76a
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
24 #include "OracleCommandBase.h"
25 #include "../Loaders/DicomSource.h"
26
27 #include <string>
28
29 namespace OrthancStone
30 {
31 class ParseDicomFromFileCommand : public OracleCommandBase
32 {
33 private:
34 DicomSource source_;
35 std::string path_;
36 bool pixelDataIncluded_;
37
38 ParseDicomFromFileCommand(const ParseDicomFromFileCommand& other) :
39 source_(other.source_),
40 path_(other.path_),
41 pixelDataIncluded_(other.pixelDataIncluded_)
42 {
43 }
44
45 public:
46 ParseDicomFromFileCommand(const DicomSource& source,
47 const std::string& path) :
48 source_(source),
49 path_(path),
50 pixelDataIncluded_(true)
51 {
52 }
53
54 ParseDicomFromFileCommand(const DicomSource& source,
55 const std::string& dicomDirPath,
56 const std::string& file) :
57 source_(source),
58 path_(GetDicomDirPath(dicomDirPath, file)),
59 pixelDataIncluded_(true)
60 {
61 }
62
63 static std::string GetDicomDirPath(const std::string& dicomDirPath,
64 const std::string& file);
65
66 virtual Type GetType() const
67 {
68 return Type_ParseDicomFromFile;
69 }
70
71 virtual IOracleCommand* Clone() const
72 {
73 return new ParseDicomFromFileCommand(*this);
74 }
75
76 const DicomSource& GetSource() const
77 {
78 return source_;
79 }
80
81 const std::string& GetPath() const
82 {
83 return path_;
84 }
85
86 bool IsPixelDataIncluded() const
87 {
88 return pixelDataIncluded_;
89 }
90
91 void SetPixelDataIncluded(bool included)
92 {
93 pixelDataIncluded_ = included;
94 }
95 };
96 }