#!/bin/sh # # script to destripe lunar orbiter tiff files using ISIS # if [ -z "$1" ]; then echo "Usage: `basename $0` files" exit 1 fi for file do basefile=`basename $file .tif` string=`tiffinfo $file 2> /dev/null | grep "Image Width:"` samps=`echo $string | cut -d" " -f3` lines=`echo $string | cut -d" " -f6` echo Processing $file $samps x $lines /usr/bin/convert $file gray:$basefile.raw raw2isis from=$basefile.raw to=$basefile.cub+SignedWord samples=$samps lines=$lines bands=1 bittype=unsignedbyte /bin/rm $basefile.raw dstripe from=$basefile.cub to=d1 mode=horizontal hlnl=1 hlns=75 hhnl=3 hhns=1 /bin/rm $basefile.cub dstripe from=d1 to=d2 mode=horizontal hlnl=1 hlns=175 hhnl=3 hhns=1 /bin/rm d1.cub dstripe from=d2 to=d3 mode=horizontal hlnl=1 hlns=175 hhnl=7 hhns=1 /bin/rm d2.cub dstripe from=d3 to=d4 mode=horizontal hlnl=1 hlns=175 hhnl=13 hhns=1 /bin/rm d3.cub dstripe from=d4 to=d5 mode=horizontal hlnl=1 hlns=2263 hhnl=37 hhns=1 /bin/rm d4.cub dstripe from=d5 to=d6 mode=horizontal hlnl=1 hlns=3763 hhnl=225 hhns=1 /bin/rm d5.cub dstripe from=d6 to=d7 mode=horizontal hlnl=1 hlns=3763 hhnl=625 hhns=1 /bin/rm d6.cub isis2std from=d7 to=cleaned/$basefile format=png minpercent=0 maxpercent=100 /bin/rm d7.cub done