Main Content

readall

Read all data from the blockedImageDatastore

    Description

    example

    b = readall(bimds) read all the data from the blockedImagesDatastore, bimds. readall returns b, a cell array containing an element for every individual block. All the data returned from the individual reads should be able to be concatenated vertically. The datatype of the output should be the same as that of the read method.

    Examples

    collapse all

    Create a blocked image. The blockedImage object chunks the image into a 5-by-6 grid of 1024-by-1024 sized blocks, totaling 30 blocks.

    bim = blockedImage('tumor_091R.tif');

    Create a blockedImageDatastore from the blocked image.

    bimds = blockedImageDatastore(bim);

    Read all the blocks from the blockedImageDatastore. The readall object function returns a cell array containing the 30 blocks.

    b = readall(bimds)
    b=30×1 cell array
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
        {1024×1024×3 uint8}
          ⋮
    
    

    Display all the blocks.

    montage(b)

    Input Arguments

    collapse all

    Blocked image datastore, specified as a blockedImageDatastore object.

    Data Types: blockedImageDatastore

    Output Arguments

    collapse all

    Data from blockedImageDatastore, returned as a cell array of block data of length ReadSize.

    Introduced in R2021a