- •In the structure returned from imfinfo function.
- •In addition to these png parameters, you can use any
- •Images), 'rle' (run-length encoding of 1-bit
- •Interleave: The format in which the data is stored. This can be
- •Cdf file handling
- •Image An array of structures containing information
- •IdxMapInfo a structure with 'Map' and 'Size' describing the
- •Vdata | 'Fields'
- •Values for 'Interpolate' are: lon, lat
- •It is written in the file. Each dimension in the file's datasets
- •Hdf version 5 data objects
- •Cdf library interface
- •Inquire - return basic characteristics of cdf
- •InquireVar - return information about cdf variable
- •Hdf version 4 library interface
- •Identifier.
- •Values for funcstr. For example, hdfdf24('lastref') corresponds to the
- •Values for funcstr. For example, hdfdfr8('setpalette',map) corresponds
- •Identifier.
- •In cases where the hdf c library accepts null for certain inputs, an
- •Identical to maxcache, but is -1 if the operation fails.
- •Xdimsize,ydimsize,upleft,lowright)
- •Vector of up to 13 elements containing projection-specific
- •Vector containing the number of values to read along each
- •Is a vector containing the dimension sizes of the subsetted region.
- •Index (zero-based) of the desired level. Fieldlist is a string
- •Vert_field,range)
- •Is an array containing the rank (number of dimensions) for each
- •Is an array of compression parameters. Status is -1 and other
- •Hdf version 5 library interface
- •Iterate - Calls a user function for each attribute
- •Vlen_get_buf_size - Determines storage requirements for vl data
- •Is_hdf5 - Determines if a file is in the hdf5 format
- •Is_simple - Determines if dataspace is simple
- •LibTiff library interface
- •InkSet - Set of inks used in a separated image
- •NetCdf library interface
- •In most cases, the syntax of the matlab function is similar to the
IdxMapInfo a structure with 'Map' and 'Size' describing the
relationship between the indexed elements of the
geolocation mapping
Example:
% Retrieve info about example.hdf
fileinfo = hdfinfo('example.hdf');
% Retrieve info about Scientific Data Set in example
data_set_info = fileinfo.SDS;
Please read the file hdf4copyright.txt for more information.
See also hdftool, hdfread, hdf.
Reference page in Help browser
doc hdfinfo
<hdfread> - Extract from an HDF4 file.
HDFREAD extract data from HDF file
HDFREAD reads data from a data set in an HDF or HDF-EOS file. If the
name of the data set is known, then HDFREAD searches the file for the
data. Otherwise, use HDFINFO to obtain a structure describing the
contents of the file. The fields of the structure returned by HDFINFO are
structures describing the data sets contained in the file. A structure
describing a data set may be extracted and passed directly to HDFREAD.
These options are described in detail below.
DATA = HDFREAD(FILENAME,DATASETNAME) returns in the variable DATA all
data from the file FILENAME for the data set named DATASETNAME.
DATA = HDFREAD(HINFO) returns in the variable DATA all data from the
file for the particular data set described by HINFO. HINFO is a
structure extracted from the output structure of HDFINFO.
[DATA,MAP] = HDFREAD(...) returns the image data and the colormap for an
8-bit raster image.
DATA = HDFREAD(...,PARAMETER,VALUE,PARAMETER2,VALUE2...) subsets the
data according to the string PARAMETER which specifies the type of
subsetting, and the values VALUE. The table below outlines the valid
subsetting parameters for each type of data set. Parameters marked as
"required" must be used to read data stored in that type of data set.
Parameters marked "exclusive" may not be used with any other subsetting
parameter, except any required parameters. When a parameter requires
multiple values, the values must be stored in a cell array. Note that
the number of values for a parameter may vary for the type of data set.
These differences are mentioned in the description of the parameter.
DATA = HDFREAD(FILENAME,EOSNAME,PARAMETER,VALUE,PARAMETER2,VALUE2...)
subsets the data field from the HDF-EOS point, grid, or swath specified
by EOSNAME.
Table of available subsetting parameters
Data Set | Subsetting Parameters
========================================
HDF Data |
|
SDS | 'Index'
|
Vdata | 'Fields'
| 'NumRecords'
| 'FirstRecord'
_________________|____________________
HDF-EOS Data |
|
Grid | 'Fields' (required)
| 'Index' (exclusive)
| 'Tile' (exclusive)
| 'Interpolate' (exclusive)
| 'Pixels' (exclusive)
| 'Box'
| 'Time'
| 'Vertical'
|
Swath | 'Fields' (required)
| 'Index' (exclusive)
| 'Time' (exclusive)
| 'Box'
| 'Vertical'
| 'ExtMode'
|
Point | 'Level' (required)
| 'Fields' (required)
| 'RecordNumbers'
| 'Box'
| 'Time'
There are no subsetting parameters for Raster Images
Valid parameters and their values are:
'Index'
Values for 'Index': START, STRIDE, EDGE
START, STRIDE and EDGE must be arrays the same size as the
number of dimensions. START specifies the location in the data set to
begin reading. Each number in START must be smaller than its
corresponding dimension. STRIDE is an array specifying the interval
between the values to read. EDGE is an array specifying the length of
each dimension to read. The region specified by START, STRIDE and EDGE
must be within the dimensions of the data set. If either START,
STRIDE, or EDGE is empty, then default values are calculated assuming:
starting at the first element of each dimension, a stride of one, and
EDGE to read the from the starting point to the end of the dimension.
The defaults are all ones for START and STRIDE, and EDGE is an array
containing the lengths of the corresponding dimensions. START,STRIDE
and EDGE are one based. START,STRIDE and EDGE vectors must be stored
in a cell as in the following notation: {START,STRIDE,EDGE}.
'Fields'
Values for 'Fields' are: FIELDS
Read data from the field(s) FIELDS of the data set. FIELDS can be a
single string or a cell array of strings. For Grid and Swath data sets,
only one field may be specified.
'Box'
Values for 'Box' are: LONG, LAT, MODE
LONG and LAT are numbers specifying a latitude/longitude region. MODE
defines the criterion for the inclusion of a cross track in a region.
The cross track in within a region if its midpoint is within the box,
either endpoint is within the box or any point is within the box.
Therefore MODE can have values of: 'midpoint', 'endpoint', or
'anypoint'. MODE is only valid for Swath data sets and will be ignored
if specified for Grid or Point data sets.
'Time'
Values for 'Time' are: STARTTIME, STOPTIME, MODE
STARTTIME and STOPTIME are numbers specifying a region of time. MODE
defines the criterion for the inclusion of a cross track in a region.
The cross track in within a region if its midpoint is within the box,
either endpoint is within the box or any point is within the box.
Therefore MODE can have values of: 'midpoint', 'endpoint', or
'anypoint'. MODE is only valid for Swath data sets and will be ignored
if specified for Grid or Point data sets.
'Vertical'
Values for 'Vertical' are: DIMENSION, RANGE
RANGE is a vector specifying the min and max range for the
subset. DIMENSION is the name of the field or dimension to subset by. If
DIMENSION is the dimension, then the RANGE specifies the range of
elements to extract (1 based). If DIMENSION is the field, then RANGE
specifies the range of values to extract. Vertical subsetting may be
used in conjunction with 'Box' and/or 'Time'. To subset a region along
multiple dimensions, vertical subsetting may be used up to 8 times in
one call to HDFREAD.
'ExtMode'
Values for 'ExtMode' are: EXTMODE
EXTMODE is either 'Internal' (default) or 'External'. If the mode is
set to 'Internal then the geolocation fields and data fields must be
in the same swath. If the mode is set to 'External' then the
geolocation fields and data fields may be in different swaths. This
parameter is only used for Swath data when extracting a time period or
a region.
'Pixels'
Values for 'Pixels' are: LON, LAT
LON and LAT are numbers specifying a latitude/longitude region. The
longitude/latitude region will be converted into pixel rows and
columns with the origin in the upper left-hand corner of the grid.
This is the pixel equivalent of reading a 'Box' region.
'RecordNumbers'
Available parameter for 'RecordNumbers' is: RecNums
RecNums is a vector specifying the record numbers to read.
'Level'
Value for 'Level' is: LVL
LVL is a string representing the name of the level to read or a one
based number specifying the index of the level to read or from an
HDF-EOS Point data set.
'NumRecords'
Available parameter for 'NumRecords' is: NumRecs
NumRecs is a number specifying the total number of records to read.
'FirstRecord'
Required value for 'FirstRecord' is: FirstRecord
FirstRecord is a one based number specifying the first record from which
to begin reading.
'Tile'
Required value for 'Tile' is: TileCoords
TileCoords is a vector specifying the tile coordinates to read. The
elements of TileCoords are one based numbers.
'Interpolate'
