#! /usr/bin/gawk -f # Last edited on 2006-04-22 09:47:29 by stolfi # Hack to convert files from the defunct FGI format # (float-valued grayscale image) to the new FNI format # (float-valued multi-channel image). BEGIN { print "begin float_image_t (format of 2006-03-25)"; print "NC = 1" } /^[ ]*$/ { print; next; } (NF == 3) { printf "%5d %5d %s\n", $1, $2, $3; next; } END { print "end float_image_t"; }