SlideIO 2.0.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, 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 protected:
47 void init();
48 std::shared_ptr<EtsFile> getEtsFile() const;
49 int findZoomLevelIndex(double zoom) const;
50 protected:
51 int m_etsIndex;
52 std::map<std::string, std::shared_ptr<CVScene>> m_auxScenes;
53 };
54 }
55
56}
57
58#if defined(_MSC_VER)
59#pragma warning( pop )
60#endif
Definition: exceptions.hpp:15