Mercurial > hg > orthanc
annotate Plugins/Samples/GdcmDecoder/OrthancImageWrapper.h @ 1839:7f68b04c79e8
getter for context
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 27 Nov 2015 18:17:31 +0100 |
parents | 2137df64a64c |
children | 859224214616 |
rev | line source |
---|---|
1834 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * | |
6 * This program is free software: you can redistribute it and/or | |
7 * modify it under the terms of the GNU General Public License as | |
8 * published by the Free Software Foundation, either version 3 of the | |
9 * License, or (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, but | |
12 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 **/ | |
19 | |
20 | |
21 #pragma once | |
22 | |
23 #include <orthanc/OrthancCPlugin.h> | |
24 | |
1836 | 25 #include "GdcmImageDecoder.h" |
26 | |
1834 | 27 namespace OrthancPlugins |
28 { | |
29 class OrthancImageWrapper | |
30 { | |
31 private: | |
32 OrthancPluginContext* context_; | |
33 OrthancPluginImage* image_; | |
1836 | 34 double slope_; |
35 double intercept_; | |
36 double rowPixelSpacing_; | |
37 double columnPixelSpacing_; | |
1834 | 38 |
39 public: | |
40 OrthancImageWrapper(OrthancPluginContext* context, | |
41 OrthancPluginPixelFormat format, | |
42 uint32_t width, | |
43 uint32_t height); | |
44 | |
45 OrthancImageWrapper(OrthancPluginContext* context, | |
1836 | 46 GdcmImageDecoder& decoder, |
47 unsigned int frameIndex); | |
1834 | 48 |
49 ~OrthancImageWrapper(); | |
50 | |
1839
7f68b04c79e8
getter for context
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1838
diff
changeset
|
51 OrthancPluginContext* GetContext() |
7f68b04c79e8
getter for context
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1838
diff
changeset
|
52 { |
7f68b04c79e8
getter for context
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1838
diff
changeset
|
53 return context_; |
7f68b04c79e8
getter for context
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1838
diff
changeset
|
54 } |
7f68b04c79e8
getter for context
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1838
diff
changeset
|
55 |
1834 | 56 OrthancPluginImage* Release(); |
57 | |
58 uint32_t GetWidth(); | |
59 | |
60 uint32_t GetHeight(); | |
61 | |
62 uint32_t GetPitch(); | |
63 | |
64 OrthancPluginPixelFormat GetFormat(); | |
65 | |
66 char* GetBuffer(); | |
1838 | 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 } | |
1834 | 87 }; |
88 } |