SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
gdalscene.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/gdal/gdal_api_def.hpp"
7#include "slideio/core/cvscene.hpp"
8#include "slideio/base/slideio_enums.hpp"
9#include <opencv2/core.hpp>
10
11#if defined(_MSC_VER)
12#pragma warning( push )
13#pragma warning(disable: 4251)
14#endif
15
16namespace slideio
17{
18 class SmallImagePage;
19
20 class SLIDEIO_GDAL_EXPORTS GDALScene : public slideio::CVScene
21 {
22 public:
23 GDALScene(SmallImagePage* image, const std::string& filePath, const std::string& driverId);
24 virtual ~GDALScene() = default;
25 std::string getFilePath() const override;
26 int getSceneIndex() const override { return 0; }
27 const std::string& getDriverId() const override {
28 return m_driverId;
29 }
30 int getNumChannels() const override;
31 slideio::DataType getChannelDataType(int channel) const override;
32 slideio::Resolution getResolution() const override;
33 double getMagnification() const override;
34 std::string getName() const override;
35 cv::Rect getRect() const override;
36 void readResampledBlockChannelsEx(const cv::Rect& blockRect, const cv::Size& blockSize,
37 const std::vector<int>& componentIndices, int zSliceIndex, int tFrameIndex, cv::OutputArray output) override;
38 Compression getCompression() const override;
39 MetadataFormat getMetadataFormat() const override;
40 std::string getRawMetadata() const override;
41 private:
42 SmallImagePage* m_imagePage;
43 std::string m_filePath;
44 std::string m_driverId;
45 };
46}
47
48#if defined(_MSC_VER)
49#pragma warning( pop )
50#endif
51
class CVScene represents a base class for opencv based representations of raster images contained in ...
Definition: cvscene.hpp:38
Definition: exceptions.hpp:15
Compression
raster data compression enum
Definition: slideio_enums.hpp:12