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 "slideio/core/cvslide.hpp"
9#include <opencv2/core.hpp>
10#include <map>
11#include <vector>
12
13#if defined(_MSC_VER)
14#pragma warning( push )
15#pragma warning(disable: 4251)
16#endif
17
18namespace slideio
19{
20 class ImageDriver;
26 class SLIDEIO_EXPORTS ImageDriverManager
27 {
28 protected:
29 ImageDriverManager();
30 ~ImageDriverManager();
31 public:
33 static std::vector<std::string> getDriverIDs();
34 static std::shared_ptr<slideio::ImageDriver> findDriver(const std::string& filePath);
43 static std::shared_ptr<CVSlide> openSlide(const std::string& filePath, const std::string& driver);
49 static void setLogLevel(const std::string& level);
50 protected:
51 static void initialize();
52 private:
53 static std::map<std::string, std::shared_ptr<ImageDriver>> driverMap;
54 };
55}
56
57#if defined(_MSC_VER)
58#pragma warning( pop )
59#endif
60
61#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:12