#!/bin/bash

if [ $# -lt 2 ]; then
	echo "Script iteratively calls: of_compose sceneMasksXXX.ics scenePhantomsXXX.ics sceneNucleiXXX.ics MD_XXX.ics"
	echo "                and then: of_compose sceneNucleiXXX.ics sceneFinalPreviewXXX.ics FP_XXX.ics"
	echo "with XXX iterating from A to B, (FP=FinalPreview, MD=MaskDebugging)"
	echo
	echo "Parameters: A B"
	echo "            The three digit sequence of numbers goes from A to B, inclusively."

	exit 1
fi

for i in `seq -f "%03.f" $1 $2`; do echo DOING MD $i; of_compose sceneMasks${i}.ics scenePhantoms${i}.ics sceneNuclei${i}.ics MD_${i}.ics; done
for i in `seq -f "%03.f" $1 $2`; do echo DOING FP $i; of_compose sceneNuclei${i}.ics sceneFinalPreview${i}.ics FP_${i}.ics; done
