主要内容

getBlock

(Removed) Read block of bigimage object

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

Description

data = getBlock(bigimg,level,locationWorld) reads the big image data in bigimg at the specified resolution level, and returns pixel data for the entire block that contains coordinate locationWorld.

example

Examples

collapse all

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

bim = bigimage("tumor_091R.tif");

Specify the (x,y) coordinate of a point. Get the block containing the point.

coord = [2500 2500];
blk = getBlock(bim,1,coord);

Display the block in a new figure window. You can use imshow to display the block because the block fits in memory and has a single resolution level.

figure
imshow(blk)

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.

Coordinate of a point, specified as a 1-by-2 numeric vector of the form [x y]. The location is specified in world coordinates, which are the pixel locations relative to the highest resolution level. The position must be a valid position within bigimg.

Output Arguments

collapse all

Pixel data, returned as a numeric array of the same data type as the big image, bigimg.ClassUnderlying.

Version History

Introduced in R2019b

expand all