dwww Home | Show directory contents | Find package

#!F-adobe-helvetica-medium-r-normal--18*
#!N 
#!N  #!Rreadima ReadImage #!N #!N Category #!N #!N  #!Lcatiae,dxall756 h Import and Export  #!EL  #!N 
#!N Function #!N #!N Reads an image from an image file. 
#!N #!N Syntax #!CForestGreen #!N #!N  #!F-adobe-courier-bold-r-normal--18*    #!F-adobe-times-bold-r-normal--18*   #!N image #!EF 
= ReadImage(  #!F-adobe-times-bold-r-normal--18*   name, format, start, end, delta, width, height #!EF 
); #!EF #!N #!N #!EC #!N #!N Inputs #!T,1,91,276,461,646  #!F-adobe-times-medium-r-normal--14*    #!F-adobe-times-bold-r-normal--18*   
#!N TAB Name TAB Type TAB Default TAB Description #!EF #!N 
TAB name TAB string TAB "image" TAB file name #!N TAB 
format TAB string TAB "rgb" or input dependent TAB file format 
#!N TAB start TAB integer TAB first frame TAB first movie 
frame #!N TAB end TAB integer TAB last frame TAB last 
movie frame #!N TAB delta TAB integer TAB 1 TAB delta 
of images to be read #!N TAB width TAB integer TAB 
input dependent TAB width of image #!N TAB height TAB integer 
TAB input dependent TAB height of image #!N TAB delayed TAB 
flag TAB environment dependent TAB use delayed colors if present in 
#!N TAB - TAB - TAB - TAB file #!N TAB 
colortype TAB string TAB environment dependent TAB data type for colors 
#!N TAB - TAB - TAB - TAB #!EF #!N #!N 
Outputs #!T,1,161,321,646  #!F-adobe-times-medium-r-normal--14*    #!F-adobe-times-bold-r-normal--18*   #!N TAB Name TAB Type TAB Description 
#!EF #!N TAB image TAB image or image series TAB resulting 
image #!N TAB - TAB - TAB #!EF #!N #!N Functional 
Details #!N #!N This module supports four basic file formats: RGB 
and TIFF (Tag Image File Format), GIF (Graphics Interchange Format), and 
MIFF. #!N #!I0 #!N #!N #!I0 #!N  #!F-adobe-times-bold-r-normal--18*    #!F-adobe-times-bold-r-normal--18*   name #!EF 
#!EF #!I50 #!N is the name of the image file. #!N 
#!N If  #!F-adobe-times-bold-r-normal--18*   name #!EF contains a series, the parameters  #!F-adobe-times-bold-r-normal--18*   
start #!EF ,  #!F-adobe-times-bold-r-normal--18*   end #!EF , and  #!F-adobe-times-bold-r-normal--18*   delta #!EF 
can be used to read a subset of the images (see 
parameter descriptions). #!N #!I0 #!N  #!F-adobe-times-bold-r-normal--18*    #!F-adobe-times-bold-r-normal--18*   format #!EF #!EF #!I50 
#!N specifies the format of the image file. This parameter is 
not required if  #!F-adobe-times-bold-r-normal--18*   name #!EF includes a file extension defining 
the format (see following table). If  #!F-adobe-times-bold-r-normal--18*   name #!EF is specified 
without the appropriate extension, then the file format must be specified. 
If  #!F-adobe-times-bold-r-normal--18*   format #!EF is specified as "rgb," and  #!F-adobe-times-bold-r-normal--18*   name 
#!EF is "image," the module will first try to open image.rgb. 
If that fails, it will then try to open image. #!T,1,186,321,506,641 
 #!F-adobe-times-bold-r-normal--18*   #!N TAB File Type TAB Format Specifier TAB Expected File 
Extension(s) TAB Multiframe/Series Data #!N TAB - TAB - TAB - 
TAB #!EF #!N TAB RGB TAB "rgb" TAB .rgb and .size 
TAB Yes #!N TAB - TAB "r+g+b" TAB .r, .g, .b, 
.size, TAB #!N TAB TIFF TAB "tiff" TAB .tiff TAB Yes 
#!N TAB GIF TAB "gif" TAB .gif TAB No #!N TAB 
MIFF TAB "miff" TAB .miff TAB Yes #!N #!T,0 #!N #!N 
#!N #!I0 #!N  #!F-adobe-times-bold-r-normal--18*    #!F-adobe-times-bold-r-normal--18*   start #!EF  #!F-adobe-times-medium-r-normal--18*   and #!EF  #!F-adobe-times-bold-r-normal--18*   
end #!EF #!EF #!I50 #!N specify the first and last frame 
to be read from an image file containing a series. #!N 
#!I0 #!N  #!F-adobe-times-bold-r-normal--18*    #!F-adobe-times-bold-r-normal--18*   delta #!EF #!EF #!I50 #!N specifies the 
increment in counting the frames in the range from  #!F-adobe-times-bold-r-normal--18*   start 
#!EF to  #!F-adobe-times-bold-r-normal--18*   end #!EF . For example, if the first 
and last frames are 10 and 20 respectively, and  #!F-adobe-times-bold-r-normal--18*   delta 
#!EF = 2, the output (  #!F-adobe-times-bold-r-normal--18*   image #!EF ) 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. #!N #!I0 #!N  #!F-adobe-times-bold-r-normal--18*    #!F-adobe-times-bold-r-normal--18*   width #!EF 
 #!F-adobe-times-medium-r-normal--18*   and #!EF  #!F-adobe-times-bold-r-normal--18*   height #!EF #!EF #!I50 #!N are used 
