Mercurial > hg > orthanc-wsi
comparison Framework/Outputs/DicomPyramidWriter.h @ 0:4a7a53257c7d
initial commit
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 22 Oct 2016 21:48:33 +0200 |
parents | |
children | 147bd6dc28db |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4a7a53257c7d |
---|---|
1 /** | |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * | |
6 * This program is free software: you can redistribute it and/or | |
7 * modify it under the terms of the GNU Affero General Public License | |
8 * as published by the Free Software Foundation, either version 3 of | |
9 * the License, or (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, but | |
12 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * Affero General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU Affero General Public License | |
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 **/ | |
19 | |
20 | |
21 #pragma once | |
22 | |
23 #include "PyramidWriterBase.h" | |
24 #include "MultiframeDicomWriter.h" | |
25 #include "../Messaging/IFileTarget.h" | |
26 #include "../ImagedVolumeParameters.h" | |
27 | |
28 namespace OrthancWSI | |
29 { | |
30 class DicomPyramidWriter : public PyramidWriterBase | |
31 { | |
32 private: | |
33 std::vector<MultiframeDicomWriter*> writers_; | |
34 | |
35 boost::mutex mutex_; // Protects the access to "writers_" | |
36 IFileTarget& target_; | |
37 const DcmDataset& dataset_; | |
38 size_t maxSize_; | |
39 size_t countTiles_; | |
40 unsigned int countInstances_; | |
41 | |
42 const ImagedVolumeParameters& volume_; | |
43 | |
44 void FlushInternal(MultiframeDicomWriter& writer, | |
45 bool force); | |
46 | |
47 DcmItem* CreateFunctionalGroup(unsigned int frame, | |
48 unsigned int x, | |
49 unsigned int y, | |
50 unsigned int totalWidth, | |
51 unsigned int totalHeight, | |
52 float physicalZ) const; | |
53 | |
54 protected: | |
55 virtual void WriteRawTileInternal(const std::string& tile, | |
56 const Level& level, | |
57 unsigned int x, | |
58 unsigned int y); | |
59 | |
60 virtual void AddLevelInternal(const Level& level) | |
61 { | |
62 } | |
63 | |
64 public: | |
65 DicomPyramidWriter(IFileTarget& target, | |
66 const DcmDataset& dataset, | |
67 Orthanc::PixelFormat pixelFormat, | |
68 ImageCompression compression, | |
69 unsigned int tileWidth, | |
70 unsigned int tileHeight, | |
71 size_t maxSize, // If "0", no automatic flushing | |
72 const ImagedVolumeParameters& volume); | |
73 | |
74 virtual ~DicomPyramidWriter(); | |
75 | |
76 virtual void Flush(); | |
77 }; | |
78 } |