annotate Framework/Inputs/ITiledPyramid.h @ 318:8ad12abde290

sparse re-encoding with OpenSlide (notably for MIRAX format)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 11 Sep 2024 16:11:16 +0200
parents 0683312e21ba
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
312
0683312e21ba updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 309
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
0683312e21ba updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 309
diff changeset
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
309
7020852a8fa9 updated year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 254
diff changeset
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
0
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 *
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * This program is free software: you can redistribute it and/or
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * modify it under the terms of the GNU Affero General Public License
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * as published by the Free Software Foundation, either version 3 of
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * the License, or (at your option) any later version.
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 *
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful, but
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * Affero General Public License for more details.
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 *
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * You should have received a copy of the GNU Affero General Public License
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 **/
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #pragma once
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include "../Enumerations.h"
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
216
c35a3a0627b9 cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 214
diff changeset
28 #include <Compatibility.h>
192
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
29 #include <Images/ImageAccessor.h>
0
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 #include <boost/noncopyable.hpp>
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 #include <string>
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 namespace OrthancWSI
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 {
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 /**
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 * Class that represents a whole-slide image. It is assumed to be
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 * thread-safe, which is the case of libtiff and openslide.
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 **/
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 class ITiledPyramid : public boost::noncopyable
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 {
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 public:
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 virtual ~ITiledPyramid()
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 {
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 }
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 virtual unsigned int GetLevelCount() const = 0;
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 virtual unsigned int GetLevelWidth(unsigned int level) const = 0;
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 virtual unsigned int GetLevelHeight(unsigned int level) const = 0;
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
217
20bc074ec19a Viewer can display DICOM pyramids whose tile sizes vary across levels
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 216
diff changeset
54 virtual unsigned int GetTileWidth(unsigned int level) const = 0;
0
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55
217
20bc074ec19a Viewer can display DICOM pyramids whose tile sizes vary across levels
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 216
diff changeset
56 virtual unsigned int GetTileHeight(unsigned int level) const = 0;
0
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 virtual bool ReadRawTile(std::string& tile,
57
91fc9583b2de big refactoring to support sparse tiling
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
59 ImageCompression& compression,
0
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 unsigned int level,
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 unsigned int tileX,
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 unsigned int tileY) = 0;
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
318
8ad12abde290 sparse re-encoding with OpenSlide (notably for MIRAX format)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 312
diff changeset
64 virtual Orthanc::ImageAccessor* DecodeTile(bool& isEmpty,
8ad12abde290 sparse re-encoding with OpenSlide (notably for MIRAX format)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 312
diff changeset
65 unsigned int level,
0
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 unsigned int tileX,
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 unsigned int tileY) = 0;
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 virtual Orthanc::PixelFormat GetPixelFormat() const = 0;
166
f0dac1e8f736 access to photometric interpretation of source pyramids
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 157
diff changeset
70
f0dac1e8f736 access to photometric interpretation of source pyramids
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 157
diff changeset
71 virtual Orthanc::PhotometricInterpretation GetPhotometricInterpretation() const = 0;
0
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 };
4a7a53257c7d initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 }