annotate Plugins/Samples/GdcmDecoder/GdcmImageDecoder.h @ 2523:21e2ed283cd5

fix wasm
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 10 Apr 2018 16:48:49 +0200
parents 878b59270859
children 4e43e67f8ecf
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
1900
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1840
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
1834
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
2447
878b59270859 upgrade to year 2018
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2426
diff changeset
5 * Copyright (C) 2017-2018 Osimis S.A., Belgium
1834
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * 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
9 * published by the Free Software Foundation, either version 3 of the
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * License, or (at your option) any later version.
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * 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
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * General Public License for more details.
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * 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
18 * 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
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
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include <orthanc/OrthancCPlugin.h>
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 #include <stdint.h>
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include <boost/noncopyable.hpp>
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 #include <boost/shared_ptr.hpp>
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
2426
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
29
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
30 // This is for compatibility with Orthanc SDK <= 1.3.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
31 #if !defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
32 #define ORTHANC_PLUGINS_VERSION_IS_ABOVE(major, minor, revision) \
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
33 (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER > major || \
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
34 (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER == major && \
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
35 (ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER > minor || \
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
36 (ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER == minor && \
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
37 ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER >= revision))))
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
38 #endif
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
39
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
40
1834
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 namespace OrthancPlugins
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 {
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 class GdcmImageDecoder : public boost::noncopyable
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 private:
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 struct PImpl;
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 boost::shared_ptr<PImpl> pimpl_;
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 public:
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 GdcmImageDecoder(const void* dicom,
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 size_t size);
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 OrthancPluginPixelFormat GetFormat() const;
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 unsigned int GetWidth() const;
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 unsigned int GetHeight() const;
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 unsigned int GetFramesCount() const;
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 static size_t GetBytesPerPixel(OrthancPluginPixelFormat format);
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 OrthancPluginImage* Decode(OrthancPluginContext* context,
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 unsigned int frameIndex) const;
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 };
b1a6f49b21dd GDCM decoder sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 }