SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
dcmslide.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_dcmslide_HPP
5#define OPENCV_slideio_dcmslide_HPP
6
7#include "slideio/drivers/dcm/dcm_api_def.hpp"
8#include "slideio/core/cvslide.hpp"
9#include "slideio/drivers/dcm/dcmscene.hpp"
10#include <fstream>
11
12#if defined(_MSC_VER)
13#pragma warning( push )
14#pragma warning(disable: 4251)
15#endif
16
17namespace slideio
18{
19 class SLIDEIO_DCM_EXPORTS DCMSlide : public CVSlide
20 {
21 friend class DCMImageDriver;
22 protected:
23 DCMSlide(const std::string& filePath);
24 public:
25 int getNumScenes() const override;
26 std::string getFilePath() const override;
27 std::shared_ptr<CVScene> getScene(int index) const override;
28 void initFromFile();
29 void processRegularSeries(std::vector<std::shared_ptr<DCMFile>>& files, bool keepOrder);
30
31 private:
32 void processWSISeries(std::vector<std::shared_ptr<DCMFile>>& dcmFiles);
33 void processSeries(std::vector<std::shared_ptr<DCMFile>>& files, bool keepOrder=false);
34 void initFromDir();
35 void initFromDicomDirFile();
36 void init();
37 void initFromWSIFile();
38 void initFromRegularDicomFile();
39 private:
40 std::vector<std::shared_ptr<CVScene>> m_scenes;
41 std::string m_srcPath;
42 };
43}
44
45#if defined(_MSC_VER)
46#pragma warning( pop )
47#endif
48
49#endif
Definition: exceptions.hpp:12