comparison Framework/Toolbox/Slice.h @ 73:ffa6dded91bd wasm

reorganization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 24 May 2017 11:59:24 +0200
parents
children f5f54ed8d307
comparison
equal deleted inserted replaced
72:c1cc3bdba18c 73:ffa6dded91bd
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 Osimis, 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 "SliceGeometry.h"
25 #include "DicomFrameConverter.h"
26
27 namespace OrthancStone
28 {
29 class Slice
30 {
31 private:
32 enum Type
33 {
34 Type_Invalid,
35 Type_OrthancInstance
36 // TODO A slice could come from some DICOM file (URL)
37 };
38
39 Type type_;
40 std::string orthancInstanceId_;
41 unsigned int frame_;
42 SliceGeometry geometry_;
43 double pixelSpacingX_;
44 double pixelSpacingY_;
45 double thickness_;
46 unsigned int width_;
47 unsigned int height_;
48 DicomFrameConverter converter_;
49
50 public:
51 Slice() : type_(Type_Invalid)
52 {
53 }
54
55 bool ParseOrthancFrame(const OrthancPlugins::IDicomDataset& dataset,
56 const std::string& instanceId,
57 unsigned int frame);
58
59 bool IsOrthancInstance() const
60 {
61 return type_ == Type_OrthancInstance;
62 }
63
64 const std::string GetOrthancInstanceId() const;
65
66 unsigned int GetFrame() const;
67
68 const SliceGeometry& GetGeometry() const;
69
70 double GetThickness() const;
71
72 double GetPixelSpacingX() const;
73
74 double GetPixelSpacingY() const;
75
76 unsigned int GetWidth() const;
77
78 unsigned int GetHeight() const;
79
80 const DicomFrameConverter& GetConverter() const;
81 };
82 }