| i2sun | local | i2sun |
i2sun -- convert IRAF images to Sun rasterfiles
i2sun input output z1 z2
Given a series of IRAF images, an intensity transformation, and a file containing color/greyscale lookup table information, produces one 2d image in Sun rasterfile format for each 2D IRAF image. This is a temporary task usually used as a step in creating filmloops for playback by a Sun Movie program.
The input images may be specified as an image template ("zoom*.imh"), an "@" file ("@movie.list"), or as an n-dimensional image from which to create multiple 2d rasterfiles. If any images in a list are nD images, all 2d sections from the specified sliceaxis will be written out (default = band or z axis). At present, only x-y sections may be made, i.e. the slice axis must be axis 3 or higher.
The minimum and maximum pixel/voxel intensities, z1 and z2, must be specified as it would be not only inefficient to calculate the full zrange of each image in a sequence, but would also make very jumpy movies. Between input intensities z1 and z2, the pixel intensities may be transformed according to the ztrans parameter: "linear", "log10", "none", or "user".
When ztrans = "user", a look up table of intensity values and their corresponding greyscale levels is read from the file specified by the ulutfile parameter. From this information, a piecewise linear look up table containing 4096 discrete values is composed. The text format table contains two columns per line; column 1 contains the intensity, column 2 the desired greyscale output. The greyscale values specified by the user must match those available on the output device. Task showcap can be used to determine the range of acceptable greyscale levels.
A color table file (clutfile ) may be produced on a Sun workstation from IMTOOL (see IMTOOL manual page, R_RASTERFILE parameter and Imcopy function). This file may be specified to I2SUN as the clutfile parameter. Likewise, any rasterfiles previously created with I2SUN may be used as input clutfiles.
The output rasterfile dimesions may be larger or smaller than the input images (see parameters xsize and ysize , or xmag and ymag ). The parameter order controls the mode of interpolation; 0=pixel replication, 1=bilinear.
If the output rasterfiles are being sent to a computer with opposite byte-swapping characteristics, set swap = yes (e.g., when running I2SUN on a VAX, with output to a Sun).
1. Produce a series of Sun rasterfiles in tmp$mydir/movie/,
using a pseudocolor color table file saved earlier, with
input greylevels scaled between 10 and 100.
cl> i2sun nzoom*.imh tmp$mydir/movie/frame.%d \
home$colors/pseudo.ras 10 100
2. Make a movie through the z, or band, axis of a datacube.
cl> i2sun cube tmp$cubemovie/frame.%d 1 256
3. Make a movie through the 4th, or hyper-axis of a datacube,
holding image band 10 constant.
cl> i2sun hypercube[*,*,10,*] tmp$movie/frame.%d 1 256 \
sliceaxis=4
4. Run I2SUN on a VAX, with output to a Sun.
cl> i2sun @imlist sunnode!home$ras/frame.%d 1 256 swap+
49 seconds (1 sec/frame) to produce 50 100*100 rasterfiles from a 100*100*50 datacube with no magnification, on a diskless Sun-3/110 using NFS to Eagle disks on a lightly loaded Sun-3/160 fileserver (load factor < 1.5). 5 minutes for the same with a magnification factor of 2 in both x and y, bilinear interpolation. 20 minutes for the same with a magnification factor of 5 in both x and y.