Main Content

getFullLevel

(Removed) Get all data in one level of bigimage object

The getFullLevel function of the bigimage object has been removed (since R2026a). Use the gather function associated with the blockedImage object instead. For more information, see Version History.

Description

I = getFullLevel(bigimg) reads the big image data in bigimg at the coarsest resolution level and returns the single-resolution image I.

I = getFullLevel(bigimg,level) reads the big image data in bigimg at the specified resolution level and returns the single-resolution image I.

example

Examples

collapse all

Create a bigimage from the sample image "tumor_091R.tif".

bim = bigimage("tumor_091R.tif");

Determine the coarsest resolution level and the spatial referencing of the bigimage at that level.

clevel = bim.CoarsestResolutionLevel;
clevelLims = bim.SpatialReferencing(clevel);

Create a mask of the coarsest resolution level by following these steps:

  • Get a single-resolution image of the coarsest resolution level.

  • Convert the image to grayscale.

  • Binarize the image. In the binarized image, the object of interest is black and the background is white.

  • Take the complement of the binarized image. The resulting mask follows the convention in which the object of interest is white and the background is black.

imcoarse = getFullLevel(bim,clevel);
graycoarse = rgb2gray(imcoarse);
bwcoarse = imbinarize(graycoarse);
mask = imcomplement(bwcoarse);

Create a bigimage containing the mask. Use the same spatial referencing as the original bigimage.

bmask = bigimage(mask,"SpatialReferencing",clevelLims);

Input Arguments

collapse all

Big image, specified as a bigimage object.

Resolution level, specified as a positive integer that is less than or equal to the number of resolution levels of bigimg. The default level is the coarsest resolution level, bigimg.CoarsestResolutionLevel.

Output Arguments

collapse all

Single-resolution image, returned as a numeric array.

Tips

  • Check the LevelSizes property of the input big image bigimg to confirm that the size of image data at the specified level is small enough to fit in memory.

Version History

Introduced in R2019b

expand all