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#pragma once
5
6#include "slideio/slideio/slideio_def.hpp"
7#include <map>
8#include <vector>
9#include <string>
10#include <memory>
11
12#if defined(_MSC_VER)
13#pragma warning( push )
14#pragma warning(disable: 4251)
15#endif
16
17namespace slideio
18{
19 class ImageDriver;
20 class CVSlide;
26 class SLIDEIO_EXPORTS ImageDriverManager
27 {
28 protected:
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 static std::string getVersion();
51 protected:
52 static void initialize();
53 private:
54 static std::map<std::string, std::shared_ptr<ImageDriver>> driverMap;
55 };
56}
57
58#if defined(_MSC_VER)
59#pragma warning( pop )
60#endif
Class ImageDriverManager keeps overview over specific image format drivers. Allows opening a slide wi...
Definition: imagedrivermanager.hpp:27
Definition: exceptions.hpp:15
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
SLIDEIO_EXPORTS void setLogLevel(const std::string &level)
Sets the log level for the library.
Definition: slideio.cpp:22
SLIDEIO_EXPORTS std::string getVersion()
returns version of the library.
Definition: slideio.cpp:27