Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
flippo.c
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include <stdio.h>
00008 #include <stdlib.h>
00009 #include <string.h>
00010 #include <math.h>
00011
00012 typedef struct {
00013 int npt , nall ;
00014 float * x , * y ;
00015 int * typ ;
00016 } mri_cohar ;
00017
00018 #define DEL 0.001
00019
00020 void merge_cohar( mri_cohar * coh )
00021 {
00022 int ii , jj;
00023
00024 if( coh == NULL || coh->npt < 2 ) return ;
00025
00026
00027
00028 for( ii=1 ; ii < coh->npt ; ii++ ){
00029 for( jj=0 ; jj < ii ; jj++ ){
00030
00031 if( typ[jj] > 0 && typ[jj] == typ[ii] &&
00032 fabs(x[jj]-x[ii]) < DEL && fabs(y[jj]-y[ii]) < DEL ){
00033
00034 typ[ii] = -1 ;
00035 break ;
00036 }
00037 }
00038 }