only for RGB format files. The module obtains information about the 
size and number of images from  #!F-adobe-times-bold-r-normal--18*   name.size #!EF , an 
ASCII file containing the string "  #!F-adobe-times-bold-i-normal--18*   w #!EF *  #!F-adobe-times-bold-i-normal--18*   
h #!EF *  #!F-adobe-times-bold-i-normal--18*   f #!EF ," (where  #!F-adobe-times-bold-i-normal--18*   w #!EF 
and  #!F-adobe-times-bold-i-normal--18*   h #!EF are pixel width and height of image 
respectively, and  #!F-adobe-times-bold-i-normal--18*   f #!EF is the number of frames). #!N 
#!N If the  #!F-adobe-times-bold-r-normal--18*   .size #!EF file is not available, then 
 #!F-adobe-times-bold-r-normal--18*   width #!EF and  #!F-adobe-times-bold-r-normal--18*   height #!EF can be used to 
specify the size of the image(s). #!N #!I0 #!N  #!F-adobe-times-bold-r-normal--18*    #!F-adobe-times-bold-r-normal--18*   
delayed #!EF #!EF #!I50 #!N 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  #!F-adobe-times-bold-r-normal--18*   delayed #!EF parameter is set to 
0. #!N #!I0 #!N  #!F-adobe-times-bold-r-normal--18*    #!F-adobe-times-bold-r-normal--18*   colortype #!EF #!EF #!I50 #!N 
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  #!F-adobe-times-bold-r-normal--18*   colortype #!EF 
is set to "float." #!I0 #!N #!N #!N #!N #!I0 #!N 
Notes: #!N #!I30 #!N 1. RGB format files can be either 
"rgb" or "r+g+b." The file format "rgb" contains the image with 
the bytes for the red, green, and blue values interleaved. An 
alternate file format is "r+g+b," where three output files contain the 
non-interleaved image: "  #!F-adobe-times-bold-r-normal--18*   name.r #!EF ," "  #!F-adobe-times-bold-r-normal--18*   name.g #!EF 
," and "  #!F-adobe-times-bold-r-normal--18*   name.b #!EF ." #!N #!N TIFF format 
files must be either full color RGB images (TIFF Class R) 
or palette color RGB images (TIFF Class P), uncompressed ("Compression=1"), and 
interleaved ("PlanarConfiguration=1"). If the extension is not part of the name, 
the format must be set to "tiff." Information about the size 
of the image is obtained from the file itself, since TIFF 
files are self-describing. (For more information on file formats, see  #!Lwriteim,dxall981 h WriteImage  #!EL  
.) #!N #!I30 #!N 2. The default behavior of ReadImage is 
different in Data Explorer version 3.1.4 and above in terms of 
the type of image it creates internally. If you do not 
specify the environment variable DXPIXELTYPE as "DXFloat," ReadImage will create byte 
colors internally. This will result in reduced storage required for the 
image, and will only affect networks that require the colors to 
be of type float, in which case the ReadImage parameter "colortype" 
should be set to "float," or the DXPIXELTYPE environment variable should 
be set to "DXFloat." #!N #!I30 #!N 3. ReadImage will also 
maintain the delayed color status of an image, as will be 
the case for GIF, some TIFF, and some MIFF format files. 
If the visualization program requires full colors for each pixel, set 
the ReadImage "delayed" parameter to false (0) or set the environment 
variable DXDELAYEDCOLORS to 0. #!N #!I30 #!N 4. If you want 
to convert an image file that does not already have delayed 
colors to one that does, use ReadImage to load it in 
and then use QuantizeImage to make it delayed color. #!I0 #!N 
#!N #!N #!N Components #!N #!N Creates an output with "positions," 
"connections," and "colors" components. #!N #!N Example Visual Programs #!CForestGreen #!N 
#!N  #!F-adobe-courier-bold-r-normal--18*   #!N ReadImage.net #!N UsingFilter.net #!EF #!N #!N #!EC #!N 
#!N See Also #!N #!N  #!Lwriteim,dxall981 h WriteImage  #!EL  #!N #!N #!N  #!F-adobe-times-medium-i-normal--18*   Next 
Topic #!EF #!N #!N  #!Lreadimw,dxall916 h ReadImageWindow  #!EL  #!N  #!F-adobe-times-medium-i-normal--18*   #!N 

Generated by dwww version 1.15 on Sat Jun 22 12:48:32 CEST 2024.