Block-2B - INGEST IMAGES - SUB-TEST-SPECIFIC
##########################################################################
## ##
## BLOCK 2B ##
## INGEST IMAGES - SUB-TEST-SPECIFIC ##
## ##
##########################################################################
## This block additionally populates the F3 test directory's IMAGEFILES/
## NOMINALS/ and SUMFILES/ sub-directories with Detailed Survey image files
## which are specific to a sub-test in readiness for registering the images
## Assumptions:
## User has invoked a Bourne-Again Shell (bash) on ormacsrv1.lpl.arizona.edu
## User is a member of the group OREX\spc
## User has set up a skeleton directory in the following format:
## /SPC_Test/F3G-Nav/
## ORex/
## DATA/
## base/
## IMAGEFILES/
## SHAPEFILES/
## lsupport/
## orig/
## results/
## test/
## User has completed the processing steps comprising Block 1A - TEST DIRECTORY
## SET-UP - ORIG
## User has set up the test sub-directory, as per Block 1B - TEST DIRECTORY
## SET-UP - TEST
## User inputs:
## testID: Name of the F3 test directory (for example, F3E-Limbs)
## subTestID: (if required) Identifier for sub-test work (for example, F3G1)
## dirID: Name of sub-directory in which to work (e.g. orig, or test)
## blockID: User-specified identifier for typescript textfile name
## (for example, Block-2B-IngestImages-SubTestSpecific-F3G1)
# User inputs:
testID=F3G-Nav
export subTestID=F3G1
#export subTestID=F3G2
#export subTestID=F3G3
#export subTestID=F3G4
#export subTestID=F3G5
#export subTestID=F3G6
#export subTestID=F3G7
#dirID=orig
dirID=test
blockID=Block-2B-IngestImages-SubTestSpecific-${subTestID}
# Set-Up
cd /SPC_Test/$testID
script
date
pwd
ls -l
## VARIANCE-F3G:
# Populate base/IMAGEFILES/ with sub-test Detailed Survey test image files
# Step completed during Block 02-01
# Populate test/NOMINALS/ with sub-test Detailed Survey test image nominals
ls /SPC_Test/$testID/base/$subTestID/NOMINALS/P60* | cut -d '.' -f 1 | rev | cut -d '/' -f 1 | rev > lsupport/listImagesG2andG3PolyCam
cat lsupport/listImagesG2andG3PolyCam
cat base/$subTestID/NOMINALS/README
while read line; do
ln -s ../../base/$subTestID/NOMINALS/${line}.NOM $dirID/NOMINALS/${line}.NOM
done < lsupport/listImagesG2andG3PolyCam
ls -l $dirID/NOMINALS
# Populate orig/SUMFILES/ with Detailed Survey test image sumfiles
cat base/$subTestID/SUMFILES/README
while read line; do
ln -s ../../base/$subTestID/SUMFILES/${line}.SUM $dirID/SUMFILES/${line}.SUM
done < lsupport/listImagesG2andG3PolyCam
ls -l $dirID/SUMFILES
## END OF VARIANCE
# Generate lsupport/PICTLIST.TXT
ls base/IMAGEFILES/M* | cut -d '/' -f 3 | cut -d '.' -f 1 > lsupport/PICTLIST.TXT
ls base/IMAGEFILES/P* | cut -d '/' -f 3 | cut -d '.' -f 1 >> lsupport/PICTLIST.TXT
sed -i -e 's/^/ /' lsupport/PICTLIST.TXT
echo END >> lsupport/PICTLIST.TXT
cat lsupport/PICTLIST.TXT
# Generate list of images which require registering/autoregistering
# VARIANCE-F3G:
# DS PolyCam images within the region-of-interest only.
awk '/P60/ { print $1 }' lsupport/listG2PolyCamImagesIn100mRegionCenteredOnTAG1 > lsupport/listImagesForRegistering
awk '/P60/ { print $1 }' lsupport/listG3PolyCamImagesIn100mRegionCenteredOnTAG1 >> lsupport/listImagesForRegistering
sed -i -e 's/^/ /' lsupport/listImagesForRegistering
echo END >> lsupport/listImagesForRegistering
## END OF VARIANCE
cat lsupport/listImagesForRegistering
# Block Complete
date
exit
# Save block log
if [ ! -d /SPC_Test/$testID/log ]; then
mkdir /SPC_Test/$testID/log
fi
mv typescript /SPC_Test/$testID/log/log-typescript-${blockID}