annotate Plugins/Samples/GdcmDecoder/OrthancImageWrapper.h @ 1840:859224214616

simplification of the sample plugin
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 30 Nov 2015 10:34:04 +0100
parents 7f68b04c79e8
children b1291df2f780
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_;
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 public:
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 OrthancImageWrapper(OrthancPluginContext* context,
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 OrthancPluginPixelFormat format,
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 uint32_t width,
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 uint32_t height);
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 OrthancImageWrapper(OrthancPluginContext* context,
1840
859224214616 simplification of the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1839
diff changeset
42 OrthancPluginImage* image); // Takes ownership
1834
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 ~OrthancImageWrapper();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
1839
7f68b04c79e8 getter for context
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1838
diff changeset
46 OrthancPluginContext* GetContext()
7f68b04c79e8 getter for context
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1838
diff changeset
47 {
7f68b04c79e8 getter for context
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1838
diff changeset
48 return context_;
7f68b04c79e8 getter for context
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1838
diff changeset
49 }
7f68b04c79e8 getter for context
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1838
diff changeset
50
1834
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();
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 };
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 }