Presently, the script reads, potentially, dozens of large tif files and converts them to miff. An operation is performed on the miff files and further operations on the resultant miff files. The final result is output as a tif file.
Using a single image example to simplify the process for illustration
First
Code: Select all
convert a.tif a.miff
convert b.tif b.miff
convert c.tif c.miff
Code: Select all
convert a.miff b.miff -compose Minus_Src -composite d.miff
convert d.miff c.miff -compose Divide_Src -composite final.tiff
rm -f *.miff
Code: Select all
for i in `ls -v *.tif'; do any of the operations above; done
Each image is processed once and then discarded. The resultant images are processed once and discarded. The final process combines the end result of the two processes, again discarding any temporary miff files.
Is it possible to use mpr in the above case; as follows
Read an image sequence - perform an operation on all the files and keep the result. Then, perform another operation on the result and keep the new result. Finally perform an operation on the new result and keep the final result... all without reading each result (miff file, as I am currently doing) into memory over and again with convert.
This seems to be the general idea behind mpr but I'm not sure its appropriate to the type of processing my script does. Fairly simple operations but lots of large files.