Category
Function
Reads an image from an image file.
Syntax
image = ReadImage(name, format, start, end, delta, width, height);
Inputs
Name | Type | Default | Description |
---|---|---|---|
name | string | "image" | file name |
format | string | "rgb" or input dependent | file format |
start | integer | first frame | first movie frame |
end | integer | last frame | last movie frame |
delta | integer | 1 | delta of images to be read |
width | integer | input dependent | width of image |
height | integer | input dependent | height of image |
delayed | flag | environment dependent | use delayed colors if present in file |
colortype | string | environment dependent | data type for colors |
Outputs
Name | Type | Description |
---|---|---|
image | image or image series | resulting image |
Functional Details
This module supports four basic file formats: RGB and TIFF (Tag Image File Format), GIF (Graphics Interchange Format), and MIFF.
name | is the name of the image file. If name contains a series, the parameters start, end, and delta can be used to read a subset of the images (see parameter descriptions). | ||||||||||||||||||||
format | specifies the format of the image file.
This parameter is not required if name includes a
file extension defining the format (see following table).
If name is specified without the appropriate
extension, then the file format must be specified.
If format is specified as "rgb," and
name is "image," the module
will first try to open image.rgb.
If that fails, it will then try to open image.
| ||||||||||||||||||||
start and end | specify the first and last frame to be read from an image file containing a series. | ||||||||||||||||||||
delta | specifies the increment in counting the frames in the range from start to end. For example, if the first and last frames are 10 and 20 respectively, and delta = 2, the output (image) is a series group with six members (indexed from 0 to 5). Frame numbers (10, 12,..., 20 in this example) are preserved as the series position number. | ||||||||||||||||||||
width and height | are used only for RGB format files. The module obtains information about the size and number of images from name.size, an ASCII file containing the string "w×h×f," (where w and h are pixel width and height of image respectively, and f is the number of frames). If the .size file is not available, then width and height can be used to specify the size of the image(s). | ||||||||||||||||||||
delayed | specifies whether ReadImage should create a "delayed color" image if the image file is stored in an "image with colormap" format. By default, ReadImage will create a "delayed color" image if possible, unless the environment variable DXDELAYEDCOLORS is set to 0, or the delayed parameter is set to 0. | ||||||||||||||||||||
colortype | specifies whether the colors in the image should be byte or floating point. By default, ReadImage will create byte colors unless the DXPIXELTYPE environment variable is set to DXFloat, or colortype is set to "float". |
Notes:
Components
Creates an output with "positions," "connections," and "colors" components.
Example Visual Programs
ReadImage.net UsingFilter.net
See Also
[ OpenDX Home at IBM | OpenDX.org ]