SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
svstiledscene.hpp
1// This file is part of slideio project.
2// It is subject to the license terms in the LICENSE file found in the top-level directory
3// of this distribution and at http://slideio.com/license.html.
4#ifndef OPENCV_slideio_svstiled_HPP
5#define OPENCV_slideio_svstiled_HPP
6
7#include "slideio/drivers/svs/svsscene.hpp"
8#include "slideio/imagetools/tifftools.hpp"
9#include "slideio/core/tools/tilecomposer.hpp"
10
11#if defined(_MSC_VER)
12#pragma warning( push )
13#pragma warning(disable: 4251)
14#endif
15
16namespace slideio
17{
18 class SLIDEIO_SVS_EXPORTS SVSTiledScene : public SVSScene, public Tiler
19 {
20 public:
21 void initialize();
22 SVSTiledScene(const std::string& filePath,
23 const std::string& name,
24 const std::vector<slideio::TiffDirectory>& dirs);
25 SVSTiledScene(const std::string& filePath,
26 libtiff::TIFF* hFile,
27 const std::string& name,
28 const std::vector<slideio::TiffDirectory>& dirs);
29 int getNumChannels() const override;
30 cv::Rect getRect() const override;
31 void readResampledBlockChannels(const cv::Rect& blockRect, const cv::Size& blockSize, const std::vector<int>& channelIndices,
32 cv::OutputArray output) override;
33 const slideio::TiffDirectory& findZoomDirectory(double zoom) const;
34 // Tiler methods
35 int getTileCount(void* userData) override;
36 bool getTileRect(int tileIndex, cv::Rect& tileRect, void* userData) override;
37 bool readTile(int tileIndex, const std::vector<int>& channelIndices, cv::OutputArray tileRaster,
38 void* userData) override;
39 void initializeBlock(const cv::Size& blockSize, const std::vector<int>& channelIndices, cv::OutputArray output) override;
40 private:
41 std::vector<slideio::TiffDirectory> m_directories;
42 };
43}
44
45#if defined(_MSC_VER)
46#pragma warning( pop )
47#endif
48
49#endif
Definition: exceptions.hpp:12