Doxygen Source Code Documentation
thd_floatscan.c File Reference
#include <math.h>
#include <stdlib.h>
Go to the source code of this file.
Data Structures | |
struct | complex |
Defines | |
#define | IS_GOOD_FLOAT(x) finite(x) |
Typedefs | |
typedef complex | complex |
Functions | |
int | thd_floatscan (int nbuf, float *fbuf) |
int | thd_complexscan (int nbuf, complex *cbuf) |
Define Documentation
|
Definition at line 13 of file thd_floatscan.c. Referenced by thd_complexscan(), and thd_floatscan(). |
Typedef Documentation
|
|
Function Documentation
|
Definition at line 40 of file thd_floatscan.c. References cbuf, complex::i, i, IS_GOOD_FLOAT, complex::r, and r. Referenced by T3D_read_images(), THD_load_analyze(), THD_load_datablock(), and THD_load_nifti().
00041 { 00042 int ii , nerr ; 00043 00044 if( nbuf <= 0 || cbuf == NULL ) return 0 ; 00045 00046 for( nerr=ii=0 ; ii < nbuf ; ii++ ){ 00047 if( !IS_GOOD_FLOAT(cbuf[ii].r) ){ cbuf[ii].r = 0.0 ; nerr++ ; } 00048 if( !IS_GOOD_FLOAT(cbuf[ii].i) ){ cbuf[ii].i = 0.0 ; nerr++ ; } 00049 } 00050 00051 return nerr ; 00052 } |
|
Definition at line 25 of file thd_floatscan.c. References IS_GOOD_FLOAT. Referenced by AFNI_fimmer_compute(), drive_MCW_grapher(), main(), MAKER_4D_to_typed_fbuc(), MAKER_4D_to_typed_fim(), MAKER_4D_to_typed_fith(), mri_read3D_analyze75(), mri_read_analyze75(), T3D_read_images(), THD_load_analyze(), THD_load_datablock(), THD_load_nifti(), THD_open_analyze(), and THD_warp3D().
00026 { 00027 int ii , nerr ; 00028 00029 if( nbuf <= 0 || fbuf == NULL ) return 0 ; 00030 00031 for( nerr=ii=0 ; ii < nbuf ; ii++ ){ 00032 if( !IS_GOOD_FLOAT(fbuf[ii]) ){ fbuf[ii] = 0.0 ; nerr++ ; } 00033 } 00034 00035 return nerr ; 00036 } |