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