Main Content

LevelConcatenator

Read and write blocks of concatenated blocked images

Since R2023a

    Description

    The LevelConcatenator object is an adapter that accesses blocks of concatenated blocked images. This adapter enables reading and writing blocks of data in different formats and in different locations, using the corresponding adapter for each blocked image that belongs to the concatenation.

    Creation

    Create a LevelConcatenator object using the concatenateLevels function.

    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
    
    

    Version History

    Introduced in R2023a