data = read(bigds)
returns a batch of data from a big image datastore, bigds. Subsequent
calls to the read function continue reading from the endpoint of the
previous call.
Create a bigimage using a modified version of image "tumor_091.tif" from the CAMELYON16 data set. The original image is a training image of a lymph node containing tumor tissue. The original image has eight resolution levels, and the finest level has resolution 53760-by-61440. The modified image has only three coarse resolution levels. The spatial referencing of the modified image has been adjusted to enforce a consistent aspect ratio and to register features at each level.
bim = bigimage('tumor_091R.tif');
Create a bigimageDatastore that manages blocks of the big image at the finest resolution level.
Change the 'ReadSize' property of the datastore to 3.
bimds.ReadSize = 3;
Read one batch of image data from the datastore.
[data,info] = read(bimds);
Display the returned image data in a montage with a black border around each image. The montage shows that the datastore reads blocks of the big image in row-major order.
Output data, returned as a cell array with ReadSize elements.
Each cell contains an
m-by-n-by-Channels numeric
array.
info — Information about output data struct
Information about output data, returned as a struct containing these
fields.
Field Name
Description
Level
Resolution level of the data, specified as a
1-by-ReadSize vector of positive integers.
ImageNumber
Index of the big image providing the data, specified as a
1-by-ReadSize vector of positive integers.
BlockStartWorld
(x,y) coordinates of the center of
the top-left pixel of the data, excluding padding, specified as a
ReadSize-by-2 numeric vector. Values are in
world-coordinates.
BlockEndWorld
(x,y) coordinates of the center of
the bottom-right pixel of the data, excluding padding, specified as a
ReadSize-by-2 numeric vector. Values are in
world-coordinates.
DataStartWorld
(x,y) coordinates of the center of
the top-left pixel of the data, including padding, specified as a
ReadSize-by-2 numeric vector. Values are in
world-coordinates.
DataEndWorld
(x,y) coordinates of the center of
the bottom-right pixel of the data, including padding, specified as a
ReadSize-by-2 numeric vector. Values are in
world-coordinates.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.