annotate Plugins/Samples/GdcmDecoder/OrthancImageWrapper.h @ 1838:2137df64a64c

getters
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 27 Nov 2015 18:00:42 +0100
parents 2faa2abbf311
children 7f68b04c79e8
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
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 OrthancPluginImage* Release();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 uint32_t GetWidth();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 uint32_t GetHeight();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 uint32_t GetPitch();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 OrthancPluginPixelFormat GetFormat();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 char* GetBuffer();
1838
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
62
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
63 double GetSlope() const
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
64 {
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
65 return slope_;
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
66 }
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 GetIntercept() 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 intercept_;
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 GetRowPixelSpacing() 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 rowPixelSpacing_;
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 GetColumnPixelSpacing() 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 columnPixelSpacing_;
2137df64a64c getters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1836
diff changeset
81 }
1834
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 };
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 }