Mercurial > hg > orthanc
annotate Plugins/Samples/GdcmDecoder/GdcmDecoderCache.h @ 3820:f89eac983c9b transcoding
refactoring DicomUserConnection as DicomAssociation
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 09 Apr 2020 17:45:25 +0200 |
parents | 6110a4995ace |
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 | |
3768
6110a4995ace
replacing std::auto_ptr by std::unique_ptr in GDCM sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
24 #include "../../../Core/Compatibility.h" |
1834 | 25 #include "GdcmImageDecoder.h" |
1837 | 26 #include "OrthancImageWrapper.h" |
1834 | 27 |
28 #include <boost/thread.hpp> | |
29 | |
30 | |
31 namespace OrthancPlugins | |
32 { | |
33 class GdcmDecoderCache : public boost::noncopyable | |
34 { | |
35 private: | |
36 boost::mutex mutex_; | |
3768
6110a4995ace
replacing std::auto_ptr by std::unique_ptr in GDCM sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
37 std::unique_ptr<OrthancPlugins::GdcmImageDecoder> decoder_; |
1834 | 38 size_t size_; |
39 std::string md5_; | |
40 | |
41 static std::string ComputeMd5(OrthancPluginContext* context, | |
42 const void* dicom, | |
43 size_t size); | |
44 | |
45 public: | |
46 GdcmDecoderCache() : size_(0) | |
47 { | |
48 } | |
49 | |
1837 | 50 OrthancImageWrapper* Decode(OrthancPluginContext* context, |
51 const void* dicom, | |
52 const uint32_t size, | |
53 uint32_t frameIndex); | |
1834 | 54 }; |
55 } |