Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

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    Major portions of this software are copyrighted by the Medical College
00003    of Wisconsin, 1994-2000, and are released under the Gnu General Public
00004    License, Version 2.  See the file README.Copyright for details.
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    /* mark duplicates for destruction */
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    }
 

Powered by Plone

This site conforms to the following standards: