SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
vsitools.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#include <cstdint>
6#include "etsfile.hpp"
7#include "vsistream.hpp"
8#include "slideio/base/slideio_enums.hpp"
9#include <nlohmann/json.hpp>
10
11using json = nlohmann::json;
12
13namespace slideio
14{
15 namespace vsi
16 {
17 class TagInfo;
18 enum class Compression;
19 enum class StackType;
20 class VSITools
21 {
22 public:
23 static DataType toSlideioPixelType(uint32_t vsiPixelType);
24 static slideio::Compression toSlideioCompression(vsi::Compression format);
25 static StackType intToStackType(int value);
26 static std::string getVolumeName(int tag);
27 static std::string getTagName(const TagInfo& tagInfo, const std::list<TagInfo>& path);
28 static bool isArray(const TagInfo& tagInfo);
29 static std::string getStackTypeName(const std::string& value);
30 static std::string getDeviceSubtype(const std::string& value);
31 static std::string extractTagValue(vsi::VSIStream& vsi, const vsi::TagInfo& tagInfo);
32 private:
33 static bool isTag(const json& parentObject, int srcTag);
34 static std::string getDimensionPropertyName(int tag);
35 static std::string getStackPropertyName(int tag);
36 };
37
38 }
39}
Definition: exceptions.hpp:15
Compression
raster data compression enum
Definition: slideio_enums.hpp:12