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/core/slideio_core_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;
21 class SLIDEIO_CORE_EXPORTS ImageDriverManager
22 {
23 protected:
26 public:
27 static std::vector<std::string> getDriverIDs();
28 static ImageDriver* getDriver(const std::string& driverName);
29 static ImageDriver* findDriver(const std::string& filePath);
30 static std::shared_ptr<CVSlide> openSlide(const std::string& cs, const std::string& driver);
31 static void setLogLevel(const std::string& level);
32 protected:
33 static void initialize();
34 private:
35 static std::map<std::string, std::shared_ptr<ImageDriver>> driverMap;
36 };
37}
38
39#if defined(_MSC_VER)
40#pragma warning( pop )
41#endif
42
43#endif
Class ImageDriverManager keeps overview over specific image format drivers. Allows opening a slide wi...
Definition: imagedrivermanager.hpp:22
Definition: exceptions.hpp:12
SLIDEIO_EXPORTS std::shared_ptr< Slide > openSlide(const std::string &path, const std::string &driver="")
The function returns a smart pointer to an object of Slide class.
Definition: slideio.cpp:10
SLIDEIO_EXPORTS std::vector< std::string > getDriverIDs()
Returns a list of available driver ids.
Definition: slideio.cpp:17