SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
scene.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 "slideio/base/slideio_enums.hpp"
8#include <string>
9#include <vector>
10#include <memory>
11#include <list>
12
13#if defined(_MSC_VER)
14#pragma warning( push )
15#pragma warning(disable: 4251)
16#endif
17
18namespace slideio
19{
20 class LevelInfo;
21 class CVScene;
27 class SLIDEIO_EXPORTS Scene
28 {
29 friend class Slide;
30 public:
31 Scene(std::shared_ptr<CVScene> scene);
32 virtual ~Scene(){
33 }
35 std::string getFilePath() const;
37 std::string getName() const;
45 std::tuple<int,int,int,int> getRect() const;
47 int getNumChannels() const;
51 int getNumZSlices();
55 int getNumTFrames();
57 Compression getCompression() const;
61 slideio::DataType getChannelDataType(int channel) const;
64 std::string getChannelName(int channel) const;
69 std::tuple<double,double> getResolution() const;
71 double getZSliceResolution() const;
73 double getTFrameResolution() const;
75 double getMagnification() const;
85 int getBlockSize(const std::tuple<int,int>& blockSize, int refChannel, int numChannels, int numSlices, int numFrames) const;
116 void readBlock(const std::tuple<int,int,int,int>& blockRect, void* buffer, size_t bufferSize);
131 void readBlockChannels(const std::tuple<int,int,int,int>& blockRect, const std::vector<int>& channelIndices, void* buffer, size_t bufferSize);
147 void readResampledBlock(const std::tuple<int,int,int,int>& blockRect, const std::tuple<int,int>& blockSize, void* buffer, size_t bufferSize);
164 void readResampledBlockChannels(const std::tuple<int,int,int,int>& blockRect, const std::tuple<int,int>& blockSize, const std::vector<int>& channelIndices, void* buffer, size_t bufferSize);
204 void read4DBlock(const std::tuple<int,int,int,int>& blockRect, const std::tuple<int,int>& zSliceRange, const std::tuple<int,int>& timeFrameRange, void* buffer, size_t bufferSize);
222 void read4DBlockChannels(const std::tuple<int,int,int,int>& blockRect, const std::vector<int>& channelIndices, const std::tuple<int,int>& zSliceRange, const std::tuple<int,int>& timeFrameRange, void* buffer, size_t bufferSize);
240 void readResampled4DBlock(const std::tuple<int,int,int,int>& blockRect, const std::tuple<int,int>& blockSize, const std::tuple<int,int>& zSliceRange, const std::tuple<int,int>& timeFrameRange, void* buffer, size_t bufferSize);
259 void readResampled4DBlockChannels(const std::tuple<int,int,int,int>& blockRect, const std::tuple<int,int>& blockSize, const std::vector<int>& channelIndices, const std::tuple<int,int>& zSliceRange, const std::tuple<int,int>& timeFrameRange, void* buffer, size_t bufferSize);
261 virtual const std::list<std::string>& getAuxImageNames() const;
263 virtual int getNumAuxImages() const;
265 std::string getRawMetadata() const;
269 virtual std::shared_ptr<Scene> getAuxImage(const std::string& imageName) const;
270 std::shared_ptr<CVScene> getCVScene() { return m_scene; }
271 int getNumZoomLevels() const;
272 const LevelInfo* getLevelInfo(int level) const;
273 std::string toString() const;
274 private:
275 std::shared_ptr<CVScene> m_scene;
276 };
277}
278
279#define ScenePtr std::shared_ptr<slideio::Scene>
280
281#if defined(_MSC_VER)
282#pragma warning( pop )
283#endif
Scene class represents a raster image contained in a slide.
Definition: scene.hpp:28
Slide class is an interface for accessing the information on a medical slide.
Definition: slide.hpp:29
Definition: exceptions.hpp:12
Compression
raster data compression enum
Definition: slideio_enums.hpp:12