4#ifndef OPENCV_slideio_zviscene_HPP
5#define OPENCV_slideio_zviscene_HPP
7#include "slideio/core/cvscene.hpp"
8#include "slideio/core/tools/tilecomposer.hpp"
9#include "slideio/drivers/zvi/zviimageitem.hpp"
10#include <pole/storage.hpp>
11#include "slideio/drivers/zvi/zvitile.hpp"
12#include "slideio/drivers/zvi/zvi_api_def.hpp"
15#pragma warning( push )
16#pragma warning(disable: 4251)
23 class SLIDEIO_ZVI_EXPORTS ZVIScene :
public CVScene,
public Tiler
31 ZVIScene(
const std::string& filePath);
32 std::string getFilePath()
const override;
33 cv::Rect getRect()
const override;
34 int getNumChannels()
const override;
35 int getNumZSlices()
const override;
36 int getNumTFrames()
const override;
37 double getZSliceResolution()
const override;
38 double getTFrameResolution()
const override;
39 void validateChannelIndex(
int channel)
const;
40 DataType getChannelDataType(
int channel)
const override;
41 std::string getChannelName(
int channel)
const override;
42 Resolution getResolution()
const override;
43 double getMagnification()
const override;
44 void readResampledBlockChannels(
const cv::Rect& blockRect,
const cv::Size& blockSize,
45 const std::vector<int>& componentIndices, cv::OutputArray output)
override;
46 std::string getName()
const override;
49 void readResampledBlockChannelsEx(
const cv::Rect& blockRect,
const cv::Size& blockSize,
50 const std::vector<int>& componentIndices,
int zSliceIndex,
int tFrameIndex,
51 cv::OutputArray output)
override;
53 int getTileCount(
void* userData)
override;
54 bool getTileRect(
int tileIndex, cv::Rect& tileRect,
void* userData)
override;
55 bool readTile(
int tileIndex,
const std::vector<int>& channelIndices, cv::OutputArray tileRaster,
56 void* userData)
override;
57 void initializeBlock(
const cv::Size& blockSize,
const std::vector<int>& channelIndices, cv::OutputArray output)
override;
59 ZVIPixelFormat getPixelFormat()
const;
60 void alignChannelInfoToPixelFormat();
61 void computeSceneDimensions();
62 void readImageItems();
64 void parseImageTags();
65 void parseImageInfo();
68 std::string m_filePath;
69 ole::compound_document m_Doc;
73 ZVIPixelFormat m_PixelFormat = ZVIPixelFormat::PF_UNKNOWN;
74 int m_ChannelCount = 0;
75 int m_ZSliceCount = 0;
76 int m_TFrameCount = 0;
79 std::vector<DataType> m_ChannelDataTypes;
80 std::vector<std::string> m_ChannelNames;
81 std::vector<ZVIImageItem> m_ImageItems;
82 std::vector<ZVITile> m_Tiles;
83 Resolution m_res = {0,0};
84 double m_ZSliceRes = 0.;
85 std::string m_SceneName;
86 Compression m_Compression = Compression::Uncompressed;
Definition: exceptions.hpp:12
Compression
raster data compression enum
Definition: slideio_enums.hpp:12