-
Notifications
You must be signed in to change notification settings - Fork 1
Correlation
Adrian Quintana edited this page Dec 11, 2017
·
1 revision
This program allows you to calculate the similarity between (parts of) volumes or images. Four different similarity indices are provided:
Correlation | `co = 1/N*sum(x*y)` |
Cross-correlation coefficient | `cc = 1/N*sum{(x-mean_x)__(y-mean_y)}/(stddev_x__stddev_y*n)` |
Euclidian Distance | `eu = sqrt[sum{(x-y)*(x-y)}]` |
Mutual Information | `mi = sum [ P(x,y)__log2{P(x,y)/(P(x)__P(y))} ]` |
The input images or volumes are compared to the reference one. Results are written to the output screen, or can be piped into an output file.
$ correlation -ref [reference file] -i [input file] ...
Parameters
- `` Either a volume or an image file
- `` Either a volume, an image file, or a selfile containing multiple volumes or images. The input files should have the same (square/cubic) dimensions as the reference file
- `` Restrict the similarity calculation to the region within the mask. By default, the program uses the entire image or volume.
- `` By default, the program calculates four different similarity indices. Use this to only calculate the correlation (i.e. signal product)
- `` To only calculate the cross-correlation coefficient
- `` To only calculate the euclidian distance
- `` To only calculate the mutual information
To calculate the similarity within a mask region between a reference image and all the images in a selfile, type:
$ correlation -ref reference.xmp -i selfile.sel -mask circular.msk
For each image in the selfile the program will write out one line, containing it's cross-correlation coefficient, euclidian distance and mutual information with respect to the reference image.
--Main.AlfredoSolano - 17 Jan 2007