The Phase Correlation Method (PCM) program performs step 1 from above. The basic algorithm uses computes the translation vector by computing the correlation image from both input images and then searching for the peak within the data. Peak detection is performed by comparing 2 different sizes of the correlation image. If the translations agree to within a tolerance then the translation vector is the average of the 2 vectors. If the translations do not agree within the tolerance then the next larger FFT size is used and those 2 translation vectors are compared. This algorithm proceeds until a matching pair of translations are found. The sizes for the FFT are
Also note that the PCM method can only find translations that are half the size of the FFT in each direction. For example if 2 slices have a translation of 700 pixels in the vertical direction then FFTs of size 1500 and 2048 would need to be run in order to find a matching set of translation vectors.
[mjackson@workstation] $ PCMRegistration Required Parameters: --help Produce help message -i [ --inputfile ] arg MXA File to be used as input -r [ --recname ] arg Name of the Data Record to Register -s [ --sliceStart ] arg The value of the starting slice to fix -e [ --sliceEnd ] arg The value of the ending slice to fix -t [ --numThreads ] arg The number of threads to use when registering -l [ --logfile ] arg Name of the Log file to store any output into -R [ --restartfile ] arg Location of the temporary file to initialize from. -L [ --listRecords ] arg List the possible Data Model Records for the given MXA file -v [ --verbose ] Verbose Output -V [ --very_verbose ] Very Verbose Output - Good for debugging the export
-r [ --recname ] You will need to know the name of the MXA Data Record that represents the image that you would like to process. Typically this is "Zeiss Image". You can invoke the PCMRegistration program with the --listRecords argument to obtain a list of the MXA Data Records in the MXA File.
-R [--restartfile] Path to a temporary file that holds intermediate data. This can help debug if something goes wrong during the process. The file is written in binary so computer codes would need to be written to parse the file.
-t [--numThreads] The number of threads to use to process the MXA Data file. The algorithm will run a pair of slices on a single thread so setting this value to a larger number will allow for the concurrent calculation of multiple slice pairs. Of great importance is that the more threads that are used the more memory that may be required. If your data is well behaved and all the translations are small [under 255 pixels] then you can probably use a larger number. If your slices have large translations then keeping this number down to smaller number would be recommended. This also assumes that the computing hardware that is running the data set has multiple CPU or multiple cores in the CPU. Hyperthreading support in x86 hardware also will help reduce the time it takes to run this algorithm. If your CPU has 2 cores and supports multiple threads per CPU core then you can set the number of threads to 4, assuming you have enough memory to support 8 concurrent FFTs at 6912 Pixels.
-l [--logfile] The path to a file to store debugging messages into.
-s [--sliceStart] The first slice of data to export
-e [--sliceEnd] The last slice of data to export
-L [--listRecords] Returns a list of the MXA Data Records in the MXA File.
-v [--verbose] Determines how many debugging messages are written to the log file
-V [--very_verbose] Causes the program to write very detailed messages to the log file.
The R3DPCMRegistration GUI Application