SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
cvsmallscene.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/core/slideio_core_def.hpp"
7#include "slideio/core/cvscene.hpp"
8
9#if defined(_MSC_VER)
10#pragma warning( push )
11#pragma warning(disable: 4251)
12#endif
13
14namespace slideio
15{
16 class SLIDEIO_CORE_EXPORTS CVSmallScene : public CVScene
17 {
18 public:
19 CVSmallScene() {
20 init();
21 }
22 std::string getFilePath() const override {
23 return m_filePath;
24 }
25 std::string getName() const override {
26 return m_sceneName;
27 }
28 cv::Rect getRect() const override {
29 return m_sceneRect;
30 }
31 int getNumChannels() const override {
32 return m_numChannel;
33 }
34 slideio::DataType getChannelDataType(int channel) const override {
35 return m_channelDataType;
36 }
37 Resolution getResolution() const override {
38 return m_resolution;
39 }
40 double getMagnification() const override {
41 return m_magnification;
42 }
43 Compression getCompression() const override {
44 return m_compression;
45 }
46 void readResampledBlockChannelsEx(const cv::Rect& blockRect, const cv::Size& blockSize,
47 const std::vector<int>& channelIndices, int zSliceIndex, int tFrameIndex, cv::OutputArray output) override;
48 virtual bool init() { return false; }
49 protected:
50 virtual void readImage(cv::OutputArray output) = 0;
51 protected:
52 std::string m_filePath;
53 std::string m_sceneName;
54 cv::Rect m_sceneRect{0,0,0,0};
55 int m_numChannel{0};
56 Resolution m_resolution{0.,0.};
57 double m_magnification{ 0. };
58 Compression m_compression{ Compression::Unknown };
59 DataType m_channelDataType;
60 };
61};
Definition: exceptions.hpp:15
Compression
raster data compression enum
Definition: slideio_enums.hpp:12