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