Main Content

images.blocked.H5Blocks class

Package: images.blocked

Store each block as HDF5 file in folder

Description

The images.blocked.H5Blocks class is an adapter for use with blocked images. Use this adapter to archive data as a chunked, single HDF5 file with lossless compression enabled. The adapter stores additional information in UserData, if any exists, alongside in a MAT-file with the same file name.

CapabilitiesSupport
Data Types

All numeric and logical data types of any dimensions. Logical data is written as uint8.

Multiresolution levelsYes
Use parallel processingYes
Resume processingYes

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

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

Description

example

adapter = images.blocked.H5Blocked() creates an instance of an images.blocked.H5Blocked adapter for use with blockedImage functions.

Properties

expand all

GZIP compression level, specified as a numeric scalar between 0-9. This value controls the level of GZIP (loss-less) compression. 0 turns off compression. Higher values attempt to increase the level of compression (reduced file sizes) at the cost of higher runtimes.

Data Types: double

Examples

collapse all

Create a blocked image.

bim = blockedImage('tumor_091R.tif');

Write image data to files. Specify the images.blocked.H5Blocks adapter.

wa = images.blocked.H5Blocks();
wa.GZIPLevel = 5;
write(bim, "H5sFolder", "Adapter", wa);

Create a blocked image from the folder of images. The blockedImage object automatically picks the appropriate adapter.

bh5 = blockedImage("H5sFolder");
Introduced in R2021a