comparison Framework/Scene2D/ColorTextureSceneLayer.h @ 590:5430bcffba57

FloatTextureSceneLayer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 26 Apr 2019 11:33:57 +0200
parents 2a8ac2d426db
children 55411e7da2f7
comparison
equal deleted inserted replaced
589:3080ec4ec6b9 590:5430bcffba57
19 **/ 19 **/
20 20
21 21
22 #pragma once 22 #pragma once
23 23
24 #include "ISceneLayer.h" 24 #include "TextureBaseSceneLayer.h"
25 #include "../Toolbox/AffineTransform2D.h"
26
27 #include <Core/Images/ImageAccessor.h>
28 #include <memory>
29 25
30 namespace OrthancStone 26 namespace OrthancStone
31 { 27 {
32 class ColorTextureSceneLayer : public ISceneLayer 28 class ColorTextureSceneLayer : public TextureBaseSceneLayer
33 { 29 {
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: 30 public:
44 ColorTextureSceneLayer(const Orthanc::ImageAccessor& texture, 31 ColorTextureSceneLayer(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 32
52 virtual ISceneLayer* Clone() const; 33 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 34
66 virtual Type GetType() const 35 virtual Type GetType() const
67 { 36 {
68 return Type_ColorTexture; 37 return Type_ColorTexture;
69 } 38 }
70
71 virtual bool GetBoundingBox(Extent2D& target) const;
72
73 virtual uint64_t GetRevision() const
74 {
75 return 0;
76 }
77 }; 39 };
78 } 40 }