Doxygen Source Code Documentation
thd_timeof.c File Reference
#include "mrilib.h"
#include "thd.h"
Go to the source code of this file.
Functions | |
float | THD_timeof (int it, float z, THD_timeaxis *tax) |
float | THD_timeof_vox (int it, int nvox, THD_3dim_dataset *dset) |
float | THD_timeof_slice (int it, int isl, THD_3dim_dataset *dset) |
Function Documentation
|
Definition at line 15 of file thd_timeof.c. References THD_timeaxis::dz_sl, ISVALID_TIMEAXIS, THD_timeaxis::nsl, THD_timeaxis::toff_sl, THD_timeaxis::ttdel, THD_timeaxis::ttorg, and THD_timeaxis::zorg_sl. Referenced by calculate_results(), FD_brick_to_series(), get_time(), initialize_slice_sequence(), MAKER_4D_to_typed_fbuc(), MAKER_4D_to_typed_fim(), MAKER_4D_to_typed_fith(), PLUTO_4D_to_nothing(), THD_extract_many_series(), and THD_extract_series().
00016 { 00017 float sl , tof ; 00018 int isl ; 00019 00020 if( ! ISVALID_TIMEAXIS(tax) ) return 0.0 ; 00021 00022 tof = tax->ttorg + it * tax->ttdel ; 00023 00024 if( tax->nsl <= 0 || tax->toff_sl == NULL ) return tof ; 00025 00026 isl = (z - tax->zorg_sl) / tax->dz_sl + 0.5 ; 00027 00028 if( isl < 0 || isl >= tax->nsl ) return tof ; 00029 00030 return tof + tax->toff_sl[isl] ; 00031 } |
|
Definition at line 63 of file thd_timeof.c. References ISVALID_DSET, ISVALID_TIMEAXIS, THD_timeaxis::nsl, THD_3dim_dataset::taxis, THD_timeaxis::toff_sl, THD_timeaxis::ttdel, and THD_timeaxis::ttorg. Referenced by cubic_spline().
00064 { 00065 float tof ; 00066 00067 if( !ISVALID_DSET(dset) || !ISVALID_TIMEAXIS(dset->taxis) ) return 0.0 ; 00068 00069 tof = dset->taxis->ttorg + it * dset->taxis->ttdel ; 00070 00071 if( dset->taxis->nsl <= 0 || dset->taxis->toff_sl == NULL ) return tof ; 00072 00073 if( isl < 0 || isl >= dset->taxis->nsl ) return tof ; 00074 00075 return tof + dset->taxis->toff_sl[isl] ; 00076 } |
|
Definition at line 38 of file thd_timeof.c. References DSET_NX, DSET_NY, ISVALID_DSET, ISVALID_TIMEAXIS, THD_timeaxis::nsl, THD_3dim_dataset::taxis, THD_timeaxis::toff_sl, THD_timeaxis::ttdel, and THD_timeaxis::ttorg. Referenced by main(), RT_registration_2D_onevol(), and RT_registration_3D_onevol().
00039 { 00040 float sl , tof ; 00041 int isl ; 00042 00043 if( !ISVALID_DSET(dset) || !ISVALID_TIMEAXIS(dset->taxis) ) return 0.0 ; 00044 00045 tof = dset->taxis->ttorg + it * dset->taxis->ttdel ; 00046 00047 if( dset->taxis->nsl <= 0 || dset->taxis->toff_sl == NULL ) return tof ; 00048 00049 isl = nvox / ( DSET_NX(dset) * DSET_NY(dset) ) ; 00050 00051 if( isl < 0 || isl >= dset->taxis->nsl ) return tof ; 00052 00053 return tof + dset->taxis->toff_sl[isl] ; 00054 } |