comparison Framework/Scene2D/TextureSceneLayer.h @ 584:434ceeb0bcab

layers: InfoPanel, Polyline, Texture
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Apr 2019 17:36:00 +0200
parents
children
comparison
equal deleted inserted replaced
583:f9ac154c5a63 584:434ceeb0bcab
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-2019 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 "ISceneLayer.h"
25 #include "../Toolbox/AffineTransform2D.h"
26
27 #include <Core/Images/ImageAccessor.h>
28 #include <memory>
29
30 namespace OrthancStone
31 {
32 class TextureSceneLayer : public ISceneLayer
33 {
34 private:
35 std::auto_ptr<Orthanc::ImageAccessor> texture_;
36 double originX_;
37 double originY_;
38 double pixelSpacingX_;
39 double pixelSpacingY_;
40 double angle_;
41 bool isLinearInterpolation_;
42
43 public:
44 TextureSceneLayer(const Orthanc::ImageAccessor& texture,
45 double originX, // Center of the top-left pixel
46 double originY,
47 double pixelSpacingX,
48 double pixelSpacingY,
49 double angle,
50 bool isLinearInterpolation);
51
52 virtual ISceneLayer* Clone() const;
53
54 const Orthanc::ImageAccessor& GetTexture() const
55 {
56 return *texture_;
57 }
58
59 AffineTransform2D GetTransform() const;
60
61 bool IsLinearInterpolation() const
62 {
63 return isLinearInterpolation_;
64 }
65
66 virtual Type GetType() const
67 {
68 return Type_Texture;
69 }
70
71 virtual bool GetBoundingBox(Extent2D& target) const;
72
73 virtual uint64_t GetRevision() const
74 {
75 return 0;
76 }
77 };
78 }