SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
svsscene.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
6#include "slideio/drivers/svs/svs_api_def.hpp"
7#include "slideio/core/cvscene.hpp"
8#include "slideio/imagetools/tiffkeeper.hpp"
9#include "slideio/imagetools/tifftools.hpp"
10
11#if defined(_MSC_VER)
12#pragma warning( push )
13#pragma warning(disable: 4251)
14#endif
15
16namespace slideio
17{
18 class SLIDEIO_SVS_EXPORTS SVSScene : public CVScene
19 {
20 public:
27 SVSScene(const std::string& filePath, const std::string& driverId, const std::string& name);
28 SVSScene(const std::string& filePath, const std::string& driverId, libtiff::TIFF* hFile, const std::string& name);
29
30 virtual ~SVSScene();
31 void makeSureFileIsOpened();
32
33 std::string getFilePath() const override {
34 return m_filePath;
35 }
36 void setFilePath(const std::string& filePath) {
37 m_filePath = filePath;
38 }
39 int getSceneIndex() const override {
40 return m_sceneIndex;
41 }
42 const std::string& getDriverId() const override {
43 return m_driverId;
44 }
45 void setSceneIndex(int index) {
46 m_sceneIndex = index;
47 }
48 void setDriverId(const std::string& driverId) {
49 m_driverId = driverId;
50 }
51 std::string getName() const override {
52 return m_name;
53 }
54 Compression getCompression() const override{
55 return m_compression;
56 }
57 slideio::Resolution getResolution() const override{
58 return m_resolution;
59 }
60 double getMagnification() const override{
61 return m_magnification;
62 }
63 DataType getChannelDataType(int) const override{
64 return m_dataType;
65 }
66 libtiff::TIFF* getFileHandle();
67 protected:
68 std::string m_filePath;
69 std::string m_driverId;
70 std::string m_name;
71 Compression m_compression;
72 Resolution m_resolution;
73 double m_magnification;
74 DataType m_dataType;
75 int m_sceneIndex;
76 private:
77 TIFFKeeper m_tiffKeeper;
78 };
79}
80
81#if defined(_MSC_VER)
82#pragma warning( pop )
83#endif
Definition: exceptions.hpp:15
Compression
raster data compression enum
Definition: slideio_enums.hpp:12