SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
imagedrivermanager.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#ifndef OPENCV_slideio_imagedrivermanager_HPP
5#define OPENCV_slideio_imagedrivermanager_HPP
6
7#include "slideio/slideio/slideio_def.hpp"
8#include <map>
9#include <vector>
10#include <string>
11#include <memory>
12
13#if defined(_MSC_VER)
14#pragma warning( push )
15#pragma warning(disable: 4251)
16#endif
17
18namespace slideio
19{
20 class ImageDriver;
21 class CVSlide;
27 class SLIDEIO_EXPORTS ImageDriverManager
28 {
29 protected:
30 ImageDriverManager();
31 ~ImageDriverManager();
32 public:
34 static std::vector<std::string> getDriverIDs();
35 static std::shared_ptr<slideio::ImageDriver> findDriver(const std::string& filePath);
44 static std::shared_ptr<CVSlide> openSlide(const std::string& filePath, const std::string& driver);
50 static void setLogLevel(const std::string& level);
51 static std::string getVersion();
52 protected:
53 static void initialize();
54 private:
55 static std::map<std::string, std::shared_ptr<ImageDriver>> driverMap;
56 };
57}
58
59#if defined(_MSC_VER)
60#pragma warning( pop )
61#endif
62
63#endif
static void setLogLevel(const std::string &level)
sets logging level.
static std::shared_ptr< CVSlide > openSlide(const std::string &filePath, const std::string &driver)
opens a slide and returns a smart pointer to object of slideio::CVSlide class.
static std::vector< std::string > getDriverIDs()
returns a list of ids of available image format drivers
Definition: exceptions.hpp:15
SLIDEIO_EXPORTS std::string getVersion()
returns version of the library.
Definition: slideio.cpp:27