#!/bin/csh # Script to allow execution of FD2 using a 3D brick of data # as the input time series -- that is, the images don't # have to be separated into individual files. # Method: # use "count" and "3D:" to generate an individual command # line argument for each image to be extracted from the brick. # RWCox -- 14 Nov 1995 if ( $#argv < 1 ) then echo "Usage: mF64 [options] brick-file" exit endif # set the raw image size (2 bytes per pixel, no header) set xsize = 64 set ysize = 64 @ isize = 2 * $xsize * $ysize # get the name and size in bytes of the brick-file set fname = $argv[$#argv] set fff = `ls -l $argv[$#argv]` set fsize = $fff[5] # get the number of images in the brick-file @ zsize = $fsize / $isize @ nopt = $#argv - 1 @ zlast = ( $zsize - 1 ) * $isize # execute FD2 if ( $nopt > 0 ) then echo "-- Command is: " FD2 $argv[1-$nopt] \ 3D:0:0:${xsize}:${ysize}:1:${fname} ... 3D:${zlast}:0:${xsize}:${ysize}:1:${fname} FD2 $argv[1-$nopt] `count -root 3D: -suffix :0:${xsize}:${ysize}:1:${fname} 0 $zlast $isize` else echo "-- Command is: " FD2 \ 3D:0:0:${xsize}:${ysize}:1:${fname} ... 3D:${zlast}:0:${xsize}:${ysize}:1:${fname} FD2 `count -root 3D: -suffix :0:${xsize}:${ysize}:1:${fname} 0 $zlast $isize` endif