comparison Plugins/Samples/GdcmDecoder/OrthancImageWrapper.h @ 1840:859224214616

simplification of the sample plugin
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 30 Nov 2015 10:34:04 +0100
parents 7f68b04c79e8
children b1291df2f780
comparison
equal deleted inserted replaced
1839:7f68b04c79e8 1840:859224214616
29 class OrthancImageWrapper 29 class OrthancImageWrapper
30 { 30 {
31 private: 31 private:
32 OrthancPluginContext* context_; 32 OrthancPluginContext* context_;
33 OrthancPluginImage* image_; 33 OrthancPluginImage* image_;
34 double slope_;
35 double intercept_;
36 double rowPixelSpacing_;
37 double columnPixelSpacing_;
38 34
39 public: 35 public:
40 OrthancImageWrapper(OrthancPluginContext* context, 36 OrthancImageWrapper(OrthancPluginContext* context,
41 OrthancPluginPixelFormat format, 37 OrthancPluginPixelFormat format,
42 uint32_t width, 38 uint32_t width,
43 uint32_t height); 39 uint32_t height);
44 40
45 OrthancImageWrapper(OrthancPluginContext* context, 41 OrthancImageWrapper(OrthancPluginContext* context,
46 GdcmImageDecoder& decoder, 42 OrthancPluginImage* image); // Takes ownership
47 unsigned int frameIndex);
48 43
49 ~OrthancImageWrapper(); 44 ~OrthancImageWrapper();
50 45
51 OrthancPluginContext* GetContext() 46 OrthancPluginContext* GetContext()
52 { 47 {
62 uint32_t GetPitch(); 57 uint32_t GetPitch();
63 58
64 OrthancPluginPixelFormat GetFormat(); 59 OrthancPluginPixelFormat GetFormat();
65 60
66 char* GetBuffer(); 61 char* GetBuffer();
67
68 double GetSlope() const
69 {
70 return slope_;
71 }
72
73 double GetIntercept() const
74 {
75 return intercept_;
76 }
77
78 double GetRowPixelSpacing() const
79 {
80 return rowPixelSpacing_;
81 }
82
83 double GetColumnPixelSpacing() const
84 {
85 return columnPixelSpacing_;
86 }
87 }; 62 };
88 } 63 }