Doxygen Source Code Documentation
mri_float_func.c File Reference
#include "mrilib.h"
Go to the source code of this file.
Functions | |
MRI_IMAGE * | mri_float_func (int nx, int ny, float xzero, float yzero, float dx, float dy, float(*func)(float, float)) |
Function Documentation
|
Definition at line 13 of file mri_float_func.c. References func, mri_data_pointer(), and mri_new().
00017 { 00018 int ii , jj , jpos ; 00019 float yy ; 00020 MRI_IMAGE * im ; 00021 float * flim ; 00022 00023 im = mri_new( nx ,ny , MRI_float ) ; 00024 flim = mri_data_pointer( im ) ; 00025 00026 for( jj=0 ; jj < ny ; jj++ ){ 00027 jpos = nx * jj ; 00028 yy = yzero + jj * dy ; 00029 for( ii=0 ; ii < nx ; ii++ ){ 00030 flim[ii+jpos] = func( xzero + ii*dx , yy ) ; 00031 } 00032 } 00033 00034 return im ; 00035 } |