SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
pkescene.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/pke/pke_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_PKE_EXPORTS PKEScene : public CVScene
19 {
20 public:
27 PKEScene(const std::string& filePath, int sceneIndex, const std::string& driverId, const std::string& name);
28 PKEScene(const std::string& filePath, int sceneIndex, const std::string& driverId, libtiff::TIFF* hFile, const std::string& name);
29
30 virtual ~PKEScene();
31 void makeSureFileIsOpened();
32
33 std::string getFilePath() const override {
34 return m_filePath;
35 }
36 int getSceneIndex() const override {
37 return m_sceneIndex;
38 }
39 const std::string& getDriverId() const override {
40 return m_driverId;
41 }
42 std::string getName() const override {
43 return m_name;
44 }
45 Compression getCompression() const override{
46 return m_compression;
47 }
48 slideio::Resolution getResolution() const override{
49 return m_resolution;
50 }
51 double getMagnification() const override{
52 return m_magnification;
53 }
54 DataType getChannelDataType(int) const override{
55 return m_dataType;
56 }
57 libtiff::TIFF* getFileHandle();
58
59 protected:
60 std::string m_filePath;
61 std::string m_driverId;
62 std::string m_name;
63 Compression m_compression;
64 Resolution m_resolution;
65 double m_magnification;
66 DataType m_dataType;
67 int m_sceneIndex;
68 private:
69 TIFFKeeper m_tiffKeeper;
70 };
71}
72
73#if defined(_MSC_VER)
74#pragma warning( pop )
75#endif
Definition: exceptions.hpp:15
Compression
raster data compression enum
Definition: slideio_enums.hpp:12