|
TPCCLIB
|
Routines for checking if two IMG data are similar. More...
#include "libtpcimgio.h"Go to the source code of this file.
Functions | |
| int | imgMatch (IMG *img1, IMG *img2, float accuracy) |
| int | imgMatchMatrix (IMG *img1, IMG *img2, double accuracy) |
| int | imgMatchTransform (IMG *img1, IMG *img2) |
| int | imgMatchHeader (IMG *img1, IMG *img2) |
| int | imgMatchFrames (IMG *img1, IMG *img2) |
| int | imgMatchPlanes (IMG *img1, IMG *img2) |
| int | imgMaxDifference (IMG *img1, IMG *img2, VOXEL_4D *absdiff, float *abs_max, VOXEL_4D *reldiff, float *rel_max) |
| int | imgSS (IMG *img1, IMG *img2, double *ss) |
| int | imgMatchMatrixSize (IMG *d1, IMG *d2) |
Checks if two IMG data contents are similar (header information, frame times, data dimensions, matrix contents inside specified accuracy).
| img1 | Pointer to the first IMG data. |
| img2 | Pointer to the second IMG data to be compared against the first one. |
| accuracy | Pixel values must satisfy condition abs(x1-x2)/abs(mean(x1,x2)) <= accuracy (for example 0.01). If you want exact match, set accuracy=0.0. |
Definition at line 15 of file imgcomp.c.
Checks if the frame times of two IMG data do match:
Definition at line 286 of file imgcomp.c.
Referenced by imgMatch().
Checks if two image headers match.
Definition at line 128 of file imgcomp.c.
Referenced by imgMatch().
Checks if two image matrices match in the accuracy of argument "accuracy".
For example, set accuracy=0.99 and you will get match if all matrix values satisfy abs(x1-x2)/abs(mean(x1,x2))<=0.01). If you want exact match, set accuracy=0.0.
| img1 | Pointer to the first IMG structure. |
| img2 | Pointer to the second IMG structure. |
| accuracy | Required accuracy |
Definition at line 47 of file imgcomp.c.
Referenced by imgMatch().
Check whether two IMG data have the same matrix (x,y,z) size.
Checks if the planes of two IMG data do match: number of planes and plane numbers.
Definition at line 307 of file imgcomp.c.
Referenced by imgMatch().
Checks if the transform parameters of two image headers match.
Definition at line 85 of file imgcomp.c.
Referenced by imgMatch().
| int imgMaxDifference | ( | IMG * | img1, |
| IMG * | img2, | ||
| VOXEL_4D * | absdiff, | ||
| float * | abs_max, | ||
| VOXEL_4D * | reldiff, | ||
| float * | rel_max ) |
Calculates the maximal pixel value differences (absolute and relational) between two image matrices.
| img1 | Pointer to the first IMG structure. |
| img2 | Pointer to the second IMG, with the same dimensions as img1. |
| absdiff | Voxel where absolute difference was found largest; enter NULL if not needed; returns [0,0,0,0] if no difference was found. |
| abs_max | Pointer where max absolute difference is written; NULL if not needed. |
| reldiff | Voxel where relational difference was found largest; enter NULL if not needed; returns [0,0,0,0] if no difference was found. |
| rel_max | Pointer where max relational difference is written; NULL if not needed. |
Definition at line 328 of file imgcomp.c.
Calculates the sum-of-squares between pixels values of two images.
| img1 | Pointer to the first IMG data. |
| img2 | Pointer to the second IMG data. |
| ss | Pointer to the double variable to write the SS into. |
Definition at line 412 of file imgcomp.c.