SlideIO 2.9.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
etsfilescene.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#pragma once
5#include "slideio/drivers/vsi/vsi_api_def.hpp"
6#include "slideio/drivers/vsi/vsiscene.hpp"
7#include <opencv2/core.hpp>
8#include <map>
9
10
11#if defined(_MSC_VER)
12#pragma warning( push )
13#pragma warning(disable: 4251)
14#endif
15
16namespace slideio
17{
18 namespace vsi
19 {
20 class EtsFile;
21 class VSIFile;
22 class SLIDEIO_VSI_EXPORTS EtsFileScene : public VSIScene
23 {
24 public:
25 EtsFileScene(const std::string& filePath, int sceneIndex, const std::string& driverId, std::shared_ptr<VSIFile>& vsiFile, int etsIndex);
26 public:
27 int getTileCount(void* userData) override;
28 bool getTileRect(int tileIndex, cv::Rect& tileRect, void* userData) override;
29 bool readTile(int tileIndex, const std::vector<int>& channelIndices, cv::OutputArray tileRaster,
30 void* userData) override;
31 void addAuxImage(const std::string& name, std::shared_ptr<CVScene> scene);
32 std::shared_ptr<CVScene> getAuxImage(const std::string& imageName) const override;
33 int getNumZSlices() const override;
34 int getNumTFrames() const override;
35 int getNumLambdas() const;
36 int getNumPyramidLevels() const;
37 DataType getChannelDataType(int channelIndex) const override;
38 Resolution getResolution() const override;
39 double getZSliceResolution() const override;
40 double getTFrameResolution() const override;
41 int getNumChannels() const override;
42 std::string getChannelName(int channel) const override;
43 void readResampledBlockChannelsEx(const cv::Rect& blockRect, const cv::Size& blockSize,
44 const std::vector<int>& componentIndices, int zSliceIndex, int tFrameIndex,
45 cv::OutputArray output) override;
46 void readResampledLevelBlockChannelsEx(int level, const cv::Rect& levelRect,
47 const cv::Size& blockSize, const std::vector<int>& channelIndices,
48 int zSliceIndex, int tFrameIndex, cv::OutputArray output) override;
49 protected:
50 void init();
51 std::shared_ptr<EtsFile> getEtsFile() const;
52 int findZoomLevelIndex(double zoom) const;
53 protected:
54 int m_etsIndex;
55 std::map<std::string, std::shared_ptr<CVScene>> m_auxScenes;
56 };
57 }
58
59}
60
61#if defined(_MSC_VER)
62#pragma warning( pop )
63#endif
Definition: exceptions.hpp:15