SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
zvitile.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_zvitile_HPP
5#define OPENCV_slideio_zvitile_HPP
6#include <opencv2/opencv.hpp>
7
8namespace ole {
9 class compound_document;
10}
11
12namespace slideio
13{
14 class ZVIImageItem;
15 class ZVITile
16 {
17 public:
18 ZVITile() = default;
19 ~ZVITile() = default;
20 int getIndex() const { return m_Index; }
21 void setIndex(int index) { m_Index = index; }
22 cv::Rect getRect() const { return m_Rect; }
23 void addItem(const ZVIImageItem* item);
24 void finalize();
25 void setTilePosition(int x, int y);
26 bool readTile(const std::vector<int>& componentIndices,
27 cv::OutputArray tile_raster, int slice, ole::compound_document& doc) const;
28 protected:
29 const ZVIImageItem* getImageItem(int slice, int channelIndex) const;
30 private:
31 int m_Index = 0;
32 int m_XIndex = -1;
33 int m_YIndex = -1;
34 cv::Rect m_Rect = {0, 0, 0, 0};
35 std::vector<const ZVIImageItem*> m_ImageItems;
36 };
37}
38
39#endif
Definition: exceptions.hpp:12