Main Content

concatenateLevels

Concatenate levels from multiple blocked images

Since R2023a

    Description

    example

    bCombined = concatenateLevels(bim1,...,bimN) concatenates the levels from two or more blocked images into a single blocked image.

    Examples

    collapse all

    Create a blocked image from a large image. The file tumor_110.tif contains a single-resolution 2-D image that exceeds 2048-by-2048 pixels.

    bim = blockedImage("tumor_110.tif");

    Make a new blocked image that consists of a single smaller overview level that fits in memory.

    boverview = makeMultiLevel2D(bim,Scales=0.1,Adapter=images.blocked.InMemory);

    Combine the original high-resolution image and the low-resolution overview level into a new blocked image.

    bcombined = concatenateLevels(bim,boverview)
    bcombined = 
      blockedImage with properties:
    
       Read only properties
                 Source: [1x2 blockedImage]
                Adapter: [1x1 images.blocked.LevelConcatenator]
                   Size: [2x3 double]
           SizeInBlocks: [2x3 double]
        ClassUnderlying: [2x1 string]
    
       Settable properties
              BlockSize: [2x3 double]
    
    

    Query the size of the combined blocked image.

    bcombined.Size
    ans = 2×3
    
            2560        3072           3
             258         309           3
    
    

    Input Arguments

    collapse all

    Blocked images, specified as blockedImage objects.

    Output Arguments

    collapse all

    Concatenated blocked image, returned as a blockedImage object.

    Tips

    • You can combine blocked images that store data in different formats and in different locations. The concatenated blocked image accesses data from each input blocked image using the corresponding adapter for that blocked image.

    Version History

    Introduced in R2023a