Resizing a volume to match a reference using cross correlation

These batch files could be combined into one large batch file, but they are separated to allow correlation matching to be performed on a different volume (e.g. only the 50s subunit) than the one to be resized.

(Note: size = volume diameter)

ccvol.bat: Expands/shrinks the input volume over a range of sizes (with IP), matches each to the reference volume (with CC N, PK 3), prints a document file listing correlation values for each size.

smooth.bat: [optional] the above output from IP tends to have very jagged lines. Smooth.bat sets each point P to the average of the midpoints between (P-1,P) and (P,P+1). An example.

peak.bat: finds the subpixel peak using the maximum and points on either side of it.
input: a doc file with [size:correlation] values
output: a doc file with a single value : the best size.
If this value is smaller then the reference volume, then the test volume must be enlarged. If this value is larger then the reference volume, then the test volume must be reduced.

getparms.bat: after the volume is resized, find if it needs to be shifted, put these shift values in a doc file.

goresize.bat: use the shift parameters to actually resize the volume and shift it into place.


Created: 8/29/03