Mercurial > hg > orthanc
annotate Plugins/Samples/GdcmDecoder/GdcmDecoderCache.h @ 2730:cb1b26a7db98
fix mingw compilation
author | s.jodogne@gmail.com |
---|---|
date | Fri, 13 Jul 2018 12:34:53 +0200 |
parents | 878b59270859 |
children | 4e43e67f8ecf |
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 |
2447
878b59270859
upgrade to year 2018
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
5 * Copyright (C) 2017-2018 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 "GdcmImageDecoder.h" | |
1837 | 25 #include "OrthancImageWrapper.h" |
1834 | 26 |
27 #include <boost/thread.hpp> | |
28 | |
29 | |
30 namespace OrthancPlugins | |
31 { | |
32 class GdcmDecoderCache : public boost::noncopyable | |
33 { | |
34 private: | |
35 boost::mutex mutex_; | |
36 std::auto_ptr<OrthancPlugins::GdcmImageDecoder> decoder_; | |
37 size_t size_; | |
38 std::string md5_; | |
39 | |
40 static std::string ComputeMd5(OrthancPluginContext* context, | |
41 const void* dicom, | |
42 size_t size); | |
43 | |
44 public: | |
45 GdcmDecoderCache() : size_(0) | |
46 { | |
47 } | |
48 | |
1837 | 49 OrthancImageWrapper* Decode(OrthancPluginContext* context, |
50 const void* dicom, | |
51 const uint32_t size, | |
52 uint32_t frameIndex); | |
1834 | 53 }; |
54 } |