7#include <boost/json.hpp>
10#include "vsistruct.hpp"
11#include "slideio/drivers/vsi/vsi_api_def.hpp"
12#include "slideio/imagetools/tifftools.hpp"
13#include "slideio/drivers/vsi/dimensions.hpp"
16#pragma warning( push )
17#pragma warning(disable: 4251)
25 class SLIDEIO_VSI_EXPORTS Volume :
public IDimensionOrder
29 m_dimensionOrder[0] = 0;
30 m_dimensionOrder[1] = 1;
32 std::string getName()
const {
return m_name; }
33 void setName(
const std::string& name) { m_name = name; }
35 double getMagnification()
const {
return m_magnification; }
36 void setMagnification(
double magnification) { m_magnification = magnification; }
38 StackType getType()
const {
return m_type; }
39 void setType(StackType type) { m_type = type; }
41 cv::Size getSize()
const {
return m_size; }
42 void setSize(
const cv::Size& size) { m_size = size; }
44 int getBitDepth()
const {
return m_bitDepth; }
45 void setBitDepth(
int bitDepth) { m_bitDepth = bitDepth; }
47 bool hasExternalFile()
const {
return m_hasExternalFile; }
48 void setHasExternalFile(
bool hasExternalFile) { m_hasExternalFile = hasExternalFile; }
50 int getNumAuxVolumes()
const {
return static_cast<int>(m_auxVolumes.size()); }
51 std::shared_ptr<Volume> getAuxVolume(
int index)
const {
return m_auxVolumes[index]; }
52 void addAuxVolume(std::shared_ptr<Volume>& volume) { m_auxVolumes.push_back(volume); }
54 void setIFD(
int ifd) { m_ifd = ifd; }
55 int getIFD()
const {
return m_ifd; }
57 void setDefaultColor(
int color) { m_defaultColor = color; }
58 int getDefaultColor()
const {
return m_defaultColor; }
60 int getDimensionOrder(Dimensions dim)
const override {
return m_dimensionOrder[dimensionIndex(dim)]; }
61 void setDimensionOrder(Dimensions dim,
int value) { m_dimensionOrder[dimensionIndex(dim)] = value; }
63 const Resolution& getResolution()
const {
return m_resolution; }
64 void setResolution(
const Resolution& resolution) { m_resolution = resolution; }
65 void setZResolution(
double res) { m_zResolution = res; }
66 double getZResolution()
const {
return m_zResolution; }
67 void setTResolution(
double res) { m_tResolution = res; }
68 double getTResolution()
const {
return m_tResolution; }
69 void setChannelName(
int channelIndex,
const std::string& channelName);
70 std::string getChannelName(
int channelIndex)
const;
73 static int dimensionIndex(Dimensions dim) {
74 return static_cast<int>(dim);
78 double m_magnification = 0.;
79 StackType m_type = StackType::UNKNOWN;
82 bool m_hasExternalFile =
false;
84 std::vector<std::shared_ptr<Volume>> m_auxVolumes;
85 int m_defaultColor = 0;
86 int m_dimensionOrder[MAX_DIMENSIONS] = {-1};
87 Resolution m_resolution;
88 double m_zResolution = 0.;
89 double m_tResolution = 0.;
90 std::vector<std::string> m_channelNames;
Definition: exceptions.hpp:12