ImagePyramidAccess class
CPU access to ImagePyramid.
Contents
Base classes
- class Object
- Base class for all FAST objects.
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, bool useCache = false, int cacheLimit = -1) - ~ImagePyramidAccess() override
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>
- Get a specific level in an ImagePyramid as an Image object. If requesting a level with a width or height higher than 16384 pixels this will throw an exception.
- auto getPatchAsImage(int level, int offsetX, int offsetY, int width, int height, bool convertToRGB = true) -> std::shared_ptr<Image>
- Extract a patch from the image pyramid and return it as an Image.
- auto getPatchAsImage(int level, int patchIdX, int patchIdY, bool convertToRGB = true) -> std::shared_ptr<Image>
- Extract a tile from the Image Pyramid.
- 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()
- void setJPEGTables(uint32_t tableCount, void* tableData)
Function documentation
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:: getLevelAsImage(int level)
Get a specific level in an ImagePyramid as an Image object. If requesting a level with a width or height higher than 16384 pixels this will throw an exception.
| Parameters | |
|---|---|
| level | |
std::shared_ptr<Image> fast:: ImagePyramidAccess:: getPatchAsImage(int level,
int offsetX,
int offsetY,
int width,
int height,
bool convertToRGB = true)
Extract a patch from the image pyramid and return it as an Image.
| Parameters | |
|---|---|
| level | Level to extract patch from |
| offsetX | X offset |
| offsetY | Y offset |
| width | Width of patch |
| height | Height of patch |
| convertToRGB | convert to RGB when using OpenSlide, since it will return BGRA data |
| Returns | Patch as Image |
std::shared_ptr<Image> fast:: ImagePyramidAccess:: getPatchAsImage(int level,
int patchIdX,
int patchIdY,
bool convertToRGB = true)
Extract a tile from the Image Pyramid.
| Parameters | |
|---|---|
| level | Level to extract tile from |
| patchIdX | Tile X id |
| patchIdY | Tile Y id |
| convertToRGB | convert to RGB when using OpenSlide, since it will return BGRA data |
| Returns | Tile as Image |
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 to RGB when using OpenSlide, since it will return BGRA data |
| Returns | patch as Image object |