FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
ImagePyramid.hpp
Go to the documentation of this file.
1 #pragma once
2 
6 #include <set>
7 
8 // Forward declare
9 
10 namespace fast {
11 
12 class Image;
13 
19 class FAST_EXPORT ImagePyramid : public SpatialDataObject {
21  public:
22  void create(int width, int height, int channels, int levels = -1);
23  void create(openslide_t* fileHandle, std::vector<ImagePyramidLevel> levels);
24  int getNrOfLevels();
25  int getLevelWidth(int level);
26  int getLevelHeight(int level);
27  int getLevelTileWidth(int level);
28  int getLevelTileHeight(int level);
29  int getLevelTilesX(int level);
30  int getLevelTilesY(int level);
31  int getFullWidth();
32  int getFullHeight();
33  int getNrOfChannels() const;
34  void setSpacing(Vector3f spacing);
35  Vector3f getSpacing() const;
37  std::unordered_set<std::string> getDirtyPatches();
38  bool isDirtyPatch(const std::string& tileID);
39  void setDirtyPatch(int level, int patchIdX, int patchIdY);
40  void clearDirtyPatches(std::set<std::string> patches);
41  void free(ExecutionDevice::pointer device) override;
42  void freeAll() override;
43  ~ImagePyramid();
44  private:
45  ImagePyramid();
46  std::vector<ImagePyramidLevel> m_levels;
47 
48  openslide_t* m_fileHandle = nullptr;
49 
50  int m_channels;
51  bool m_initialized;
52 
53  std::unordered_set<std::string> m_dirtyPatches;
54  static int m_counter;
55  std::mutex m_dirtyPatchMutex;
56  Vector3f m_spacing = Vector3f::Ones();
57 };
58 
59 }
fast::ExecutionDevice::pointer
std::shared_ptr< ExecutionDevice > pointer
Definition: ExecutionDevice.hpp:11
fast
Definition: AffineTransformation.hpp:7
fast::ImagePyramidAccess::pointer
std::unique_ptr< ImagePyramidAccess > pointer
Definition: ImagePyramidAccess.hpp:41
fast::ImagePyramid
Definition: ImagePyramid.hpp:19
Access.hpp
FAST_OBJECT
#define FAST_OBJECT(className)
Definition: Object.hpp:9
SpatialDataObject.hpp
ImagePyramidAccess.hpp
accessType
accessType
Definition: Access.hpp:5
fast::SpatialDataObject
Definition: SpatialDataObject.hpp:10
openslide_t
struct _openslide openslide_t
Definition: ImagePyramidAccess.hpp:6