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#pragma once
5#include <opencv2/core.hpp>
6
7namespace ole {
8 class compound_document;
9}
10
11namespace slideio
12{
13 class ZVIImageItem;
14 class ZVITile
15 {
16 public:
17 ZVITile() = default;
18 ~ZVITile() = default;
19 int getIndex() const { return m_Index; }
20 void setIndex(int index) { m_Index = index; }
21 cv::Rect getRect() const { return m_Rect; }
22 void addItem(const ZVIImageItem* item);
23 void finalize();
24 void setTilePosition(int x, int y);
25 bool readTile(const std::vector<int>& componentIndices,
26 cv::OutputArray tile_raster, int slice, ole::compound_document& doc) const;
27 protected:
28 const ZVIImageItem* getImageItem(int slice, int channelIndex) const;
29 private:
30 int m_Index = 0;
31 int m_XIndex = -1;
32 int m_YIndex = -1;
33 cv::Rect m_Rect = {0, 0, 0, 0};
34 std::vector<const ZVIImageItem*> m_ImageItems;
35 };
36}
Definition: exceptions.hpp:15