4#ifndef OPENCV_slideio_zviutils_HPP
5#define OPENCV_slideio_zviutils_HPP
7#include "slideio/drivers/zvi/zvi_api_def.hpp"
8#include "slideio/drivers/zvi/pole_lib.hpp"
9#include "slideio/base/slideio_enums.hpp"
10#include <boost/variant.hpp>
15#pragma warning( push )
16#pragma warning(disable: 4251)
19enum class ZVIPixelFormat;
25 typedef enum tagVARENUM
53 VT_SAFEARRAY = 0x001B,
55 VT_USERDEFINED = 0x001D,
64 VT_STREAMED_OBJECT = 0x0044,
65 VT_STORED_OBJECT = 0x0045,
69 typedef boost::variant<boost::blank, bool, int32_t, uint32_t, uint64_t, int64_t, double, std::string> Variant;
70 void SLIDEIO_ZVI_EXPORTS skipItem(ole::basic_stream& stream);
71 void SLIDEIO_ZVI_EXPORTS skipItems(ole::basic_stream& stream,
int count);
72 int32_t SLIDEIO_ZVI_EXPORTS readIntItem(ole::basic_stream& stream);
73 double SLIDEIO_ZVI_EXPORTS readDoubleItem(ole::basic_stream& stream);
74 std::string SLIDEIO_ZVI_EXPORTS readStringItem(ole::basic_stream& stream);
75 Variant SLIDEIO_ZVI_EXPORTS readItem(ole::basic_stream& stream,
bool skipUnusedTypes =
true);
76 slideio::DataType dataTypeFromPixelFormat(
const ZVIPixelFormat pixel_format);
77 int channelCountFromPixelFormat(ZVIPixelFormat pixelFormat);
79 class SLIDEIO_ZVI_EXPORTS StreamKeeper
82 StreamKeeper(ole::compound_document& doc,
const std::string& path);
83 operator ole::basic_stream& () {
84 return m_StreamPos->stream();
86 ole::basic_stream* operator ->() {
87 return &(m_StreamPos->stream());
90 std::vector<ole::stream_path>::iterator m_StreamPos;
Definition: exceptions.hpp:12