Store blocks in a single image file
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.
|Use parallel processing||No|
|Resume processing||Limited. Only useful when processing an array of |
images.blocked.GenericImage class is a
For information on class attributes, see Class Attributes.
adapter = images.blocked.GenericImage() creates an
images.blocked.GenericImage adapter for use with a blocked
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.
Format— Preferred file format
Preferred file format, specified as a string scalar. The value indicates the
preferred format extension for this adapter.
this value when creating the output locations automatically.
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
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)