#include <support_openslide.h>
◆ OpenSlideImage()
ecvl::OpenSlideImage::OpenSlideImage |
( |
const ecvl::filesystem::path & |
filename | ) |
|
|
inline |
◆ ~OpenSlideImage()
ecvl::OpenSlideImage::~OpenSlideImage |
( |
| ) |
|
|
inline |
◆ Close()
void ecvl::OpenSlideImage::Close |
( |
| ) |
|
|
inline |
◆ GetBestLevelForDownsample()
int ecvl::OpenSlideImage::GetBestLevelForDownsample |
( |
const double & |
downsample | ) |
|
Get the best level to use for displaying the given downsample.
- Parameters
-
[in] | downsample | The downsample desired factor. |
- Returns
- level OpenSlide image level extracted, or -1 if an error occurred.
◆ GetLevelCount()
int ecvl::OpenSlideImage::GetLevelCount |
( |
| ) |
|
|
inline |
◆ GetLevelDownsamples()
void ecvl::OpenSlideImage::GetLevelDownsamples |
( |
std::vector< double > & |
levels | ) |
|
Get the downsampling factor for each level, or -1.0 if an error occurred.
- Parameters
-
[out] | levels | It contains the downsampling factor for the corresponding level of that position. |
◆ GetLevelsDimensions()
void ecvl::OpenSlideImage::GetLevelsDimensions |
( |
std::vector< std::array< int, 2 >> & |
levels | ) |
|
Get width and height for each level of a whole-slide image.
- Parameters
-
[out] | levels | A std::vector of array containing two elements, width and height respectively. levels[k] are the dimensions of level k. |
◆ GetProperties()
void ecvl::OpenSlideImage::GetProperties |
( |
Image & |
dst | ) |
|
Loads properties (metadata) from the OpenSlide file and saves them into an ECVL Image.
- Parameters
-
[out] | dst | Image in which metadata will be stored. |
◆ ReadRegion()
bool ecvl::OpenSlideImage::ReadRegion |
( |
Image & |
dst, |
|
|
const int |
level, |
|
|
const std::vector< int > & |
dims |
|
) |
| |
Loads a region of a whole-slide image.
Supported formats are those supported by OpenSlide library. If the region cannot be read for any reason, the function creates an empty Image and returns false.
- Parameters
-
[out] | dst | Image in which data will be stored. It will be a RGB image stored in a "cxy" layout. |
[in] | level | OpenSlide image level to be extracted. |
[in] | dims | std::vector containing { x, y, w, h }. x and y are the top left x-coordinate and y-coordinate, in the level 0 reference frame. w and h are the width and height of the region. |
- Returns
- true if the region is correctly read, false otherwise.
- Examples
- example_openslide.cpp.
The documentation for this class was generated from the following file: