#include <stdio.h>#include <stdlib.h>#include <math.h>#include <time.h>#include <string.h>#include <float.h>#include "img.h"#include "imgfile.h"#include "include/imgmatch.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 | 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 imgMatch | ( | IMG * | img1, |
| IMG * | img2, | ||
| float | accuracy | ||
| ) |
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))<=0.01. If you want exact match, set accuracy=0.0. |
Definition at line 55 of file imgmatch.c.
References imgMatchFrames(), imgMatchHeader(), imgMatchMatrix(), and imgMatchPlanes().
| int imgMatchFrames | ( | IMG * | img1, |
| IMG * | img2 | ||
| ) |
Checks if the frame times of two IMG data do match: return Returns 0 if match was found, and >0 if they do not match.
Definition at line 221 of file imgmatch.c.
Referenced by imgMatch().
| int imgMatchHeader | ( | IMG * | img1, |
| IMG * | img2 | ||
| ) |
Checks if two image headers match.
Definition at line 112 of file imgmatch.c.
Referenced by imgMatch().
| int imgMatchMatrix | ( | IMG * | img1, |
| IMG * | img2, | ||
| double | accuracy | ||
| ) |
Checks if two image matrixes match in the accuracy of argument "accuracy". (set e.g. 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.
Definition at line 83 of file imgmatch.c.
Referenced by imgMatch().
| int imgMatchPlanes | ( | IMG * | img1, |
| IMG * | img2 | ||
| ) |
Checks if the planes of two IMG data do match: plane numbers.
Definition at line 238 of file imgmatch.c.
Referenced by imgMatch().
| int imgMaxDifference | ( | IMG * | img1, |
| IMG * | img2, | ||
| VOXEL_4D * | absdiff, | ||
| float * | abs_max, | ||
| VOXEL_4D * | reldiff, | ||
| float * | rel_max | ||
| ) |
Checks if pixel values in two image matrices are similar withing specified allowed absolute difference.
| img1 | Pointer to the first IMG |
| 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 254 of file imgmatch.c.
References VOXEL_4D::t, VOXEL_4D::x, VOXEL_4D::y, and VOXEL_4D::z.
1.8.0