Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
25
Добавлен:
09.02.2015
Размер:
673.28 Кб
Скачать

Values for funcstr. For example, hdfdfr8('setpalette',map) corresponds

to the C library call DFR8setpalette(map).

Syntax conventions

------------------

A status or identifier output of -1 indicates that the operation

failed.

HDF uses C-style ordering of elements, in which elements along the last

dimension vary fastest. MATLAB uses FORTRAN-style ordering, in which

elements along the first dimension vary fastest. HDFDFR8 does not

automatically convert from C-style ordering to MATLAB-style ordering,

which means that MATLAB image and colormap matrices need to be

transposed when using HDFDFR8 to read or write from HDF files.

Functions in HDFDFR8 that read and write palette information expect to

use uint8 data in the range [0,255], while MATLAB colormaps contain

double-precision values in the range [0,1]. Therefore, HDF palettes

need to be converted to double and scaled to be used as MATLAB

colormaps.

Write functions

----------------

Write functions create raster image sets and store them in new files or

append them to existing files.

status = hdfdfr8('writeref',filename,ref)

Stores the raster image using the specified reference number.

status = hdfdfr8('setpalette',colormap)

Sets palette for multiple 8-bit raster images.

status = hdfdfr8('addimage',filename,X,compress)

Appends an 8-bit raster image to a file; compress can be 'none',

'rle', 'jpeg', or 'imcomp'.

status = hdfdfr8('putimage',filename,X,compress)

Writes an 8-bit raster image to an existing file or creates the

file; compress can be 'none', 'rle', 'jpeg', or 'imcomp'.

status = hdfdfr8('setcompress',compress_type,...)

Sets the compression type. compress_type can be 'none', 'rle',

'jpeg', or 'imcomp'. If compress_type is 'jpeg', then two

additional parameters must be passed in: quality (a scalar between

0 and 100) and force_baseline (either 0 or 1). Other compression

types do not have additional parameters.

Read functions

----------------

Read functions determine the dimension and palette assignment for an

image set, read the actual image data, and provide sequential or random

read access to any raster image set.

[width,height,hasmap,status] = hdfdfr8('getdims',filename)

Retrieves dimensions for an 8-bit raster image.

[X,map,status] = hdfdfr8('getimage',filename)

Retrieves an 8-bit raster image and its palette.

status = hdfdfr8('readref',filename,ref)

Gets the next raster image with the specified reference number.

status = hdfdfr8('restart')

Ignores information about last file accessed and restarts from

beginning.

num_images = hdfdfr8('nimages',filename)

Returns number of raster images in a file.

ref = hdfdfr8('lastref')

Returns reference number of last element accessed.

Please read the file hdf4copyright.txt for more information.

See also hdf, hdfan, hdfdf24, hdfh, hdfhd,

hdfhe, hdfhx, hdfml, hdfsd, hdfv, hdfvf, hdfvh, hdfvs

<hdfh> - MATLAB Gateway to HDF H interface.

HDFH MATLAB gateway to the HDF H interface.

HDFH is a gateway to the HDF H interface.

The general syntax for HDFH is HDFH(funcstr,param1,param2,...). There

is a one-to-one correspondence between H functions in the HDF library

and valid values for funcstr. For example, HDFH('close',file_id)

corresponds to the C library call Hclose(file_id).

Syntax conventions

------------------

A status or identifier output of -1 indicates that the operation

failed.

status = hdfh('appendable',access_id)

Specifies that the element can be appended to.

status = hdfh('close',file_id)

Closes the access path to the file.

status = hdfh('deldd',file_id,tag,ref)

Deletes a tag and reference number from the data descriptor list.

status = hdfh('dupdd',file_id,tag,ref,old_tag,old_ref)

status = hdfh('endaccess',access_id)

Terminates access to a data object by disposing of the access

Соседние файлы в папке Библиотеки Matlab