SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
otslide.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#include "slideio/drivers/ome-tiff/ot_api_def.hpp"
6#include "slideio/core/cvscene.hpp"
7#include "slideio/core/cvslide.hpp"
8#include "slideio/imagetools/libtiff.hpp"
9#include <map>
10#include <memory>
11#include <tinyxml2.h>
12
13#if defined(_MSC_VER)
14#pragma warning( push )
15#pragma warning(disable: 4251)
16#endif
17
18
19namespace slideio
20{
21 namespace ometiff
22 {
23 struct ImageData;
24 class SLIDEIO_OMETIFF_EXPORTS OTSlide : public slideio::CVSlide
25 {
26 protected:
27 OTSlide();
28 public:
29 ~OTSlide() override;
30 int getNumScenes() const override;
31 std::string getFilePath() const override;
32 std::shared_ptr<slideio::CVScene> getScene(int index) const override;
33 static std::shared_ptr<OTSlide> createSlide(const std::string& filePath, const std::string& driverId,
34 std::shared_ptr<tinyxml2::XMLDocument> doc);
35 static std::shared_ptr<OTSlide> openFile(const std::string& path, const std::string& driverId);
36 static std::shared_ptr<CVScene> createScene(const ImageData& imageData, int sceneIndex, const std::string& driverId);
37 static void closeFile(libtiff::TIFF* hfile);
38 std::shared_ptr<CVScene> getAuxImage(const std::string& sceneName) const override;
39 void log();
40 private:
41 std::vector<std::shared_ptr<slideio::CVScene>> m_Scenes;
42 std::map<std::string, std::shared_ptr<slideio::CVScene>> m_auxImages;
43 std::string m_filePath;
44 };
45 }
46}
47
48
49#if defined(_MSC_VER)
50#pragma warning( pop )
51#endif
CVSlide is an base class for representation of medical slide.
Definition: cvslide.hpp:29
Definition: exceptions.hpp:15