comparison Orthanc/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.h @ 107:c9d29eb5db29 refactoring

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 02 Dec 2015 16:27:28 +0100
parents
children 3809121c3290
comparison
equal deleted inserted replaced
106:da086ad0b9d2 107:c9d29eb5db29
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
25 #include "GdcmImageDecoder.h"
26
27 namespace OrthancPlugins
28 {
29 class OrthancImageWrapper
30 {
31 private:
32 OrthancPluginContext* context_;
33 OrthancPluginImage* image_;
34
35 public:
36 OrthancImageWrapper(OrthancPluginContext* context,
37 OrthancPluginPixelFormat format,
38 uint32_t width,
39 uint32_t height);
40
41 OrthancImageWrapper(OrthancPluginContext* context,
42 OrthancPluginImage* image); // Takes ownership
43
44 ~OrthancImageWrapper();
45
46 OrthancPluginContext* GetContext()
47 {
48 return context_;
49 }
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();
62 };
63 }