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#pragma once
5
6#include "slideio/drivers/vsi/vsi_api_def.hpp"
7#include "slideio/core/cvscene.hpp"
8#include "slideio/core/tools/tilecomposer.hpp"
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 VSIFile;
21 class SLIDEIO_VSI_EXPORTS VSIScene : public CVScene, public Tiler
22 {
23 public:
24 VSIScene(const std::string& filePath, int sceneIndex, const std::string& driverId, std::shared_ptr<vsi::VSIFile>& vsiFile);
25
26 std::string getFilePath() const override {
27 return m_filePath;
28 }
29 int getSceneIndex() const override {
30 return m_sceneIndex;
31 }
32 void setSceneIndex(int sceneIndex) {
33 m_sceneIndex = sceneIndex;
34 }
35 std::string getName() const override {
36 return m_name;
37 }
38 slideio::Compression getCompression() const override {
39 return m_compression;
40 }
41 Resolution getResolution() const override {
42 return m_resolution;
43 }
44 double getMagnification() const override {
45 return m_magnification;
46 }
47 DataType getChannelDataType(int channelIndex) const override {
48 return m_channelDataType[channelIndex];
49 }
50 const std::string& getDriverId() const override {
51 return m_driverId;
52 }
53 cv::Rect getRect() const override;
54 int getNumChannels() const override;
55 std::string getChannelName(int channel) const override;
56 void initializeBlock(const cv::Size& blockSize, const std::vector<int>& channelIndices,
57 cv::OutputArray output) override;
58 protected:
59 std::string m_filePath;
60 std::string m_name;
61 slideio::Compression m_compression;
62 Resolution m_resolution;
63 double m_magnification;
64 cv::Rect m_rect;
65 int m_numChannels;
66 std::vector<std::string> m_channelNames;
67 std::vector<DataType> m_channelDataType;
68 std::shared_ptr<vsi::VSIFile> m_vsiFile;
69 int m_sceneIndex;
70 std::string m_driverId;
71 };
72 }
73}
74
75#if defined(_MSC_VER)
76#pragma warning( pop )
77#endif
Definition: exceptions.hpp:15
Compression
raster data compression enum
Definition: slideio_enums.hpp:12