comparison Framework/Inputs/DicomPyramid.h @ 0:4a7a53257c7d

initial commit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 22 Oct 2016 21:48:33 +0200
parents
children 91fc9583b2de
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 "PyramidWithRawTiles.h"
24 #include "DicomPyramidInstance.h"
25 #include "DicomPyramidLevel.h"
26
27 namespace OrthancWSI
28 {
29 class DicomPyramid : public PyramidWithRawTiles
30 {
31 private:
32 struct Comparator;
33
34 IOrthancConnection& orthanc_;
35 std::string seriesId_;
36 std::vector<DicomPyramidInstance*> instances_;
37 std::vector<DicomPyramidLevel*> levels_;
38
39 void Clear();
40
41 void RegisterInstances(const std::string& seriesId);
42
43 void Check(const std::string& seriesId) const;
44
45 void CheckLevel(size_t level) const;
46
47 public:
48 DicomPyramid(IOrthancConnection& orthanc,
49 const std::string& seriesId);
50
51 virtual ~DicomPyramid()
52 {
53 Clear();
54 }
55
56 const std::string& GetSeriesId() const
57 {
58 return seriesId_;
59 }
60
61 virtual unsigned int GetLevelCount() const
62 {
63 return levels_.size();
64 }
65
66 virtual unsigned int GetLevelWidth(unsigned int level) const;
67
68 virtual unsigned int GetLevelHeight(unsigned int level) const;
69
70 virtual unsigned int GetTileWidth() const;
71
72 virtual unsigned int GetTileHeight() const;
73
74 virtual bool ReadRawTile(std::string& tile,
75 unsigned int level,
76 unsigned int tileX,
77 unsigned int tileY);
78
79 virtual ImageCompression GetImageCompression() const;
80
81 virtual Orthanc::PixelFormat GetPixelFormat() const;
82 };
83 }