Main Content

gather

Collect blocks into current workspace

    Description

    example

    data = gather(bim) returns an image in the workspace formed by assembling all the blocks of the blockedImage, bim. By default, gather collects blocks from the coarsest level (level with the least amount of data).

    data = gather(bim,'Level',L) returns an array formed by assembling all the blocks from the specified resolution level L.

    Examples

    collapse all

    Create a blocked image 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 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 = blockedImage('tumor_091R.tif');
    

    Use gather to extract the coarsest resolution level. By default, gather returns the coarsest level

    level_coarsest = gather(bim);
    

    Use gather to extract the finest resolution level. You must specify the resolution level. The finest resolution level is always numbered 1.

    level_finest = gather(bim, "Level", 1);
    

    Display the coarsest resolution level and finest resolution level side-by-side.

    montage({level_coarsest,level_finest})
    

    Input Arguments

    collapse all

    Blocked image, specified as a blockedImage object.

    Output Arguments

    collapse all

    Image formed from blocks, returned as a numeric array of the type specified by the ClassUnderlying property of the blocked image.

    See Also

    Introduced in R2021a