SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
vsiscene.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_vsiscene_hpp
5#define OPENCV_slideio_vsiscene_hpp
6
7#include "slideio/drivers/vsi/vsi_api_def.hpp"
8#include "slideio/core/cvscene.hpp"
9#include "slideio/core/tools/tilecomposer.hpp"
10
11
12#if defined(_MSC_VER)
13#pragma warning( push )
14#pragma warning(disable: 4251)
15#endif
16
17namespace slideio
18{
19 namespace vsi
20 {
21 class VSIFile;
22 class SLIDEIO_VSI_EXPORTS VSIScene : public CVScene, public Tiler
23 {
24 public:
25 VSIScene(const std::string& filePath, std::shared_ptr<vsi::VSIFile>& vsiFile);
26
27 std::string getFilePath() const override {
28 return m_filePath;
29 }
30 std::string getName() const override {
31 return m_name;
32 }
33 slideio::Compression getCompression() const override {
34 return m_compression;
35 }
36 Resolution getResolution() const override {
37 return m_resolution;
38 }
39 double getMagnification() const override {
40 return m_magnification;
41 }
42 DataType getChannelDataType(int channelIndex) const override {
43 return m_channelDataType[channelIndex];
44 }
45 cv::Rect getRect() const override;
46 int getNumChannels() const override;
47 std::string getChannelName(int channel) const override;
48 void initializeBlock(const cv::Size& blockSize, const std::vector<int>& channelIndices,
49 cv::OutputArray output) override;
50 protected:
51 std::string m_filePath;
52 std::string m_name;
53 std::string m_rawMetadata;
54 slideio::Compression m_compression;
55 Resolution m_resolution;
56 double m_magnification;
57 cv::Rect m_rect;
58 int m_numChannels;
59 std::vector<std::string> m_channelNames;
60 std::vector<DataType> m_channelDataType;
61 std::shared_ptr<vsi::VSIFile> m_vsiFile;
62 };
63 }
64}
65
66#if defined(_MSC_VER)
67#pragma warning( pop )
68#endif
69
70#endif
Definition: exceptions.hpp:12
Compression
raster data compression enum
Definition: slideio_enums.hpp:12