fast::ImagePyramidAccess class

Public types

using pointer = std::unique_ptr<ImagePyramidAccess>

Constructors, destructors, conversion operators

ImagePyramidAccess(std::vector<ImagePyramidLevel> levels, openslide_t* fileHandle, TIFF* tiffHandle, std::shared_ptr<ImagePyramid> imagePyramid, bool writeAccess, std::unordered_set<std::string>& initializedPatchList, std::mutex& readMutex, ImageCompression compressionFormat)
~ImagePyramidAccess()

Public functions

void setPatch(int level, int x, int y, std::shared_ptr<Image> patch, bool propagate = true)
Write a patch to the pyramid.
void setBlankPatch(int level, int x, int y)
Write patch/tile as empty. It will render as white/black.
auto isPatchInitialized(int level, int x, int y) -> bool
template<class T>
auto getPatchData(int level, int x, int y, int width, int height) -> std::unique_ptr<T[]>
auto getLevelAsImage(int level) -> std::shared_ptr<Image>
auto getPatchAsImage(int level, int offsetX, int offsetY, int width, int height, bool convertToRGB = true) -> std::shared_ptr<Image>
auto getPatchAsImage(int level, int patchIdX, int patchIdY, bool convertToRGB = true) -> std::shared_ptr<Image>
auto getPatchAsImageForMagnification(float magnification, float offsetX, float offsetY, int width, int height, bool convertToRGB = true) -> std::shared_ptr<Image>
Get patch as Image at a specific magnification.
void release()

Function documentation

void fast::ImagePyramidAccess::setPatch(int level, int x, int y, std::shared_ptr<Image> patch, bool propagate = true)

Write a patch to the pyramid.

Parameters
level
x
y
patch
propagate

void fast::ImagePyramidAccess::setBlankPatch(int level, int x, int y)

Write patch/tile as empty. It will render as white/black.

Parameters
level
x
y

std::shared_ptr<Image> fast::ImagePyramidAccess::getPatchAsImageForMagnification(float magnification, float offsetX, float offsetY, int width, int height, bool convertToRGB = true)

Get patch as Image at a specific magnification.

Parameters
magnification Magnification. Example: for 20X this value should be 20
offsetX Physical offset x position of patch
offsetY Physical offset y position of patch
width Width of patch in pixels
height Height of patch in pixels
convertToRGB Convert from BGR to RGB if needed
Returns patch as Image object