#! /bin/csh -f # Last edited on 2001-11-01 13:48:35 by stolfi set usage = "$0 FIRSTFRAG LASTFRAG" set cmd = $0 echo "=== begin ${cmd:t} ===" echo "${cmd:t} $*" # Runs PZBoundary on the fragment images produced by run-PZSplitExt if ( $#argv != 2 ) then echo "no fragments?" echo "usage: ${usage}"; exit 1 endif set firstFrag = "$1"; shift; set lastFrag = "$1"; shift; set frags = ( `list-fragment-numbers` ) set path = ( \ ${STOLFIHOME}/programs/pm3-1.1.15/THESES/hcgl/1/bin/${PLATFORM} \ ${cmd:h} \ ${path} \ ) # Pixel size (mm), for the IBM scanner in "600dpi" mode: set pixelsize = 0.0428 # Grid size in mm: set gridsize = 10.0 foreach frag ( $frags ) if ( ( ${frag} >= ${firstFrag} ) && ( ${frag} <= ${lastFrag} ) ) then set inPrefix = "data/fragments/${frag}/image" set outPrefix = "data/fragments/${frag}/r000" set winPrefix = "data/fragments/${frag}/raw" ( /bin/rm -f ${outPrefix}.flc ${outPrefix}.ps ; echo ' ' ) echo '=== '"${inPrefix}.pgm -> ${outPrefix}.flc"' ===============================' nice PZBoundary \ -inFile ${inPrefix} \ -black 128 \ -grey 128 \ -pixelSize ${pixelsize} \ -outUnit 0.001 \ -outFile ${outPrefix} nice PZDraw \ -window ${winPrefix} \ -grid ${gridsize} \ -output ${outPrefix} \ -ticks -axes -rect ${winPrefix} \ < ${outPrefix}.flc endif end echo "=== end ${cmd:t} ========="