SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
czithumbnail.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
7#include "slideio/drivers/czi/czi_api_def.hpp"
8#include "slideio/core/cvsmallscene.hpp"
9
10#if defined(_MSC_VER)
11#pragma warning( push )
12#pragma warning(disable: 4251)
13#endif
14
15namespace slideio
16{
17 class CZISlide;
18
19 class SLIDEIO_CZI_EXPORTS CZIThumbnail : public CVSmallScene
20 {
21 public:
22 CZIThumbnail(const std::string& driverId) : m_driverId(driverId) {
23 }
24 bool init() override;
25 void setAttachmentData(CZISlide* slide, int64_t position, int64_t size, const std::string& name);
26 int getSceneIndex() const override {
27 return -1;
28 }
29 const std::string& getDriverId() const override {
30 return m_driverId;
31 }
32 protected:
33 void readImage(cv::OutputArray output) override;
34 private:
35 int64_t m_dataPos{ 0 };
36 int64_t m_dataSize{ 0 };
37 CZISlide* m_slide{ nullptr };
38 std::shared_ptr<CVSmallScene> m_scene;
39 std::string m_driverId;
40 };
41};
42
43#if defined(_MSC_VER)
44#pragma warning( pop )
45#endif
Definition: exceptions.hpp:15