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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1834
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 *
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 * This program is free software: you can redistribute it and/or
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * modify it under the terms of the GNU General Public License as
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * published by the Free Software Foundation, either version 3 of the
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * License, or (at your option) any later version.
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 *
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful, but
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * General Public License for more details.
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 *
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 **/
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 #pragma once
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #include <orthanc/OrthancCPlugin.h>
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
1836
2faa2abbf311 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1834
diff changeset
25 #include "GdcmImageDecoder.h"
2faa2abbf311 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1834
diff changeset
26
1834
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 namespace OrthancPlugins
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 {
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 class OrthancImageWrapper
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 {
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 private:
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 OrthancPluginContext* context_;
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 OrthancPluginImage* image_;
1836
2faa2abbf311 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1834
diff changeset
34 double slope_;
2faa2abbf311 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1834
diff changeset
35 double intercept_;
2faa2abbf311 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1834
diff changeset
36 double rowPixelSpacing_;
2faa2abbf311 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1834
diff changeset
37 double columnPixelSpacing_;
1834
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 public:
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 OrthancImageWrapper(OrthancPluginContext* context,
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 OrthancPluginPixelFormat format,
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 uint32_t width,
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 uint32_t height);
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 OrthancImageWrapper(OrthancPluginContext* context,
1836
2faa2abbf311 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1834
diff changeset
46 GdcmImageDecoder& decoder,
2faa2abbf311 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1834
diff changeset
47 unsigned int frameIndex);
1834
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 ~OrthancImageWrapper();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 OrthancPluginImage* Release();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 uint32_t GetWidth();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 uint32_t GetHeight();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 uint32_t GetPitch();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 OrthancPluginPixelFormat GetFormat();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 char* GetBuffer();
1838
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
67
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
68 double GetSlope() const
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
69 {
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
70 return slope_;
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
71 }
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
72
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
73 double GetIntercept() const
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
74 {
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
75 return intercept_;
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
76 }
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
77
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
78 double GetRowPixelSpacing() const
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
79 {
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
80 return rowPixelSpacing_;
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
81 }
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
82
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
83 double GetColumnPixelSpacing() const
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
84 {
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
85 return columnPixelSpacing_;
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
86 }
1834
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 };
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 }