Store blocks in a single HDF5 file
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.
All numeric and logical data types of any dimensions. Logical data is
|Use parallel processing||No|
images.blocked.H5 class is a
For information on class attributes, see Class Attributes.
adapter = images.blocked.H5() creates an instance of an
images.blocked.H5 adapter for use with
GZIPLevel— GZIP compression level
1(default) | numeric scalar between 0-9
GZIP compression level, specified as a numeric scalar between 0-9. This value
controls the level of GZIP (lossless) compression. The value
turns off compression. Higher values attempt to increase the level of compression
(reduced file sizes) at the cost of higher runtimes.
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)