comparison OrthancStone/Sources/Oracle/ParseDicomSuccessMessage.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/ParseDicomSuccessMessage.h@121d01aa328e
children 4fb8fdf03314
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 "../OrthancStone.h"
25
26 #if !defined(ORTHANC_ENABLE_DCMTK)
27 # error The macro ORTHANC_ENABLE_DCMTK must be defined
28 #endif
29
30 #if ORTHANC_ENABLE_DCMTK != 1
31 # error Support for DCMTK must be enabled to use ParseDicomFromFileCommand
32 #endif
33
34 #include "OracleCommandBase.h"
35 #include "../Messages/IMessageEmitter.h"
36 #include "../Messages/IObserver.h"
37
38 #include <map>
39
40 namespace Orthanc
41 {
42 class ParsedDicomFile;
43 }
44
45 namespace OrthancStone
46 {
47 class DicomSource;
48
49 class ParseDicomSuccessMessage : public OriginMessage<OracleCommandBase>
50 {
51 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__);
52
53 private:
54 const DicomSource& source_;
55 Orthanc::ParsedDicomFile& dicom_;
56 size_t fileSize_;
57 bool hasPixelData_;
58
59 public:
60 ParseDicomSuccessMessage(const OracleCommandBase& command,
61 const DicomSource& source,
62 Orthanc::ParsedDicomFile& dicom,
63 size_t fileSize,
64 bool hasPixelData) :
65 OriginMessage(command),
66 source_(source),
67 dicom_(dicom),
68 fileSize_(fileSize),
69 hasPixelData_(hasPixelData)
70 {
71 }
72
73 const DicomSource& GetSource() const
74 {
75 return source_;
76 }
77
78 Orthanc::ParsedDicomFile& GetDicom() const
79 {
80 return dicom_;
81 }
82
83 size_t GetFileSize() const
84 {
85 return fileSize_;
86 }
87
88 bool HasPixelData() const
89 {
90 return hasPixelData_;
91 }
92
93 static Orthanc::ParsedDicomFile* ParseWadoAnswer(size_t& fileSize /* OUT */,
94 const std::string& answer,
95 const std::map<std::string, std::string>& headers);
96 };
97 }