Main Content

images.blocked.GenericImage class

Package: images.blocked

Store blocks in a single image file

Description

The images.blocked.GenericImage class is an adapter for use with blocked images. This adapter reads and stores an image as a single block in a single image file. If there is any additional information in UserData, this adapter stores the data in a separate MAT-file with the same file name.

CapabilitiesSupport
Data Types

M-by-N: logical or uint8

M-by-N-by-3: uint8

Multiresolution levelsNo
Use parallel processingNo
Resume processingLimited. Only useful when processing an array of blockedImage objects

The images.blocked.GenericImage class is a handle class.

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

Description

example

adapter = images.blocked.GenericImage() creates an images.blocked.GenericImage adapter for use with a blocked image.

The adapter reads and writes all data as a single I/O block. The blockedImage interface can still provide read access to this image by using a smaller BlockSize, but the image, in-full, is loaded into main memory in the background.

Properties

expand all

Preferred file format, specified as a string scalar. The value indicates the preferred format extension for this adapter. blockedImage/apply uses this value when creating the output locations automatically.

Examples

collapse all

Create a blocked image.

bim = blockedImage('tumor_091R.tif');

Write blocked image data to a PNG file using the blocked image write object function. Specify the images.blocked.GenericImage adapter for use by the write function.

wa = images.blocked.GenericImage();
write(bim, "tumorL3.png", "Adapter", wa, "Levels", 3);

Create a blocked image from the PNG file you just created. The blockedImage object automatically picks the appropriate adapter for the data.

bgi = blockedImage("tumorL3.png");  
disp(bgi.Adapter.Format)
png
Introduced in R2021a