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
|
|
51 OrthancPluginImage* Release();
|
|
52
|
|
53 uint32_t GetWidth();
|
|
54
|
|
55 uint32_t GetHeight();
|
|
56
|
|
57 uint32_t GetPitch();
|
|
58
|
|
59 OrthancPluginPixelFormat GetFormat();
|
|
60
|
|
61 char* GetBuffer();
|
1838
|
62
|
|
63 double GetSlope() const
|
|
64 {
|
|
65 return slope_;
|
|
66 }
|
|
67
|
|
68 double GetIntercept() const
|
|
69 {
|
|
70 return intercept_;
|
|
71 }
|
|
72
|
|
73 double GetRowPixelSpacing() const
|
|
74 {
|
|
75 return rowPixelSpacing_;
|
|
76 }
|
|
77
|
|
78 double GetColumnPixelSpacing() const
|
|
79 {
|
|
80 return columnPixelSpacing_;
|
|
81 }
|
1834
|
82 };
|
|
83 }
|