SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
smallimage.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 <string>
6#include <opencv2/core/mat.hpp>
7#include "slideio/base/resolution.hpp"
8
9namespace slideio
10{
11 class Size;
12 enum class DataType;
13 enum class Compression;
14
15 class SmallImagePage
16 {
17 public:
18 virtual Size getSize() const = 0;
19 virtual DataType getDataType() const = 0;
20 virtual int getNumChannels() const = 0;
21 virtual Compression getCompression() const = 0;
22 virtual const std::string& getMetadata() const = 0;
23 virtual void readRaster(cv::OutputArray raster) = 0;
24 virtual Resolution getResolution() const {
25 return {};
26 }
27 };
28 class SmallImage
29 {
30 public:
31 virtual ~SmallImage() = default;
32 virtual int getNumPages() const = 0;
33 virtual bool isValid() const = 0;
34 virtual SmallImagePage* readPage(int pageIndex) = 0;
35 virtual void readImageStack(cv::OutputArray raster);
36 };
37
38}
Definition: exceptions.hpp:15
Compression
raster data compression enum
Definition: slideio_enums.hpp:12