SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
cvslide.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_slide_HPP
5#define OPENCV_slideio_slide_HPP
6
7#include "slideio/core/slideio_core_def.hpp"
8#include "slideio/core/cvscene.hpp"
9#include <string>
10
11#if defined(_MSC_VER)
12#pragma warning( push )
13#pragma warning(disable: 4251)
14#endif
15
16namespace slideio
17{
27 class SLIDEIO_CORE_EXPORTS CVSlide
28 {
29 friend class ImageDriver;
30 protected:
31 virtual ~CVSlide() = default;
32 public:
34 virtual int getNumScenes() const = 0;
36 virtual std::string getFilePath() const = 0;
41 virtual const std::string& getRawMetadata() const {return m_rawMetadata;}
43 virtual std::shared_ptr<CVScene> getScene(int index) const = 0;
47 virtual const std::list<std::string>& getAuxImageNames() const {
48 return m_auxNames;
49 }
51 virtual int getNumAuxImages() const {
52 return static_cast<int>(m_auxNames.size());
53 }
58 virtual std::shared_ptr<CVScene> getAuxImage(const std::string& sceneName) const;
59 virtual MetadataType getMetadataType() const { return MetadataType::Unknown; }
60 protected:
61 std::string m_rawMetadata;
62 std::list<std::string> m_auxNames;
63 };
64}
65
66#define CVSlidePtr std::shared_ptr<slideio::CVSlide>
67
68#if defined(_MSC_VER)
69#pragma warning( pop )
70#endif
71
72#endif
CVSlide is an base class for representation of medical slide.
Definition: cvslide.hpp:28
virtual std::string getFilePath() const =0
The method returns a string which represents file path of the slide.
virtual int getNumAuxImages() const
The method returns number of auxiliary images contained in the slide.
Definition: cvslide.hpp:51
virtual const std::list< std::string > & getAuxImageNames() const
The method returns list of names of auxiliary images contained in the slide.
Definition: cvslide.hpp:47
virtual int getNumScenes() const =0
The method returns number of Scene objects contained in the slide.
virtual std::shared_ptr< CVScene > getScene(int index) const =0
The method returns a CVScene object by the scene index.
virtual const std::string & getRawMetadata() const
The method returns a string containing serialized metadata of the slide.
Definition: cvslide.hpp:41
Definition: exceptions.hpp:12