Code covered by the BSD License
-
h5attget(hfile,varname,attnam...
H5ATTGET Retrieve attribute from HDF5 file.
-
h5attput(h5file,varname,attna...
H5ATTPUT Write HDF5 attribute.
-
h5copy(ifile,ofile,srcObjName...
H5COPY recursively copies an object from one HDF5 file to another file.
-
h5datacreate(h5file,varname,v...
H5datacreate Create HDF5 dataset.
-
h5dump(varargin)
H5DUMP print hdf5 metadata.
-
h5id=h5filecreate(h5name,vara...
H5FILECREATE Create HDF5 file.
-
h5imfinfo(fileName,varname)
H5IMFINFO returns information about HDF5 images.
-
h5imread(filename,varname,sta...
H5IMREAD Read an image from an HDF5 file.
-
h5propinfo(property_list_id)
H5PROPINFO: return structure of information about a property list.
-
h5varget ( varargin )
H5VARGET read data from HDF5 file.
-
h5varput ( varargin )
H5VARPUT Write HDF5 dataset.
-
th5attget()
Copyright 2008-2009 The MathWorks, Inc.
-
th5attput()
Copyright 2008-2009 The MathWorks, Inc.
-
th5datacreate()
test_complex;
-
th5dump()
Copyright 2008-2009 The MathWorks, Inc.
-
th5filecreate
-
th5imfinfo()
Copyright 2008-2009 The MathWorks, Inc.
-
th5imread()
Copyright 2008-2009 The MathWorks, Inc.
-
th5propinfo()
Copyright 2008-2009 The MathWorks, Inc.
-
th5varget()
Copyright 2008-2010 The MathWorks, Inc.
-
th5varput()
Copyright 2008-2010 The MathWorks, Inc.
-
Contents.m
-
th5runsuite.m
-
View all files
from
HDF5TOOLS
by John
Versatile HDF5 Utilities
|
| th5imfinfo() |
function th5imfinfo()
% Copyright 2008-2009 The MathWorks, Inc.
test_paletteImage;
test_multipleImages;
test_rgb;
test_noImagesInFile;
fprintf ( 1, 'All H5IMFINFO tests succeeded.\n\n' );
%--------------------------------------------------------------------------
function test_paletteImage()
actInfo = h5imfinfo('data/ex_image1.h5');
load('th5imfinfo.mat');
expInfo = expInfo.paletteImage;
if ~isequal(expInfo,actInfo)
error('Palette info struct did not match');
end
fprintf ( 1, 'Retrieval of palette image info succeeded .\n' );
%--------------------------------------------------------------------------
function test_multipleImages()
actInfo = h5imfinfo('data/ex_image2.h5');
load('th5imfinfo.mat');
expInfo = expInfo.multipleImages;
if ~isequal(expInfo,actInfo)
error('Multiple image info struct did not match');
end
fprintf ( 1, 'Retrieval of multiple image info structure succeeded .\n' );
%--------------------------------------------------------------------------
function test_rgb()
actInfo = h5imfinfo('data/ex_image2.h5','/image24bitpixel');
load('th5imfinfo.mat');
expInfo = expInfo.rgb;
if ~isequal(expInfo,actInfo)
error('RGB image info struct did not match');
end
fprintf ( 1, 'Retrieval of RGB image info succeeded .\n' );
%--------------------------------------------------------------------------
function test_noImagesInFile()
switch ( version('-release') )
case { '2007b', '2007a', '2006b', '2006a' }
try
actInfo = h5imfinfo('data/h5ex_d_fillval.h5');
catch
[a,b] = lasterr;
if ~strcmp(b,'HDF5TOOLS:h5imfinfo:notAnImageFile')
error(b,a);
end
end
otherwise
try
actInfo = h5imfinfo('data/h5ex_d_fillval.h5');
catch me
if ~strcmp(me.identifier,'HDF5TOOLS:h5imfinfo:notAnImageFile')
rethrow(me)
end
end
end
fprintf ( 1, 'Negative test on non-image file succeeded.\n' );
|
|
Contact us at files@mathworks.com