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