Main Content

images.blocked.H5 class

Package: images.blocked

Store blocks in a single HDF5 file

Description

The images.blocked.H5 class is an adapter for use with blocked images. Use this adapter to archive data as a chunked, lossless compression enabled, single HDF5 file. Additional information in UserData, if any, is stored 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 processingNo
Resume processingNo

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

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

Description

example

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

Properties

expand all

Public Properties

GZIP compression level, specified as a numeric scalar between 0-9. This value controls the level of GZIP (lossless) compression. The value 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 blocked image data to a HDF5 file using the blocked image write object function. Specify the images.blocked.H5 adapter for use by the write object function.

wa = images.blocked.H5();
wa.GZIPLevel = 5; % Slower, but results in smallest file size
write(bim, "tumor1.h5", "Adapter", wa);

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

bh5 = blockedImage("tumor1.h5");   
disp(bh5.Adapter.Extension)
h5
Introduced in R2021a