9#include "vsistruct.hpp"
10#include "slideio/drivers/vsi/vsi_api_def.hpp"
11#include "slideio/imagetools/tifftools.hpp"
12#include "slideio/drivers/vsi/dimensions.hpp"
15#pragma warning( push )
16#pragma warning(disable: 4251)
24 class SLIDEIO_VSI_EXPORTS Volume :
public IDimensionOrder
28 m_dimensionOrder[0] = 0;
29 m_dimensionOrder[1] = 1;
31 std::string getName()
const {
return m_name; }
32 void setName(
const std::string& name) { m_name = name; }
34 double getMagnification()
const {
return m_magnification; }
35 void setMagnification(
double magnification) { m_magnification = magnification; }
37 StackType getType()
const {
return m_type; }
38 void setType(StackType type) { m_type = type; }
40 cv::Size getSize()
const {
return m_size; }
41 void setSize(
const cv::Size& size) { m_size = size; }
43 int getBitDepth()
const {
return m_bitDepth; }
44 void setBitDepth(
int bitDepth) { m_bitDepth = bitDepth; }
46 bool hasExternalFile()
const {
return m_hasExternalFile; }
47 void setHasExternalFile(
bool hasExternalFile) { m_hasExternalFile = hasExternalFile; }
49 int getNumAuxVolumes()
const {
return static_cast<int>(m_auxVolumes.size()); }
50 std::shared_ptr<Volume> getAuxVolume(
int index)
const {
return m_auxVolumes[index]; }
51 void addAuxVolume(std::shared_ptr<Volume>& volume) { m_auxVolumes.push_back(volume); }
53 void setIFD(
int ifd) { m_ifd = ifd; }
54 int getIFD()
const {
return m_ifd; }
56 void setDefaultColor(
int color) { m_defaultColor = color; }
57 int getDefaultColor()
const {
return m_defaultColor; }
59 int getDimensionOrder(Dimensions dim)
const override {
return m_dimensionOrder[dimensionIndex(dim)]; }
60 void setDimensionOrder(Dimensions dim,
int value) { m_dimensionOrder[dimensionIndex(dim)] = value; }
62 const Resolution& getResolution()
const {
return m_resolution; }
63 void setResolution(
const Resolution& resolution) { m_resolution = resolution; }
64 void setZResolution(
double res) { m_zResolution = res; }
65 double getZResolution()
const {
return m_zResolution; }
66 void setTResolution(
double res) { m_tResolution = res; }
67 double getTResolution()
const {
return m_tResolution; }
68 void setChannelName(
int channelIndex,
const std::string& channelName);
69 std::string getChannelName(
int channelIndex)
const;
70 const bool isValid()
const {
71 return m_size.height>0 && m_size.width>0;
75 static int dimensionIndex(Dimensions dim) {
76 return static_cast<int>(dim);
80 double m_magnification = 0.;
81 StackType m_type = StackType::UNKNOWN;
84 bool m_hasExternalFile =
false;
86 std::vector<std::shared_ptr<Volume>> m_auxVolumes;
87 int m_defaultColor = 0;
88 int m_dimensionOrder[MAX_DIMENSIONS] = {-1};
89 Resolution m_resolution;
90 double m_zResolution = 0.;
91 double m_tResolution = 0.;
92 std::vector<std::string> m_channelNames;
Definition: exceptions.hpp:15