Main Content

makeMultiLevel3D

3-D multilevel blocked image

Since R2023a

    Description

    mbim = makeMultiLevel3D(bim) makes a new 3-D multilevel blocked image, mbim, from the finest resolution level of the 3-D blocked image bim. Each new level is half the size of the prior level. The function stops adding levels when the image size is smaller than 256-by-256-by-256 voxels.

    mbim = makeMultiLevel3D(bim,Name=Value) specifies additional options, such as the scale factors and interpolation method, using name-value arguments. For example, specify Interpolation="cubic" to use bicubic interpolation when resizing each level of the image.

    Input Arguments

    collapse all

    Blocked image, specified as a blockedImage object containing 3-D image data. If the blocked image has multiple resolution levels, then makeMultiLevel3D uses the image at the finest resolution level.

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: mbim = makeMultiLevel3D(bim,Interpolation="cubic") resizes each level using cubic interpolation.

    Scale factors, specified as a vector of positive numbers. If you want the new multilevel blocked image to include the original blocked image, then include 1 as an element of Scales.

    Example: [1 0.66 0.5 0.33] creates a 4-level blocked image with levels that are 1, 0.66, 0.5, and 0.33 times the size of the original image.

    Example: [0.5 0.1] creates a 2-level blocked image with levels that are 0.5 and 0.1 times the size of the original image.

    Block size of data, specified as a 3-element vector of positive integers. The default value is equal to the block size of bim at the finest resolution level.

    Interpolation method, specified as one of these values.

    Interpolation MethodDescription
    "nearest"

    Nearest-neighbor interpolation. The output pixel is assigned the value of the pixel that the point falls within. No other pixels are considered.

    Nearest-neighbor interpolation is the only method supported for categorical images and it is the default method for images of this type.

    "linear"Linear interpolation. Linear interpolation is the default interpolation method for numeric and logical images.
    "cubic"Cubic interpolation.

    When the method is "linear" or "cubic", the function also performs antialiasing.

    Location of the output folder, specified as a string scalar or character vector. When the UseParallel argument is true, specify OutputLocation as a valid path on the client session, and use the AlternateFileSystemRoots property of the input blocked image bim to specify the required mapping for worker sessions.

    Adapter used for writing blocked image data, specified as an adapter object with write capabilities. This table lists the supported adapters included with the toolbox.

    AdapterDescription
    BINBlocksStore each block as a binary file in a folder
    H5Store blocks in a single HDF5 image
    H5BlocksStore each block as an HDF5 file in a folder
    InMemoryStore blocks in a variable in main memory
    MATBlocksStore each block as a MAT file in a folder

    You can also specify a custom adapter that performs custom writing operations. For more information, see images.blocked.Adapter.

    If the source of bim is in memory, and you do not specify the OutputLocation argument, then the default adapter is an InMemory adapter. Otherwise, the default value is an H5Blocks adapter.

    Use parallel processing, specified as a numeric or logical 0 (false) or 1 (true). The adapter specified by the Adapter argument must support parallel processing. You must specify a valid OutputLocation.

    This argument requires Parallel Computing Toolbox™.

    Data Types: logical

    Display wait bar, specified as a numeric or logical 1 (true) or 0 (false). When set to true, the makeMultiLevel3D function displays a wait bar for long-running operations. If you cancel the wait bar, the makeMultiLevel3D function returns partial output, if available.

    Data Types: logical

    Output Arguments

    collapse all

    Multilevel blocked image, returned as a blockedImage object. The function orders the levels from finest to coarsest resolution.

    Tips

    • If you want to create overview levels for a very large blocked image, consider creating the overview levels in memory, and then combining the original image and the overview levels using the concatenateLevels function. This approach does not require creating a second copy of the original image.

    Version History

    Introduced in R2023a