Mercurial > hg > orthanc
annotate Plugins/Samples/GdcmDecoder/GdcmImageDecoder.h @ 3858:3ab2d48c8f69 c-get
integration mainline->c-get
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 21 Apr 2020 16:37:25 +0200 |
parents | 94f4a18a79cc |
children | 7e33516965f8 |
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 |
3640
94f4a18a79cc
upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
5 * Copyright (C) 2017-2020 Osimis S.A., 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 #include <stdint.h> | |
26 #include <boost/noncopyable.hpp> | |
27 #include <boost/shared_ptr.hpp> | |
28 | |
2426 | 29 |
30 // This is for compatibility with Orthanc SDK <= 1.3.0 | |
31 #if !defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) | |
32 #define ORTHANC_PLUGINS_VERSION_IS_ABOVE(major, minor, revision) \ | |
33 (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER > major || \ | |
34 (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER == major && \ | |
35 (ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER > minor || \ | |
36 (ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER == minor && \ | |
37 ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER >= revision)))) | |
38 #endif | |
39 | |
40 | |
1834 | 41 namespace OrthancPlugins |
42 { | |
43 class GdcmImageDecoder : public boost::noncopyable | |
44 { | |
45 private: | |
46 struct PImpl; | |
47 boost::shared_ptr<PImpl> pimpl_; | |
48 | |
49 public: | |
50 GdcmImageDecoder(const void* dicom, | |
51 size_t size); | |
52 | |
53 OrthancPluginPixelFormat GetFormat() const; | |
54 | |
55 unsigned int GetWidth() const; | |
56 | |
57 unsigned int GetHeight() const; | |
58 | |
59 unsigned int GetFramesCount() const; | |
60 | |
61 static size_t GetBytesPerPixel(OrthancPluginPixelFormat format); | |
62 | |
63 OrthancPluginImage* Decode(OrthancPluginContext* context, | |
64 unsigned int frameIndex) const; | |
65 }; | |
66 } |