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