#include <sys/stat.h>
#include <sys/types.h>
Data Structures | |
struct | _grad_heat_handle |
struct | _grad_list |
struct | ks_rampparams_s |
Macros | |
#define | MSS_FLAGS_T void |
#define | KS_INIT_RAMPPARAMS {0, 0, 0, 0} |
Typedefs | |
typedef int(* | ks_comparator) (const void *, const void *) |
Functions | |
int | ftruncate (int fd, off_t length) |
STATUS | inittargets (LOG_GRAD *lgrad, PHYS_GRAD *pgrad) |
STATUS | obloptimize_epi (LOG_GRAD *lgrad, PHYS_GRAD *pgrad, SCAN_INFO *scaninfotab, INT slquant, INT plane_type, INT coaxial, INT method, INT debug, INT *newgeo, INT srmode) |
STATUS | minseqrfamp (INT *Minseqrfamp, const INT numPulses, const RF_PULSE *rfpulse, const INT entry) |
STATUS | maxsar (INT *Maxseqsar, INT *Maxslicesar, DOUBLE *Avesar, DOUBLE *Cavesar, DOUBLE *Pksar, DOUBLE *B1rms, const INT numPulses, const RF_PULSE *rfpulse, const INT entry, const INT tr_val) |
STATUS | minseq (INT *p_minseqgrad, GRAD_PULSE *gradx, const INT gx_free, GRAD_PULSE *grady, const INT gy_free, GRAD_PULSE *gradz, const INT gz_free, const LOG_GRAD *log_grad, const INT seq_entry_index, const INT samp_rate, const INT min_tr, const INT e_flag, const INT debug_flag) |
void | ks_init_read (KS_READ *read) |
void | ks_init_trap (KS_TRAP *trap) |
void | ks_init_wait (KS_WAIT *wait) |
void | ks_init_wave (KS_WAVE *wave) |
void | ks_init_rf (KS_RF *rf) |
void | ks_init_sms_info (KS_SMS_INFO *sms_info) |
void | ks_init_selrf (KS_SELRF *selrf) |
void | ks_init_readtrap (KS_READTRAP *readtrap) |
void | ks_init_phaser (KS_PHASER *phaser) |
void | ks_init_epi (KS_EPI *epi) |
void | ks_init_readwave (KS_READWAVE *readwave) |
void | ks_init_gradrfctrl (KS_GRADRFCTRL *gradrfctrl) |
void | ks_init_seqcontrol (KS_SEQ_CONTROL *seqcontrol) |
void | ks_init_seqcollection (KS_SEQ_COLLECTION *seqcollection) |
STATUS | ks_init_slewratecontrol (LOG_GRAD *loggrd, PHYS_GRAD *phygrd, float srfact) |
void | ks_init_echotrain (KS_ECHOTRAIN *const echotrain) |
STATUS | ks_eval_addtoseqcollection (KS_SEQ_COLLECTION *seqcollection, KS_SEQ_CONTROL *seqctrl) |
STATUS | ks_eval_seqcollection_isadded (KS_SEQ_COLLECTION *seqcollection, KS_SEQ_CONTROL *seqctrl) |
STATUS | ks_eval_wait (KS_WAIT *wait, const char *const desc, int pg_duration, int max_duration) |
STATUS | ks_eval_isirot (KS_ISIROT *isirot, const char *const desc, int isinumber) |
STATUS | ks_eval_read (KS_READ *read, const char *const desc) |
STATUS | ks_eval_trap_constrained (KS_TRAP *trap, const char *const desc, float ampmax, float slewrate, int minduration) |
STATUS | ks_eval_trap (KS_TRAP *trap, const char *const desc) |
STATUS | ks_eval_trap2 (KS_TRAP *trap, const char *const desc) |
STATUS | ks_eval_trap1 (KS_TRAP *trap, const char *const desc) |
STATUS | ks_eval_trap_rotation_invariant_75_max_slewrate (KS_TRAP *trap, const char *const desc) |
STATUS | ks_eval_trap_constrained_time_maxarea (KS_TRAP *trap, const char *const desc, float ampmax, float slewrate, float maxarea, int derate_slewrate) |
STATUS | ks_eval_set_asym_padding (struct _readtrap_s *readtrap, float wanted_paddingarea_pre, float wanted_paddingarea_post) |
STATUS | ks_eval_trap1p (KS_TRAP *trap, const char *const desc) |
STATUS | ks_eval_ramp (KS_WAVE *ramp, float slew, float end_amp, int dwell) |
STATUS | ks_calc_unconstrained_transition (float *G, float *t, int *num_points, float req_area, float end_amp, float slew, float ampmax, unsigned int min_plateau) |
STATUS | ks_calc_exact_transition (float *G, float *t, int *num_points, float req_area, float end_amp, float min_duration, float slew, float ampmax, unsigned int min_plateau) |
STATUS | ks_calc_minslew_transition (float *G, float *t, int *num_points, float req_area, float end_amp, float min_duration, float slew, float ampmax, unsigned int min_plateau) |
STATUS | ks_calc_maxarea_transition (float *G, float *t, int *num_points, float req_area, float end_amp, float max_duration, float slew, float ampmax, unsigned int min_plateau) |
STATUS | ks_eval_crusher (KS_WAVE *crusher, const float end_amp, const ks_crusher_constraints crusher_constraints) |
STATUS | ks_eval_readtrap_constrained (KS_READTRAP *readtrap, const char *const desc, float ampmax, float slewrate) |
STATUS | ks_eval_readtrap (KS_READTRAP *readtrap, const char *const desc) |
STATUS | ks_eval_readtrap2 (KS_READTRAP *readtrap, const char *const desc) |
STATUS | ks_eval_readtrap1 (KS_READTRAP *readtrap, const char *const desc) |
STATUS | ks_eval_readtrap_constrained_sample_duration (struct _readtrap_s *readtrap, const char *const desc, const float ampmax, const float slewrate, const int t_A, const int sample_duration, const float area_post, const float area_total) |
STATUS | ks_eval_readwave_constrained (KS_READWAVE *readwave, KS_WAVE *acq_waves, const int numstates, int flag_symmetric_padding, ks_crusher_constraints pre_crusher_constraints, ks_crusher_constraints post_crusher_constraints) |
void | ks_eval_readwave_negatestate (KS_READWAVE *readwave, int state) |
STATUS | ks_eval_readwave_multistated (KS_READWAVE *readwave, KS_WAVE *acq_waves, const int numstates, float pre_crusher_area, float post_crusher_area, int flag_symmetric_padding, ks_enum_crusher_strategy pre_strategy, ks_enum_crusher_strategy post_strategy) |
STATUS | ks_eval_readwave (KS_READWAVE *readwave, KS_WAVE *acq_wave, float pre_crusher_area, float post_crusher_area, int flag_symmetric_padding, ks_enum_crusher_strategy pre_strategy, ks_enum_crusher_strategy post_strategy) |
int | ks_eval_kynover_fromnex (int yres, float partial_ky, int minkynover) |
void | ks_eval_phaseviewtable (KS_PHASER *phaser) |
STATUS | ks_eval_phaser_adjustres (KS_PHASER *phaser, const char *const desc) |
STATUS | ks_eval_phaser_setaccel (KS_PHASER *phaser, int min_acslines, float R) |
STATUS | ks_eval_phaser_constrained (KS_PHASER *phaser, const char *const phasername, float ampmax, float slewrate, int minduration) |
STATUS | ks_eval_phaser (KS_PHASER *phaser, const char *const phasername) |
STATUS | ks_eval_phaser2 (KS_PHASER *phaser, const char *const phasername) |
STATUS | ks_eval_phaser1 (KS_PHASER *phaser, const char *const phasername) |
STATUS | ks_eval_phaser1p (KS_PHASER *phaser, const char *const phasername) |
STATUS | ks_eval_wave (KS_WAVE *wave, const char *const desc, const int res, const int duration, const KS_WAVEFORM waveform) |
STATUS | ks_eval_wave_file (KS_WAVE *wave, const char *const desc, int res, int duration, const char *const filename, const char *const format) |
STATUS | ks_eval_mirrorwave (KS_WAVE *wave) |
STATUS | ks_eval_mirrorwaveform (KS_WAVEFORM waveform, int res) |
STATUS | ks_eval_rf_sinc (KS_RF *rf, const char *const desc, double bw, double tbw, float flip, int wintype) |
STATUS | ks_eval_rf_secant (KS_RF *rf, const char *const desc, float A0, float tbw, float bw) |
STATUS | ks_eval_rf_hard (KS_RF *rf, const char *const desc, int duration, float flip) |
STATUS | ks_eval_rf_hard_optimal_duration (KS_RF *rf, const char *const desc, int order, float flip, float offsetFreq) |
STATUS | ks_eval_rf_binomial (KS_RF *rf, const char *const desc, int offResExc, int nPulses, float flip, float offsetFreq, int MTreduction) |
STATUS | ks_eval_mt_rf_binomial (KS_RF *rf, const char *const desc, int sub_pulse_dur, int nPulses, int prp) |
STATUS | ks_eval_rfstat (KS_RF *rf) |
STATUS | ks_eval_rf (KS_RF *rf, const char *const desc) |
void | ks_eval_rf_relink (KS_RF *rf) |
STATUS | ks_eval_seltrap (KS_TRAP *trap, const char *const desc, float slewrate, float slthick, float bw, int rfduration) |
STATUS | ks_eval_selwave (KS_WAVE *gradwave, const char *const desc, float slthick, float bw, int rfduration) |
STATUS | ks_eval_selrf_constrained (KS_SELRF *selrf, const char *const desc, float ampmax, float slewrate) |
STATUS | ks_eval_selrf (KS_SELRF *selrf, const char *const desc) |
STATUS | ks_eval_selrf2 (KS_SELRF *selrf, const char *const desc) |
STATUS | ks_eval_selrf1 (KS_SELRF *selrf, const char *const desc) |
STATUS | ks_eval_selrf1p (KS_SELRF *selrf, const char *const desc) |
float | ks_eval_findb1 (KS_SELRF *selrf, float max_b1, double scaleFactor, int sms_multiband_factor, int sms_phase_modulation_mode, float sms_slice_gap) |
void | ks_eval_transient_SPGR_FA_train_recursive (float *FA_train, float *MZ_train, int N, float E1, float target_MT, int n) |
void | ks_eval_transient_SPGR_FA_train_binary_search (float *FA_train, float *MZ_train, int N, float E1, float MTlo, float MThi, float total_FA) |
STATUS | ks_eval_check_FA_train (int N, float *FA_train, float *MZ_train, float total_FA) |
STATUS | ks_eval_transient_SPGR_FA_train (float *FA_train, int N, float TR, float T1, float total_FA) |
STATUS | ks_eval_sms_make_multiband (KS_SELRF *selrfMB, const KS_SELRF *selrf, const int sms_multiband_factor, const int sms_phase_modulation_mode, const float sms_slice_gap, int debug) |
STATUS | ks_eval_sms_get_phase_modulation (float *sms_phase_modulation, const int sms_multiband_factor, const int sms_phase_modulation_mode) |
float | ks_eval_sms_calc_slice_gap (int sms_multiband_factor, int nslices, float slthick, float slspace) |
float | ks_eval_sms_calc_slice_gap_from_scan_info (int sms_multiband_factor, int nslices, const SCAN_INFO *org_slice_positions) |
float | ks_eval_sms_calc_caipi_area (int caipi_fov_shift, float sms_slice_gap) |
STATUS | ks_eval_caipiblip (KS_TRAP *caipiblip, const int caipi_factor, const float sms_slice_gap, const KS_DESCRIPTION seq_desc) |
int | ks_eval_sms_rf_scan_info (SCAN_INFO *sms_slice_positions, const SCAN_INFO *org_slice_positions, int sms_factor, int nslices) |
STATUS | ks_eval_stretch_rf (KS_RF *rf, float stretch_factor) |
STATUS | ks_eval_sms_make_pins (KS_SELRF *selrfPINS, const KS_SELRF *selrf, float sms_slice_gap) |
STATUS | ks_eval_sms_make_pins_dante (KS_SELRF *selrfPINS, const KS_SELRF *selrf, float sms_slice_gap) |
int | ks_eval_findNearestNeighbourIndex (float value, const float *x, int length) |
void | ks_eval_linear_interp1 (const float *x, int x_length, const float *y, const float *xx, int xx_length, float *yy) |
STATUS | ks_eval_readtrap2readwave (KS_READTRAP *readtrap, KS_READWAVE *readwave) |
STATUS | ks_eval_trap2wave (KS_WAVE *wave, const KS_TRAP *trap) |
STATUS | ks_eval_coords2wave (KS_WAVE *wave, float *t, float *G, int num_coords, int dwell, const char *desc) |
STATUS | ks_eval_append_two_waves (KS_WAVE *first_wave, KS_WAVE *second_wave) |
STATUS | ks_eval_append_two_waveforms (KS_WAVEFORM first_waveform, KS_WAVEFORM second_waveform, int res1, int res2) |
STATUS | ks_eval_concatenate_waves (int num_waves, KS_WAVE *target_wave, KS_WAVE **waves_to_append) |
STATUS | ks_eval_epi_constrained (KS_EPI *epi, const char *const desc, float ampmax, float slewrate) |
STATUS | ks_eval_epi_setinfo (KS_EPI *epi) |
STATUS | ks_eval_epi_maxamp_slewrate (float *ampmax, float *slewrate, int xres, float quietnessfactor) |
STATUS | ks_eval_epi (KS_EPI *epi, const char *const desc, float quietnessfactor) |
STATUS | ks_eval_echotrain (KS_ECHOTRAIN *const echotrain) |
GRAD_PULSE | ks_eval_makegradpulse (KS_TRAP *trp, int gradchoice) |
STATUS | ks_eval_seqctrl_setminduration (KS_SEQ_CONTROL *seqctrl, int mindur) |
STATUS | ks_eval_seqctrl_setduration (KS_SEQ_CONTROL *seqctrl, int dur) |
STATUS | ks_eval_seqcollection_durations_setminimum (KS_SEQ_COLLECTION *seqcollection) |
STATUS | ks_eval_seqcollection_durations_atleastminimum (KS_SEQ_COLLECTION *seqcollection) |
void | ks_grad_heat_init (KS_SEQ_COLLECTION *seqcollection_p, STATUS(*play)(const INT max_encode_mode, int nargs, void **args), int nargs, void **args) |
void | ks_grad_heat_reset () |
STATUS | _grad_list_init (struct _grad_list *grads) |
STATUS | _grad_list_append (struct _grad_list *grads, t_list *grad, int board) |
int | _grad_compare (const void *_a, const void *_b) |
STATUS | _grad_list_remove_duplicates (struct _grad_list *grads) |
STATUS | _grad_list_add_sequence (struct _grad_list *grads, KS_SEQ_CONTROL *ctrl) |
STATUS | __wrap_getCornerPoints (FLOAT **p_time, FLOAT *ampl[3], FLOAT *pul_type[3], INT *num_totpoints, const LOG_GRAD *log_grad, const INT seq_entry_index, const INT samp_rate, const INT min_tr, const FLOAT dbdtinf, const FLOAT dbdtfactor, const FLOAT efflength, const INT max_encode_mode, const dbLevel_t debug) |
STATUS | ks_eval_gradlimits (int *newtime, KS_SEQ_COLLECTION *seqcollection, const LOG_GRAD *log_grad, STATUS(*play)(const INT max_encode_mode, int nargs, void **args), int nargs, void **args) |
int | ks_eval_rflimits (KS_SAR *sar, KS_SEQ_COLLECTION *seqcollection) |
STATUS | ks_eval_hwlimits (int *newtime, KS_SEQ_COLLECTION *seqcollection, const LOG_GRAD *log_grad, STATUS(*play)(const INT max_encode_mode, int nargs, void **args), int nargs, void **args) |
s64 | ks_eval_getduration (KS_SEQ_COLLECTION *seqcollection, STATUS(*play)(const INT max_encode_mode, int nargs, void **args), int nargs, void **args) |
int | ks_eval_mintr (int nslices, KS_SEQ_COLLECTION *seqcollection, int(*play_loop)(int, int, void **), int nargs, void **args) |
int | ks_eval_maxslicespertr (int TR, KS_SEQ_COLLECTION *seqcollection, int(*play_loop)(int, int, void **), int nargs, void **args) |
void | ks_eval_seqcollection_resetninst (KS_SEQ_COLLECTION *seqcollection) |
s64 | ks_eval_seqcollection_gettotalduration (KS_SEQ_COLLECTION *seqcollection) |
s64 | ks_eval_seqcollection_gettotalminduration (KS_SEQ_COLLECTION *seqcollection) |
STATUS | ks_eval_seqcollection2rfpulse (RF_PULSE *rfpulse, KS_SEQ_COLLECTION *seqcollection) |
int | ks_isIceHardware () |
int | ks_default_ssitime () |
STATUS | ks_bitmask_set (unsigned int out, const unsigned int in, const unsigned int size, const unsigned int offset) |
unsigned int | ks_bitmask_get (const unsigned int in, const unsigned int size, const unsigned int offset) |
_cvfloat * | opuser_from_number (_cvfloat *cv) |
unsigned int | ks_calc_nextpow2 (unsigned int n) |
int | ks_calc_roundupms (int val) |
STATUS | ks_calc_filter (FILTER_INFO *echortf, int tsp, int duration) |
STATUS | ks_write_vector_bf (float *vec, uint32_t numel, const char *fname) |
int | ks_calc_bw2tsp (float bw) |
float | ks_calc_tsp2bw (int tsp) |
float | ks_calc_nearestbw (float bw) |
float | ks_calc_lower_rbw (float rbw) |
float | ks_calc_higher_rbw (float rbw) |
float | ks_calc_max_rbw (float ampmax, float fov) |
int | ks_calc_trap_time2area (KS_TRAP *trap, float area) |
STATUS | ks_calc_sliceplan (KS_SLICE_PLAN *slice_plan, int nslices, int slperpass) |
STATUS | ks_calc_sliceplan_interleaved (KS_SLICE_PLAN *slice_plan, int nslices, int slperpass, int ninterleaves) |
STATUS | ks_calc_sliceplan_sms (KS_SLICE_PLAN *slice_plan, int nslices, int slperpass, int multiband_factor) |
STATUS | ks_sms_check_divisibility (int *inpass_interleaves, const int sms_factor, const int nslices_per_pass, const int nslices) |
int | ks_calc_sms_min_gap (DATA_ACQ_ORDER *dacq, int nslices) |
int | ks_calc_slice_acquisition_order_smssingleacq_impl (DATA_ACQ_ORDER *dacq, int nslices, int interleave) |
int | ks_calc_slice_acquisition_order_smssingleacq (DATA_ACQ_ORDER *dacq, int nslices) |
float | ks_calc_integrate_coords (float *t, float *G, int num_coords) |
int | ks_get_center_encode (const KS_PHASEENCODING_PLAN *const peplan, const int shot, const int yres, const int zres) |
int | ks_get_center_encode_linearsweep (const KS_KSPACE_ACQ *kacq, const int etl, const KS_PF_EARLYLATE pf_earlylate_te) |
void | ks_print_seqcollection (KS_SEQ_COLLECTION *seqcollection, FILE *fp) |
void | ks_print_sliceplan (const KS_SLICE_PLAN slice_plan, FILE *fp) |
void | ks_print_scaninfo (const SCAN_INFO *scan_info, int nslices, const char *desc, FILE *fp) |
void | ks_print_waveform (const KS_WAVEFORM waveform, const char *filename, int res) |
void | ks_print_wave_part (const KS_WAVE *const wave, const char *filename, int startidx, int numel) |
void | ks_print_readwave (const KS_READWAVE *const readwave, const char *filename) |
void | ks_print_wave (const KS_WAVE *const wave, const char *filename) |
void | ks_print_read (KS_READ a, FILE *fp) |
void | ks_print_trap (KS_TRAP t, FILE *fp) |
void | ks_print_readtrap (KS_READTRAP r, FILE *fp) |
void | ks_print_phaser (KS_PHASER p, FILE *fp) |
void | ks_print_gradrfctrl (KS_GRADRFCTRL gradrfctrl, FILE *fp) |
void | ks_print_epi (KS_EPI s, FILE *fp) |
void | ks_print_rfpulse (RF_PULSE rfpulse, FILE *fp) |
void | ks_print_rf (KS_RF r, FILE *fp) |
void | ks_print_selrf (KS_SELRF r, FILE *fp) |
STATUS | ks_print_acqwaves (KS_SEQ_COLLECTION *seqcollection) |
void | ks_print_readwaves (KS_ECHOTRAIN *const echotrain, const char *suffix, int rhkacq_uid) |
int | ks_eval_clear_readwave (KS_READWAVE *readwave) |
float | get_t1 (float A, float s, float c) |
float | get_T (float A, float s, float c, float t1) |
float | get_b (float A, float c, float T, float t1) |
void | get_ramp (ks_rampparams_s *out, float A, float s, float c) |
STATUS | ks_area_to_amp (KS_WAVE *out, float area, float max_slew, float amp) |
int | ks_eval_append_blip (KS_WAVE *wave, const float max_s, const int max_points, const float area) |
int | ks_file_exist (char *filename) |
void | ks_plot_host_slicetime_path (char *path) |
void | ks_plot_host_slicetime_fullfile (char *fullfile) |
void | ks_plot_host_slicetime_delete () |
void | ks_plot_host_slicetime_begin () |
void | ks_plot_host_slicetime_endofslicegroup (const char *desc, const KS_PLOT_SLICEGROUP_MODE mode) |
void | ks_plot_host_slicetime_endofpass (KS_PLOT_PASS_MODE pass_mode) |
void | ks_plot_host_slicetime (const KS_SEQ_CONTROL *ctrl, int nslices, float *slicepos_mm, float slthick_mm, KS_PLOT_EXCITATION_MODE excmode) |
void | ks_plot_host_slicetime_end () |
void | ks_plot_host (const KS_SEQ_COLLECTION *seqcollection, const KS_PHASEENCODING_PLAN *plan) |
void | ks_plot_host_seqctrl (const KS_SEQ_CONTROL *ctrl, const KS_PHASEENCODING_PLAN *plan) |
void | ks_plot_host_rtscales_amps (const KS_RT_SCALE_LOG *rtscalelog, FILE *fp, const int instance) |
void | ks_plot_host_rtscales_states (const KS_RT_SCALE_LOG *rtscalelog, FILE *fp, const int instance) |
void | ks_plot_host_wavestates (const KS_WAVE *waveptr, FILE *fp) |
void | ks_plot_write_peplans (const KS_PHASEENCODING_PLAN *const *plans, const int num_plans, FILE *fp) |
void | ks_plot_host_seqctrl_manyplans (const KS_SEQ_CONTROL *ctrl, const KS_PHASEENCODING_PLAN **plans, const int num_plans) |
void | ks_plot_filename (char *fname, char *path, char *outputdir, char *outputdir_uid, const char *const seq_desc) |
void | ks_plot_saveconfig (KS_SEQ_CONTROL *ctrl) |
STATUS | ks_repeat_peplan (KS_PHASEENCODING_PLAN *peplan, const KS_PHASEENCODING_REPEAT_DESIGN *const repeat) |
int | ks_comp_kcoord_r_t (const void *a, const void *b) |
int | ks_comp_kcoord_dist_z_y (const void *a, const void *b) |
int | ks_comp_kview_dist_z_y (const void *a, const void *b) |
int | ks_comp_kcoord_dist_y_z (const void *a, const void *b) |
int | ks_comp_kview_dist_y_z (const void *a, const void *b) |
int | ks_comp_kcoord_z_y (const void *a, const void *b) |
int | ks_comp_kcoord_y_z (const void *a, const void *b) |
int | ks_comp_kview_r_t (const void *a, const void *b) |
int | ks_comp_kview_t_r (const void *a, const void *b) |
int | ks_comp_kview_y_z (const void *a, const void *b) |
int | ks_comp_kview_z_y (const void *a, const void *b) |
int | ks_comp_kview_y_r (const void *a, const void *b) |
int | ks_comp_kview_z_r (const void *a, const void *b) |
int | ks_comp_kview_e_tr (const void *a, const void *b) |
int | ks_comp_kview_e_rt (const void *a, const void *b) |
int | ks_comp_kview_e_zy (const void *a, const void *b) |
int | ks_comp_kview_e_yz (const void *a, const void *b) |
int | ks_comp_kview_e_yr (const void *a, const void *b) |
int | ks_comp_kview_e_zr (const void *a, const void *b) |
int | ks_comp_kview_e_sec_t (const void *a, const void *b) |
int | ks_comp_kview_y_z_descend (const void *a, const void *b) |
int | ks_comp_kview_z_y_descend (const void *a, const void *b) |
ks_comparator | ks_get_comp_kview_y_z (int ascend) |
ks_comparator | ks_get_comp_kview_z_y (int ascend) |
void | ks_get_matrix_from_kcoords (KS_KCOORD *K, const int num_coords, int *y, int *z) |
void | ks_pe_linear (int *view_order, int ETL) |
void | ks_pe_linear_roll (int *view_order, int ETL, int c) |
void | ks_pe_pivot_roll (int *view_order, int ETL, int c) |
void | ks_pivot_linear_center_symk (int *view_order, int ETL, int c) |
void | ks_pivot_specific_center_symk (int *view_order, int ETL, int c) |
void | ks_pivot_specific_center_radk (int *view_order, int ETL, int c) |
int | ks_readout_start_index (int center, int etl, int num_encodes_per_train) |
KS_PEPLAN_SHOT_DISTRIBUTION | ks_peplan_distribute_shots (const int etl, const int num_coords, const int center) |
int | ks_peplan_find_center_from_linear_sweep (KS_KCOORD *const K, KS_VIEW *views_in, const int num_coords, const KS_MTF_DIRECTION mtf_direction, const int sweep_sign, const int segment_size, const int start_encode) |
STATUS | ks_peplan_assign_shots (KS_PHASEENCODING_PLAN *peplan, const KS_VIEW *const views, const int num_views, const KS_PEPLAN_SHOT_DISTRIBUTION *const shot_dist, const int first_shot_number, const int y_offset, const int z_offset, const int is3D) |
STATUS | ks_generate_peplan_from_kcoords_american (const KS_KSPACE_ACQ *kacq, KS_PHASEENCODING_PLAN *peplan, const KS_MTF_DIRECTION mtf_direction, const int etl, const int center) |
STATUS | ks_generate_peplan_from_kcoords_dutch (const KS_KSPACE_ACQ *kacq, KS_PHASEENCODING_PLAN *peplan, KS_MTF_DIRECTION mtf_direction, const int etl, const int center) |
STATUS | ks_assign_encodes (KS_VIEW *const views, const int num_views, const int start_encode, const int num_encodes, const int sign) |
STATUS | ks_pe_permute_pclo_rad (int *view_order, const int etl, const int center) |
STATUS | ks_lcpo_assign_encodes (KS_VIEW *views, const int num_coords, KS_MTF_DIRECTION mtf_direction, const int split_shots, const int etl, const int center) |
STATUS | ks_generate_peplan_from_kcoords (const KS_KSPACE_ACQ *kacq, KS_PHASEENCODING_PLAN *peplan, KS_MTF_DIRECTION mtf_direction, KS_VIEW_SORT_ORDER encode_shot_assignment_order, KS_VIEW_MTF_PROFILE mtf_profile, const int etl, int center, const KS_COORDINATE_TYPE *coord_types) |
STATUS | ks_phaseencoding_generate_2d_singleshot_cal (KS_PHASEENCODING_PLAN *phaseenc_plan_ptr, int yres) |
int | ks_cal_from_nacslines (int R, int nacslines) |
STATUS | ks_generate_3d_coords_caipi (KS_KSPACE_ACQ *kacq, int Ny, int Nz, int nover_y, int nover_z, int Ry, int Rz, int cal_y, int cal_z, KS_COVERAGE cal_coverage, KS_COVERAGE acq_coverage, int dy, int dz, int step_y, int step_z) |
STATUS | ks_generate_3d_coords_simple (KS_KSPACE_ACQ *kacq, int Ny, int Nz, int nover_y, int nover_z, int Ry, int Rz, int cal_y, int cal_z, KS_COVERAGE cal_coverage, KS_COVERAGE acq_coverage) |
STATUS | ks_generate_2d_coords_cal (KS_KSPACE_ACQ *kacq, int num_desired_coords, int yres) |
STATUS | ks_generate_3d_coords_radial (KS_KSPACE_ACQ *kacq, int tiny_level, int Ny, int Nz, int Ry, int Rz, KS_RADIAL_SAMPLING_MODE radial_mode, KS_RADIAL_SAMPLING_COVERAGE radial_sampling_coverage) |
void | set_grid (int *grid, int Nz, int y, int z) |
int | get_grid (int *grid, int Nz, int y, int z) |
float | rand_float_in_range (float min, float max) |
float | ks_poisson_disc_min_spacing (const int y, const int z, const float center_y, const float center_z, const float min_spacing, const float max_spacing, const RADIUS_PATTERN pattern) |
int | check_conflicts (int *grid, int Ny, int Nz, KS_KCOORD cand, float cand_radius) |
void | remove_element (KS_KCOORD *coord_array, int idx, int size) |
STATUS | ks_generate_3d_coords_poisson_disc_R (KS_KSPACE_ACQ *kacq, int Ny, int Nz, float R, KS_COVERAGE cal_coverage, int cal_y, int cal_z, RADIUS_PATTERN pattern) |
STATUS | ks_generate_3d_coords_poisson_disc (KS_KSPACE_ACQ *kacq, int Ny, int Nz, float min_spacing, float max_spacing, KS_COVERAGE cal_coverage, int cal_y, int cal_z, RADIUS_PATTERN pattern) |
STATUS | ks_generate_3d_coords_epi (KS_KSPACE_ACQ *kacq, const KS_EPI *epitrain, const ks_enum_epiblipsign blipsign, const int Ry, const int caipi_delta) |
Variables | |
int | cfsrmode |
int | cfgcoiltype |
int | rhkacq_uid |
int | ks_plot_filefmt |
int | ks_plot_kstmp |
char | ks_psdname [256] |
struct _grad_heat_handle | grad_heat_handle = {NULL, NULL, 0, NULL} |
int | gradHeatMethod |
int | enforce_minseqseg |
_cvint | _optr |
int | minseqcable_t |
int | minseqbusbar_t |
int | ks_plot_enable = 0 |
#define MSS_FLAGS_T void |
#define KS_INIT_RAMPPARAMS {0, 0, 0, 0} |
typedef int(* ks_comparator) (const void *, const void *) |
int ftruncate | ( | int | fd, |
off_t | length | ||
) |
STATUS inittargets | ( | LOG_GRAD * | lgrad, |
PHYS_GRAD * | pgrad | ||
) |
STATUS obloptimize_epi | ( | LOG_GRAD * | lgrad, |
PHYS_GRAD * | pgrad, | ||
SCAN_INFO * | scaninfotab, | ||
INT | slquant, | ||
INT | plane_type, | ||
INT | coaxial, | ||
INT | method, | ||
INT | debug, | ||
INT * | newgeo, | ||
INT | srmode | ||
) |
STATUS minseqrfamp | ( | INT * | Minseqrfamp, |
const INT | numPulses, | ||
const RF_PULSE * | rfpulse, | ||
const INT | entry | ||
) |
STATUS maxsar | ( | INT * | Maxseqsar, |
INT * | Maxslicesar, | ||
DOUBLE * | Avesar, | ||
DOUBLE * | Cavesar, | ||
DOUBLE * | Pksar, | ||
DOUBLE * | B1rms, | ||
const INT | numPulses, | ||
const RF_PULSE * | rfpulse, | ||
const INT | entry, | ||
const INT | tr_val | ||
) |
STATUS minseq | ( | INT * | p_minseqgrad, |
GRAD_PULSE * | gradx, | ||
const INT | gx_free, | ||
GRAD_PULSE * | grady, | ||
const INT | gy_free, | ||
GRAD_PULSE * | gradz, | ||
const INT | gz_free, | ||
const LOG_GRAD * | log_grad, | ||
const INT | seq_entry_index, | ||
const INT | samp_rate, | ||
const INT | min_tr, | ||
const INT | e_flag, | ||
const INT | debug_flag | ||
) |
void ks_init_read | ( | KS_READ * | read | ) |
void ks_init_trap | ( | KS_TRAP * | trap | ) |
void ks_init_wait | ( | KS_WAIT * | wait | ) |
void ks_init_wave | ( | KS_WAVE * | wave | ) |
void ks_init_rf | ( | KS_RF * | rf | ) |
void ks_init_sms_info | ( | KS_SMS_INFO * | sms_info | ) |
[out] | sms_info | Pointer to KS_SMS_INFO |
void ks_init_selrf | ( | KS_SELRF * | selrf | ) |
void ks_init_readtrap | ( | KS_READTRAP * | readtrap | ) |
[out] | readtrap | Pointer to KS_READTRAP |
void ks_init_phaser | ( | KS_PHASER * | phaser | ) |
void ks_init_epi | ( | KS_EPI * | epi | ) |
void ks_init_readwave | ( | KS_READWAVE * | readwave | ) |
[out] | readwave | Pointer to KS_READWAVE |
void ks_init_gradrfctrl | ( | KS_GRADRFCTRL * | gradrfctrl | ) |
[out] | gradrfctrl | Pointer to KS_GRADRFCTRL |
void ks_init_seqcontrol | ( | KS_SEQ_CONTROL * | seqcontrol | ) |
[out] | seqcontrol | Pointer to KS_INIT_SEQ_CONTROL |
void ks_init_seqcollection | ( | KS_SEQ_COLLECTION * | seqcollection | ) |
[out] | seqcollection | Pointer to KS_INIT_SEQ_COLLECTION |
STATUS ks_init_slewratecontrol | ( | LOG_GRAD * | loggrd, |
PHYS_GRAD * | phygrd, | ||
float | srfact | ||
) |
inittargets()
in e.g. GEReq_init_gradspecs())If srfact
< 1.0, both phygrd
and loggrd
are updated, and the gradients will be switched propotionally slower. This can be used to make the acquistion quieter. If srfact
> 1.0, only loggrd
will be updated. This could be used as an attempt to switch the gradients faster, but should be used with care as the risk for peripheral nerve stimulation (PNS) increases and the gradients may trip.
[in,out] | loggrd | Pointer to LOG_GRAD |
[in,out] | phygrd | Pointer to PHYS_GRAD |
[in] | srfact | Slewrate factor (< 1.0 means less acquistic noise and reduced risk for PNS) |
void ks_init_echotrain | ( | KS_ECHOTRAIN *const | echotrain | ) |
[in,out] | echotrain | pointer to the structure you want to initialise with (KS_INIT_ECHOTRAIN). |
STATUS ks_eval_addtoseqcollection | ( | KS_SEQ_COLLECTION * | seqcollection, |
KS_SEQ_CONTROL * | seqctrl | ||
) |
The KS_SEQ_CONTROL object will be ignored if added previously or if its .duration
field is zero. A zero duration of a KS_SEQ_CONTROL indicates that this sequence module should not be used with the current settings
[in,out] | seqcollection | Pointer to the KS_SEQ_COLLECTION for the sequence |
[in] | seqctrl | Pointer to KS_SEQ_CONTROL |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_seqcollection_isadded | ( | KS_SEQ_COLLECTION * | seqcollection, |
KS_SEQ_CONTROL * | seqctrl | ||
) |
[in] | seqcollection | Pointer to the KS_SEQ_COLLECTION for the sequence |
[in] | seqctrl | Pointer to KS_SEQ_CONTROL |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_wait | ( | KS_WAIT * | wait, |
const char *const | desc, | ||
int | pg_duration, | ||
int | maxduration | ||
) |
This function should be called in cveval()
and defines a wait pulse whose duration can be changed at scan-time up to .duration
[us].
If ks_eval_wait() returns FAILURE, one must also make sure cveval()
returns FAILURE, otherwise an error message created in ks_eval_wait() will not be seen in the UI.
[out] | wait | Pointer to the KS_WAIT object to be set up |
[in] | desc | A description (text string) of the KS_WAIT object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | pg_duration | ADDTEXTHERE |
[in] | maxduration | The desired maximum duration in [us] of the KS_WAIT object |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_isirot | ( | KS_ISIROT * | isirot, |
const char *const | desc, | ||
int | isinumber | ||
) |
See also ks_pg_isirot() and ks_scan_isirotate().
[out] | isirot | Pointer to the KS_ISIROT object to be set up |
[in] | desc | A description (text string) of the KS_ISIROT object |
[in] | isinumber | A free ISI interrupt number in range [4,7] |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_read | ( | KS_READ * | read, |
const char *const | desc | ||
) |
This function should be called in cveval()
and defines a data acquisition window of a certain duration with some receiver bandwidth. Before calling this function, the following fields in the KS_READ object must be set:
.rbw
: The desired receiver bandwidth / FOV in [kHz] (max: 250).duration
: The duration in [us]ks_eval_read() will validate the desired rBW and round it to the nearest valid value. Also the duration will be rounded up to fit a whole number of samples in the acquisition window.
To use an acquisition window with a gradient, see KS_READTRAP and ks_eval_readtrap()
If ks_eval_read() returns FAILURE, one must also make sure cveval()
returns FAILURE, otherwise an error message created in ks_eval_read() will not be seen in the UI.
[in,out] | read | Pointer to the KS_READ object to be set up |
[in] | desc | A description (text string) of the KS_READ object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_trap_constrained | ( | KS_TRAP * | trap, |
const char *const | desc, | ||
float | ampmax, | ||
float | slewrate, | ||
int | minduration | ||
) |
Before calling this function, the following field in the KS_TRAP object must be set:
.area
: Desired gradient area in units of [(G/cm) * us]ks_eval_trap_constrained() will make a trapezoid pulse with the desired area, constrained by the specified maximum gradient amplitude, slewrate, and minimum plateau time (args 3-5).
If ks_eval_trap_constrained() returns FAILURE, one must also make sure cveval()
returns FAILURE, otherwise an error message created in ks_eval_trap_constrained() will not be seen in the UI.
There are three wrapper functions to this function (ks_eval_trap(), ks_eval_trap1(), ks_eval_trap2()) that have reduced number of input arguments, and calls ks_eval_trap_constrained() with different preset gradient constraints. ks_eval_trap() makes fewest assumptions, making it the most general choice.
[in,out] | trap | Pointer to the KS_TRAP object to be set up |
[in] | desc | A description (text string) of the KS_TRAP object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | ampmax | The maximum allowed gradient amplitude ([G/cm]) |
[in] | slewrate | The maximum allowed slewrate ([(G/cm) / us]). Value of 0.01 corresponds to 100 mT/m/s |
[in] | minduration | Optional minimum duration ([us]). A zero value is used to disregard this constraint |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_trap | ( | KS_TRAP * | trap, |
const char *const | desc | ||
) |
Before calling this function, the following field in the KS_TRAP object must be set:
.area
: Desired gradient area in units of [(G/cm) * us]This is a wrapper function to ks_eval_trap_constrained() with gradient constraints set to allow this KS_TRAP to be simultaneously played on XGRAD, YGRAD, ZGRAD for any slice angulation.
[in,out] | trap | Pointer to the KS_TRAP object to be set up |
[in] | desc | A description (text string) of the KS_TRAP object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_trap2 | ( | KS_TRAP * | trap, |
const char *const | desc | ||
) |
Before calling this function, the following field in the KS_TRAP object must be set:
.area
: Desired gradient area in units of [(G/cm) * us]This is a wrapper function to ks_eval_trap_constrained() with gradient constraints set to allow this KS_TRAP to be simultaneously played on up to two (2) logical gradients for any slice angulation.
[in,out] | trap | Pointer to the KS_TRAP object to be set up |
[in] | desc | A description (text string) of the KS_TRAP object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_trap1 | ( | KS_TRAP * | trap, |
const char *const | desc | ||
) |
Before calling this function, the following field in the KS_TRAP object must be set:
.area
: Desired gradient area in units of [(G/cm) * us]This is a wrapper function to ks_eval_trap_constrained() with gradient constraints set to allow this KS_TRAP to only be played out on one (1) logical gradient at a time. No gradient may be active on another board while this trapezoid is played out.
[in,out] | trap | Pointer to the KS_TRAP object to be set up |
[in] | desc | A description (text string) of the KS_TRAP object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_trap_rotation_invariant_75_max_slewrate | ( | KS_TRAP * | trap, |
const char *const | desc | ||
) |
Before calling this function, the following field in the KS_TRAP object must be set:
.area
: Desired gradient area in units of [(G/cm) * us]This is a wrapper function to ks_eval_trap_constrained() with the gradient amplitude limited to 1/sqrt(3) of the weakest amplifier (rotation invariant even if played on all boards simultanously). The slewrate is limited to 1/sqrt(3) of the weakest amplifier or 75 T/m/s to avoid unessesary PNS. This trapezoid setup is a good choice for not so timing sensitive situations (spoiler, SPGR phasers, ...)
[in,out] | trap | Pointer to the KS_TRAP object to be set up |
[in] | desc | A description (text string) of the KS_TRAP object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_trap_constrained_time_maxarea | ( | KS_TRAP * | trap, |
const char *const | desc, | ||
float | ampmax, | ||
float | slewrate, | ||
float | maxarea, | ||
int | derate_slewrate | ||
) |
STATUS ks_eval_set_asym_padding | ( | struct _readtrap_s * | readtrap, |
float | wanted_paddingarea_pre, | ||
float | wanted_paddingarea_post | ||
) |
STATUS ks_eval_trap1p | ( | KS_TRAP * | trap, |
const char *const | desc | ||
) |
Before calling this function, the following field in the KS_TRAP object must be set:
.area
: Desired gradient area in units of [(G/cm) * us]This is a wrapper function to ks_eval_trap_constrained() with physical gradient constraints set to allow this KS_TRAP to only be played out on one (1) logical gradient at a time. No gradient may be active on another board while this trapezoid is played out.
[in,out] | trap | Pointer to the KS_TRAP object to be set up |
[in] | desc | A description (text string) of the KS_TRAP object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_ramp | ( | KS_WAVE * | ramp, |
float | slew, | ||
float | end_amp, | ||
int | dwell | ||
) |
STATUS ks_calc_unconstrained_transition | ( | float * | G, |
float * | t, | ||
int * | num_points, | ||
float | req_area, | ||
float | end_amp, | ||
float | slew, | ||
float | ampmax, | ||
unsigned int | min_plateau | ||
) |
STATUS ks_calc_exact_transition | ( | float * | G, |
float * | t, | ||
int * | num_points, | ||
float | req_area, | ||
float | end_amp, | ||
float | min_duration, | ||
float | slew, | ||
float | ampmax, | ||
unsigned int | min_plateau | ||
) |
STATUS ks_calc_minslew_transition | ( | float * | G, |
float * | t, | ||
int * | num_points, | ||
float | req_area, | ||
float | end_amp, | ||
float | min_duration, | ||
float | slew, | ||
float | ampmax, | ||
unsigned int | min_plateau | ||
) |
STATUS ks_calc_maxarea_transition | ( | float * | G, |
float * | t, | ||
int * | num_points, | ||
float | req_area, | ||
float | end_amp, | ||
float | max_duration, | ||
float | slew, | ||
float | ampmax, | ||
unsigned int | min_plateau | ||
) |
STATUS ks_eval_crusher | ( | KS_WAVE * | crusher, |
const float | end_amp, | ||
const ks_crusher_constraints | crusher_constraints | ||
) |
[out] | crusher | Pointer to the KS_WAVE object to be set up |
[in] | end_amp | ADDTEXTHERE |
[in] | crusher_constraints | ADDTEXTHERE |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_readtrap_constrained | ( | KS_READTRAP * | readtrap, |
const char *const | desc, | ||
float | ampmax, | ||
float | slewrate | ||
) |
Before calling this function, the following fields in the KS_READTRAP object must be set:
.fov
: Desired image Field-of-View (FOV) in [mm] along the sequence board one intends to place the KS_READTRAP on (typically XGRAD).res
: Number of pixels within the FOV.acq.rbw
: Receiver bandwidth (rBW) in [kHz/FOV]. Maximum is 250.rampsampling
: If non-zero, data acquisition will be performed on the ramps of the trapezoid as well. This reduces the readout time, especially for high rBWs..acqdelay
: Needs to be set only if .rampsampling = 1
. The .acqdelay
(in [us]) will dictate the time from the start of the ramp-up until data acquisition will begin.nover
: Number of 'overscans'. If 0, a full echo will be generated (filling k-space). If > 0, fractional echo (i.e. shorter TE) will be set up with .nover
number of extra sample points beyond .res/2
. The total number of samples will be .res/2 + .nover
. Values of .nover
between 1 and about 16 should be avoided since half Fourier reconstruction methods will likely have difficulties.If the KS_READTRAP object is initialized with KS_INIT_READTRAP, the fields .nover
, .rampsampling
and .acqdelay
will all be zero (steps 4-6 can be skipped)
Based on the information in the KS_READTRAP object, ks_eval_readtrap_constrained() will set up its .grad
trapezoid (KS_TRAP) and its acquisition window .acq
(KS_READ), constrained by the specified maximum gradient amplitude, slewrate, and minimum plateau time (args 3-5).
If .rampsampling = 1
, ks_eval_readtrap_constrained() will also copy the shape of .grad
to .omega
(also a KS_TRAP). This is needed for FOV-offsets in the readout direction when data acquisition is done on both the ramps and on the plateau, and ks_pg_readtrap() and ks_scan_offsetfov() will handle the .omega
KS_TRAP so that the intended FOV shift in [mm] will be performed.
ks_eval_readtrap_constrained() will also fill in the convenience fields .area2center
and .time2center
properly. .area2center
is useful to use as .area
for a read dephaser, and .time2center
makes sequence timing calculations easier. Both fields take partial/full Fourier (.nover
) into account.
If ks_eval_readtrap_constrained() returns FAILURE, one must also make sure cveval()
returns FAILURE, otherwise an error message created in ks_eval_readtrap_constrained() will not be seen in the UI.
There are three wrapper functions to this function (ks_eval_readtrap(), ks_eval_readtrap1(), ks_eval_readtrap2()) that have reduced number of input arguments, and calls ks_eval_readtrap_constrained() with different preset gradient constraints. ks_eval_readtrap() makes fewest assumptions, making it the most general choice.
[in,out] | readtrap | Pointer to the KS_READTRAP object to be set up |
[in] | desc | A description (text string) of the KS_READTRAP object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | ampmax | The maximum allowed gradient amplitude ([G/cm]) |
[in] | slewrate | The maximum allowed slewrate ([(G/cm) / us]). Value of 0.01 corresponds to 100 mT/m/s |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_readtrap | ( | KS_READTRAP * | readtrap, |
const char *const | desc | ||
) |
This is a wrapper function to ks_eval_readtrap_constrained() with gradient constraints set to allow this KS_READTRAP to simultaneously be played on XGRAD, YGRAD, ZGRAD for any slice angulation. This is the generic and safest configuration, but for readouts with small FOV and high rBW, the gradient limits may be reached, especially for double oblique slices. See ks_eval_readtrap_constrained() for details on fields that need to be set before calling this function.
[in,out] | readtrap | Pointer to the KS_READTRAP object to be set up |
[in] | desc | A description (text string) of the KS_READTRAP object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_readtrap2 | ( | KS_READTRAP * | readtrap, |
const char *const | desc | ||
) |
This is a wrapper function to ks_eval_readtrap_constrained() with gradient constraints set to allow this KS_TRAP to simultaneously be played on up to two (2) logical gradients for any slice angulation. For double oblique slice angulations, this function will allow for smaller FOVs and higher rBWs than ks_eval_readtrap().
See ks_eval_readtrap_constrained() for details on fields that need to be set before calling this function.
[in,out] | readtrap | Pointer to the KS_READTRAP object to be set up |
[in] | desc | A description (text string) of the KS_READTRAP object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_readtrap1 | ( | KS_READTRAP * | readtrap, |
const char *const | desc | ||
) |
This is a wrapper function to ks_eval_readtrap_constrained() with gradient constraints set to allow this KS_TRAP to only be played out on one (1) logical gradient at a time. No gradient may be active on another board while this trapezoid is played out. For double oblique slice angulations, this function will allow for smaller FOVs and higher rBWs than ks_eval_readtrap() and ks_eval_readtrap2(). See ks_eval_readtrap_constrained() for details on fields that need to be set before calling this function.
[in,out] | readtrap | Pointer to the KS_READTRAP object to be set up |
[in] | desc | A description (text string) of the KS_READTRAP object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_readtrap_constrained_sample_duration | ( | struct _readtrap_s * | readtrap, |
const char *const | desc, | ||
const float | ampmax, | ||
const float | slewrate, | ||
const int | t_A, | ||
const int | sample_duration, | ||
const float | area_post, | ||
const float | area_total | ||
) |
STATUS ks_eval_readwave_constrained | ( | KS_READWAVE * | readwave, |
KS_WAVE * | acq_waves, | ||
const int | numstates, | ||
int | flag_symmetric_padding, | ||
ks_crusher_constraints | pre_crusher_constraints, | ||
ks_crusher_constraints | post_crusher_constraints | ||
) |
The following members of the readwave object are treated as inputs to this function: fov - Desired image Field-of-View (FOV) in [mm] along the sequence board one intends to place the KS_READWAVE on (typically XGRAD) res - Number of pixels within the FOV nover - Number of 'overscans'. If 0, a full echo will be generated (filling k-space). If > 0, fractional echo (i.e. shorter TE) will be set up with .nover
number of extra sample points beyond .res/2
.
[in,out] | readwave | - Pointer to KS_READWAVE |
[in] | acq_waves | - an array of KS_WAVE objects describing the gradient amplitude while the ADC is on. |
[in] | numstates | - number of KS_WAVES in acq_waves |
[in] | flag_symmetric_padding | - match pre and post areas and duration |
[in] | pre_crusher_constraints | - how to optimise the pre crusher waveform shape (fastest, exact area, maximum area) |
[in] | post_crusher_constraints | - how to optimise the post crusher waveform shape (fastest, exact area, maximum area) |
STATUS | SUCCESS or FAILURE |
void ks_eval_readwave_negatestate | ( | KS_READWAVE * | readwave, |
int | state | ||
) |
[in,out] | readwave | A pointer to KS_READWAVE you would like to negate |
[in] | state | The wavestate to modify |
STATUS ks_eval_readwave_multistated | ( | KS_READWAVE * | readwave, |
KS_WAVE * | acq_waves, | ||
const int | num_waves, | ||
float | pre_crusher_area, | ||
float | post_crusher_area, | ||
int | flag_symmetric_padding, | ||
ks_enum_crusher_strategy | pre_strategy, | ||
ks_enum_crusher_strategy | post_strategy | ||
) |
Converts the crusher statergies into constraints
[out] | readwave | - Pointer to an initialised KS_READWAVE object. |
[in] | acq_waves | - Pointer to a KS_WAVE that defines the read gradient shape during the ADC sampling. |
[in] | num_waves | - Number of waves |
[in] | pre_crusher_area | - desired area before the readout starts |
[in] | post_crusher_area | - desired area after the readout is complete |
[in] | flag_symmetric_padding | - match pre and post areas |
[in] | pre_strategy | - how to optimise the pre crusher waveform shape (fastest, exact area, maximum area) |
[in] | post_strategy | - how to optimise the post crusher waveform shape (fastest, exact area, maximum area) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_readwave | ( | KS_READWAVE * | readwave, |
KS_WAVE * | acq_wave, | ||
float | pre_crusher_area, | ||
float | post_crusher_area, | ||
int | flag_symmetric_padding, | ||
ks_enum_crusher_strategy | pre_strategy, | ||
ks_enum_crusher_strategy | post_strategy | ||
) |
Sets up a KS_READWAVE with one state and converts the crusher statergies into constraints
[out] | readwave | - Pointer to an initialised KS_READWAVE object. |
[in] | acq_wave | - Pointer to a KS_WAVE that defines the read gradient shape during the ADC sampling. |
[in] | pre_crusher_area | - desired area before the readout starts |
[in] | post_crusher_area | - desired area after the readout is complete |
[in] | flag_symmetric_padding | - match pre and post areas |
[in] | pre_strategy | - how to optimise the pre crusher waveform shape (fastest, exact area, maximum area) |
[in] | post_strategy | - how to optimise the post crusher waveform shape (fastest, exact area, maximum area) |
STATUS | SUCCESS or FAILURE |
int ks_eval_kynover_fromnex | ( | int | yres, |
float | partial_ky, | ||
int | minkynover | ||
) |
void ks_eval_phaseviewtable | ( | KS_PHASER * | phaser | ) |
This function sets the following fields in a KS_PHASER object
.numlinestoacq
: Number of phase encoding lines to acquire.linetoacq[]
: Array, where the first .numlinestoacq
elements denotes which lines to acquire with indices corresponding to a fully sampled k-space. The top-most line has index 0 and the bottom-most line has index (.res
-1).These two fields are set based on .res
, .nover
, .nacslines
, and .R
in the KS_PHASER object. If .nover
< 0, partial Fourier will be set up, but with flipped k-space coverage
[in,out] | phaser | Pointer to the KS_PHASER object to be set up |
STATUS ks_eval_phaser_adjustres | ( | KS_PHASER * | phaser, |
const char *const | desc | ||
) |
Phase resolution must be divisible by .R
and be even, and there are additional requirements for partial ky Fourier scans. Moreover, for parallel imaging using ASSET, only the acquired lines are stored in the data (compressed BAM), resulting in an R times lower value for rhnframes.
Here are the rules:
[in,out] | phaser | Pointer to KS_PHASER |
[in] | desc | A description (text string) of the KS_PHASER object, only used for error msg |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_phaser_setaccel | ( | KS_PHASER * | phaser, |
int | min_acslines, | ||
float | R | ||
) |
[ks_eval_phaser_setaccel description]
[in,out] | phaser | Pointer to KS_PHASER |
[in] | min_acslines | Minimum # of ACS lines |
[in] | R | (floating point) acceleration (taken e.g. from the UI opaccel_ph_stride ) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_phaser_constrained | ( | KS_PHASER * | phaser, |
const char *const | desc, | ||
float | ampmax, | ||
float | slewrate, | ||
int | minplateautime | ||
) |
Before calling this function, the following fields in KS_PHASER must be set up:
.fov
: The desired image Field-of-View (FOV) in [mm] along the sequence board one intends to place the KS_PHASER on (typically YGRAD, for 3D also ZGRAD).res
: The number of pixels within the FOV.nover
: Number of 'overscans'. If 0, a full-Fourier k-space will be set up. If > 0, partial Fourier will be set up (shorter scan time) where .nover
number of extra k-space lines beyond .res/2
. If < 0, partial Fourier will be set up, but with flipped k-space coverage. The total number of samples will be .res/2 + abs(.nover)
. Absolute values of .nover
between 1 and about 16 should be avoided since half Fourier reconstruction methods will likely have difficulties.R
: The parallel imaging acceleration factor.nacslines
: If .R > 1
, the value of .nacslines
is the number of calibration lines around k-space center for parallel imaging calibration.areaoffset
: It is possible to embed a static gradient area in the phase encoding functionality of KS_PHASER. This is useful for 3D imaging, where the area needed for the rephaser for the slice select gradient can be put into .areaoffset
. This makes the KS_PHASER to act as both slice rephaser and slice phase encoding gradient, which can shorten TEIf the KS_PHASER object is initialized with KS_INIT_PHASER, .nover
, .nacslines
and .areaoffset
will be zero, and .R
will be 1 (steps 3-6 can be skipped)
Based on the information in the KS_PHASER object, ks_eval_phaser_constrained() will set up the .grad
trapezoid (KS_TRAP). By internally calling ks_eval_phaseviewtable(), .numlinestoacq
, and the array .linetoacq[]
are also set up. The field .numlinestoacq
is an integer corresponding to the actual number of lines to acquire, and also the number of elements to read in .linetoacq[]
, containing the complete list of phase encoding lines to acquire (honoring partial Fourier, parallel imaging acceleration and ACS lines)
If ks_eval_phaser_constrained() returns FAILURE, one must also make sure cveval()
returns FAILURE, otherwise an error message created in ks_eval_phaser_constrained() will not be seen in the UI
There are three wrapper functions to this function (ks_eval_phaser(), ks_eval_phaser1(), ks_eval_phaser2()) that have reduced number of input arguments, and calls ks_eval_phaser_constrained() with different preset gradient constraints. ks_eval_phaser() makes fewest assumptions, making it the most general choice
[in,out] | phaser | Pointer to the KS_PHASER object to be set up |
[in] | desc | A description (text string) of the KS_PHASER object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | ampmax | The maximum allowed gradient amplitude ([G/cm]) |
[in] | slewrate | The maximum allowed slewrate ([(G/cm) / us]). Value of 0.01 corresponds to 100 mT/m/s |
[in] | minplateautime | The minimum plateau time of the trapezoid ([us]) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_phaser | ( | KS_PHASER * | phaser, |
const char *const | desc | ||
) |
This is a wrapper function to ks_eval_phaser_constrained() with gradient constraints set to allow this KS_PHASER to simultaneously be played on XGRAD, YGRAD, ZGRAD for any slice angulation. This is the generic and safest configuration, but the duration of the KS_PHASER object may increase for double oblique slices
See ks_eval_phaser_constrained() for details on fields that need to be set before calling this function
[in,out] | phaser | Pointer to the KS_PHASER object to be set up |
[in] | desc | A description (text string) of the KS_PHASER object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_phaser2 | ( | KS_PHASER * | phaser, |
const char *const | desc | ||
) |
This is a wrapper function to ks_eval_phaser_constrained() with gradient constraints set to allow this KS_PHASER to simultaneously be played on up to two (2) logical gradients for any slice angulation. For double oblique slice angulations, this function may allow for shorter duration than ks_eval_phaser()
See ks_eval_phaser_constrained() for details on fields that need to be set before calling this function
[in,out] | phaser | Pointer to the KS_PHASER object to be set up |
[in] | desc | A description (text string) of the KS_PHASER object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_phaser1 | ( | KS_PHASER * | phaser, |
const char *const | desc | ||
) |
This is a wrapper function to ks_eval_phaser_constrained() with gradient constraints set to allow this KS_PHASER to only be played out on one (1) logical gradient at a time. No gradient may be active on another board while this trapezoid is played out. For double oblique slice angulations, this function may allow for shorter duration than ks_eval_phaser() and ks_eval_phaser2()
See ks_eval_phaser_constrained() for details on fields that need to be set before calling this function
[in,out] | phaser | Pointer to the KS_PHASER object to be set up |
[in] | desc | A description (text string) of the KS_PHASER object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_phaser1p | ( | KS_PHASER * | phaser, |
const char *const | desc | ||
) |
This is a wrapper function to ks_eval_phaser_constrained() with physical gradient constraints
[in,out] | phaser | Pointer to the KS_PHASER object to be set up |
[in] | desc | A description (text string) of the KS_PHASER object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_wave | ( | KS_WAVE * | wave, |
const char *const | desc, | ||
const int | res, | ||
const int | duration, | ||
const KS_WAVEFORM | waveform | ||
) |
ks_eval_wave() copies the content of a KS_WAVEFORM into a KS_WAVE sequence object. KS_WAVEFORM (5th arg) is a typedef
for a float array with a fixed length of KS_MAXWAVELEN elements. Hence, a KS_WAVEFORM, or float array, must first be created and filled with some wave contents before calling this function. res elements are copied from the input KS_WAVEFORM to the field .waveform
in the KS_WAVE object (1st arg). duration (4th arg) must be divisible by res (3rd arg) and at least 2x res.
When using (i.e. calling ks_pg_wave()) the waveform for:
[out] | wave | KS_WAVE object to be created |
[in] | desc | A description (text string) of the KS_WAVE object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | res | Resolution of the waveform, i.e. number of elements from KS_WAVEFORM (5th arg) to read |
[in] | duration | Desired duration in [us] of the waveform (must be divisible with res) |
[in] | waveform | KS_WAVEFORM (float array of max length KS_MAXWAVELEN) with existing waveform content |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_wave_file | ( | KS_WAVE * | wave, |
const char *const | desc, | ||
int | res, | ||
int | duration, | ||
const char *const | filename, | ||
const char *const | format | ||
) |
ks_eval_wave_file() reads waveforms on disk into a KS_WAVE. The data format (arg 6) may currently be one of:
When the first two formats are used the field .waveform
in KS_WAVE will contain data in the range [-1.0,1.0]. res elements are read from disk in the specified format into the field .waveform
in the KS_WAVE object (1st arg). duration (4th arg) must be divisible by res (3rd arg) and at least 2x res.
When using (i.e. calling ks_pg_wave()) the waveform for:
[out] | wave | KS_WAVE object to be created |
[in] | desc | A description (text string) of the KS_WAVE object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | res | KS_WAVE object to be created |
[in] | duration | KS_WAVE object to be created |
[in] | filename | Filename on disk |
[in] | format | String denoting the data format on disk. Valid values are: "ge" (reads GE's *.rho files with 32byte header), "short", and "float", the latter two being header-less |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_mirrorwave | ( | KS_WAVE * | wave | ) |
ks_eval_mirrorwave() replaces the KS_WAVEFORM with its (temporally) mirrored version. This can be used to e.g. mirror a minimum phase excitation pulse for fast recovery and T1-optimization in FSE sequences (ksfse.e) See also ks_eval_stretch_rf().
[in,out] | wave | KS_WAVE object, whose KS_WAVEFORM to be mirrored |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_mirrorwaveform | ( | KS_WAVEFORM | waveform, |
int | res | ||
) |
[in] | waveform | pointer to an array of floats |
[in] | res | the number of points in the wave shape you want to mirrow |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_rf_sinc | ( | KS_RF * | rf, |
const char *const | desc, | ||
double | bw, | ||
double | tbw, | ||
float | flip, | ||
int | wintype | ||
) |
For small flip angles, the Fourier transform of the RF envelope is a good approximation of the final slice profile and SLR designed pulses may not be necessary. For these cases, this function can be used to create a Sinc RF pulse (as a KS_RF object) with a desired bandwidth (BW), time-bandwidth-product (TBW) and window function (e.g. KS_RF_SINCWIN_HAMMING, see ks_enum_sincwin). An increased TBW results in more Sinc lobes and sharper slice profiles, and the minimum value is 2. The duration of the RF pulse (.rfwave.duration
) increases when BW decreases or TBW increases
[out] | rf | KS_RF object to be created |
[in] | desc | A description (text string) of the KS_RF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | bw | Bandwidth of the RF pulse [Hz] |
[in] | tbw | Time-bandwidth-product of the RF pulse. Higher value gives sharper slice profiles but increases the duration |
[in] | flip | Nominal flip angle of the RF pulse |
[in] | wintype | Window function over the Sinc. See ks_enum_sincwin for enums names that steer the window choice |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_rf_secant | ( | KS_RF * | rf, |
const char *const | desc, | ||
float | A0, | ||
float | tbw, | ||
float | bw | ||
) |
STATUS ks_eval_rf_hard | ( | KS_RF * | rf, |
const char *const | desc, | ||
int | duration, | ||
float | flip | ||
) |
This function creates a hard RF pulse of the desired duration. Hard pulses are typically used as non-slice selective RF pulses, as their slice profile would be very poor (Sinc-like). The resolution of the RF pulse created is equal to the duration/2
[out] | rf | KS_RF object to be created |
[in] | desc | A description (text string) of the KS_RF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | duration | Desired duration in [us] of the waveform (must be even) |
[in] | flip | Nominal flip angle of the RF pulse |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_rf_hard_optimal_duration | ( | KS_RF * | rf, |
const char *const | desc, | ||
int | order, | ||
float | flip, | ||
float | offsetFreq | ||
) |
This function creates a hard RF pulse with optimal duration for fat selection/saturation. Hard pulses are typically used as non-slice selective RF pulses. Their slice profile is sinc-like and with this function you can create a hard pulse with a sinc-minima at the center of the spectral fat-peak. You can select wich minima using the input 'order'. A higher order generates a longer pulse duration with a more narrow frequency response. If the pulse is tuned to the fat peak, using input 'offsetFreq', the minimia will instead end up at the water-peak. The resolution of the RF pulse created is equal to the duration/2
[out] | rf | KS_RF object to be created |
[in] | desc | A description (text string) of the KS_RF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | order | Select wich minima to use |
[in] | flip | Nominal flip angle of the RF pulse |
[in] | offsetFreq | choose center frequency offset |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_rf_binomial | ( | KS_RF * | rf, |
const char *const | desc, | ||
int | offResExc, | ||
int | nPulses, | ||
float | flip, | ||
float | offsetFreq, | ||
int | MTreduction | ||
) |
This function creates a binomial RF pulse, which consists of a series of hard pulses. Binomial pulses are used for spectral selection. They utilize the difference in resonance frequency of different tissue types, such as water and fat. Increasing the number of sub-pulses will improve the spectral selectivity but also increse the pulse duration.
[out] | rf | KS_RF object to be created |
[in] | desc | A description (text string) of the KS_RF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | offResExc | If 0 the pulse will excite the spinns at the center frequency, If 1 the pulse will excite the spinns at the offset frequency (given by input: offsetFreq) |
[in] | nPulses | Number of sub-pulses |
[in] | flip | Nominal flip angle of the RF pulse |
[in] | offsetFreq | choose center frequency offset in Hz |
[in] | MTreduction | [0=OFF,1=ON] reduces offresonace excitation and therefore MT effects |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_mt_rf_binomial | ( | KS_RF * | rf, |
const char *const | desc, | ||
int | sub_pulse_dur, | ||
int | nPulses, | ||
int | prp | ||
) |
The major features of binomial-pulse-train frequency spectra are as follows: a series of sinc functions at frequency intervals of 1/PRP, whose width is inversely related to the overall pulse train duration (nPulses-1)*PRP, modulated by the single-binomial-pulse spectrum. Hence, the width of the sinc functions, or “spikes” in the frequency spectrum becomes narrower as the number of pulses is increased, and they become closer together as the pulse repetition period is increased.
[out] | rf | KS_RF object to be created |
[in] | desc | A description (text string) of the KS_RF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | sub_pulse_dur | |
[in] | nPulses | |
[in] | prp |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_rfstat | ( | KS_RF * | rf | ) |
For RF scaling, SAR calculation, and RF heating calculations, GE uses a global array of RF_PULSE structs, where each RF pulse is associated with one RF_PULSE struct each. This struct array contains RF pulses from Prescan as well as the pulse sequence itself, and is normally declared in a grad_rf_<psd>.h file.
Here, each KS_RF object has its own RF_PULSE struct (the field .rfpulse
), which this function sets up. The following fields in the KS_RF object must be set before calling this ks_eval_rfstat()
.rfwave
: Must contain the RF pulse waveform. An error is return if either .thetawave
or .omegawave
are non-empty (complex RF pulses not allowed).bw
: The bandwidth of the RF pulse [Hz].iso2end
: Time from the magnetic center of the RF pulse to the end, in [us].flip
: The flip angle of the RF pulse [degrees]. In this function, .flip
will set .rfpulse.nom_fa
and make sure .rfpulse.act_fa
points to .flip
The RF waveform will be amplitude scaled so that its maximum absolute amplitude is 1.0 before making the calculations. Also the proper links between fields int the .rfpulse
(RF_PULSE) struct and the parent fields in KS_RF are set up by calling ks_eval_rf_relink()
Credits: This function has been made largely after the code by Atsushi Takahashi, GE Healthcare.
[in,out] | rf | KS_RF object to calculate the RF_PULSE parameters for (in field .rfpulse ) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_rf | ( | KS_RF * | rf, |
const char *const | desc | ||
) |
See documentation for the KS_RF object for details on how to prepare the KS_RF object before calling ks_eval_rf()
This function does not set up a KS_RF object by itself, merely it peforms final validation, naming, makes sure fields and links in KS_RF are properly set up. ks_eval_rf() should be called for non-slice selective RF pulses. For slice-selective RF pulses, use KS_SELRF and call ks_eval_selrf() instead
[in,out] | rf | Pointer to the KS_RF object to be set up |
[in] | desc | A description (text string) of the KS_RF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
void ks_eval_rf_relink | ( | KS_RF * | rf | ) |
This function is used by other RF functions to make sure that the links from pointers in .rfpulse
are relinked to other fields inside the KS_RF object. This function does not need to be called manually as long as either ks_eval_rf(), ks_eval_selrf() are called.
If a KS_RF object is copied to another KS_RF object by simple assignment ('=' sign), then these pointers must be updated before the assigned KS_RF object can be used. Best practice is to call ks_eval_rf() or ks_eval_selrf() instead of this function, as more validation is performed and because description of the new KS_RF is also updated
[in,out] | rf | Pointer to the KS_RF object to be set up |
STATUS ks_eval_seltrap | ( | KS_TRAP * | trap, |
const char *const | desc, | ||
float | slewrate, | ||
float | slthick, | ||
float | bw, | ||
int | rfduration | ||
) |
This function is used by ks_eval_selrf_constrained() (and its wrapper functions, e.g. ks_eval_selrf()), and there is no need to use this function directly.
Based on the RF bandwidth and duration, this function will create a trapezoid gradient that with this type of RF pulse creates a slice with the desired thickness, by in turn calling ks_calc_selgradamp().
[out] | trap | Pointer to the KS_TRAP object to be set up |
[in] | desc | A description (text string) of the KS_PHASER object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | slewrate | The maximum allowed slewrate ([(G/cm) / us]). Value of 0.01 corresponds to 100 mT/m/s |
[in] | slthick | The desired slice thickness in [mm]. If = 0, the slice selection gradient will have zero amplitude (hard pulses) |
[in] | bw | The bandwidth of the RF pulse to use with the gradient. If = 0, the slice selection gradient will have zero amplitude (hard pulses) |
[in] | rfduration | The duration of the RF pulse to use with the gradient |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_selwave | ( | KS_WAVE * | gradwave, |
const char *const | desc, | ||
float | slthick, | ||
float | bw, | ||
int | rfduration | ||
) |
STATUS ks_eval_selrf_constrained | ( | KS_SELRF * | selrf, |
const char *const | desc, | ||
float | ampmax, | ||
float | slewrate | ||
) |
This function does not set up the KS_RF field in KS_SELRF itself, see KS_RF and ks_eval_rf() for more details on how to prepare the .rf
field in KS_SELRF before calling ks_eval_selrf_constrained()
The following fields in the KS_SELRF object must be set up before calling this function:
.rf.role
(see below for details).slthick
: Slice thickness in [mm]. Note that the slice thickness often needs to be made larger to compensate from slice narrowing due to multiple RF pulses. GE uses usually gscale_rfX
CVs with values often between 0.8-0.9. Dividing with this number gives a thicker slice in the calculations. NOTE: .slthick = 0
is accepted and results in zero gradient amplitude with minimal 4us ramps and a plateautime = .rf.rfwave.duration (cf. ks_eval_seltrap()->ks_calc_selgradamp())ks_eval_selrf_constrained() checks .rf.role
to decide on how to set up its gradient objects. The following values of .rf.role
are allowed:
KS_RF_ROLE_EXC
, indicating an RF excitation role. ks_eval_selrf_constrained() will in this case:.pregrad
.grad.plateautime
equal to the RF duration (.rf.rfwave.duration
) and the gradient amplitude (.grad.amp
[G/cm]) will be set to the proper value depending on the BW (.rf.bw
) and slice thickness (.slthick
). The field .grad.description
will have a ".trap" suffix added to it.postgrad
to have a gradient area that rephases the slice. This is dependent on the isodelay of the RF pulse (.rf.iso2end
) and the slice select gradient amplitude (.grad.amp
). The field .postgrad.description
will have a ".reph" suffix added to itKS_RF_ROLE_REF
, indicating an RF refocusing role. ks_eval_selrf_constrained() will in this case:.pregrad
to make the left crusher (never bridged with slice selection). The size of the crusher can be controlled by .crusherscale
. The field .pregrad.description
will have a ".LC" suffix added to it.grad
as done for KS_RF_ROLE_EXC
.postgrad
to make the right crusher (never bridged with slice selection). The size of the crusher can be controlled by .crusherscale
. The field .postgrad.description
will have a ".RC" suffix added to itKS_RF_ROLE_INV
, indicating an RF inversion role. ks_eval_selrf_constrained() will in this case:.pregrad
.grad
as done for KS_RF_ROLE_EXC
.postgrad
KS_RF_ROLE_SPSAT
, indicating a spatial RF saturation. ks_eval_selrf_constrained() will in this case:.pregrad
.grad
as done for KS_RF_ROLE_EXC
.postgrad
to make a gradient spoiler (never bridged with slice selection). The size of the spoiler can be controlled by .crusherscale
. The field .postgrad.description
will have a ".spoiler" suffix added to itThe role KS_RF_ROLE_CHEMSAT
, indicates a non-slice selective, chemically selective, RF (usually fat-sat). ks_eval_selrf_constrained() will in this case throw an error since no gradients should be used
There are three wrapper functions to this function (ks_eval_selrf(), ks_eval_selrf1(), ks_eval_selrf2()) that have reduced number of input arguments, and calls ks_eval_selrf_constrained() with different preset gradient constraints. ks_eval_selrf() makes fewest assumptions, making it the most general choice.
.gradwave
)To support e.g. VERSEd RF excitations, a custom gradient wave can be used. If .gradwave.res > 0
, ks_eval_selrf_constrained() will disable .grad
and use .gradwave
instead. When .rf.role = KS_RF_ROLE_EXC
, the rephasing gradient area (in .postgrad
) will be calculated by integrating the gradient waveform from the RF isocenter to the end. .gradwave
must be created before calling ks_eval_selrf_constrained() using either ks_eval_wave() or ks_eval_wave_file(), and the units must be in [G/cm]. To further scale the amplitude of .gradwave
before calling ks_eval_selrf_constrained(), consider e.g. ks_wave_multiplyval(), ks_wave_absmax(), and possibly ks_wave_addval()
[in,out] | selrf | Pointer to the KS_SELRF object to be set up |
[in] | desc | A description (text string) of the KS_SELRF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | ampmax | The maximum allowed gradient amplitude ([G/cm]) |
[in] | slewrate | The maximum allowed slewrate ([(G/cm) / us]). Value of 0.01 corresponds to 100 mT/m/s |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_selrf | ( | KS_SELRF * | selrf, |
const char *const | desc | ||
) |
This is a wrapper function to ks_eval_selrf_constrained() with gradient constraints set to allow this KS_SELRF to be played on any axis while other gradients (set up with the same constraints) can be played out on the other two gradient boards, for any slice angulation. This is the generic and safest configuration, but for thin slices and high RF BWs, the gradient limits may be reached, especially for double oblique slices
See ks_eval_selrf_constrained() for details on fields that need to be set before calling this function
[in,out] | selrf | Pointer to the KS_SELRF object to be set up |
[in] | desc | A description (text string) of the KS_SELRF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_selrf2 | ( | KS_SELRF * | selrf, |
const char *const | desc | ||
) |
This is a wrapper function to ks_eval_selrf_constrained() with gradient constraints set to allow this KS_SELRF to be played on any axis while one more gradient (set up with the same constraints) can be played out on another gradient board, for any slice angulation. For double oblique slice angulations, this function will allow for thinner slices and higher RF BWs than ks_eval_selrf()
See ks_eval_selrf_constrained() for details on fields that need to be set before calling this function
[in,out] | selrf | Pointer to the KS_SELRF object to be set up |
[in] | desc | A description (text string) of the KS_SELRF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_selrf1 | ( | KS_SELRF * | selrf, |
const char *const | desc | ||
) |
This is a wrapper function to ks_eval_selrf_constrained() with gradient constraints set to allow this KS_SELRF to be played on any axis, as long as no other gradients are be played out simultaneously. For double oblique slice angulations, this function will allow for thinner slices and higher RF BWs than ks_eval_selrf() and ks_eval_selrf2()
See ks_eval_selrf_constrained() for details on fields that need to be set before calling this function
[in,out] | selrf | Pointer to the KS_SELRF object to be set up |
[in] | desc | A description (text string) of the KS_SELRF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_selrf1p | ( | KS_SELRF * | selrf, |
const char *const | desc | ||
) |
[in,out] | selrf | Pointer to the KS_SELRF object to be set up |
[in] | desc | A description (text string) of the KS_SELRF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
STATUS | SUCCESS or FAILURE |
float ks_eval_findb1 | ( | KS_SELRF * | selrf, |
float | max_b1, | ||
double | scaleFactor, | ||
int | sms_multiband_factor, | ||
int | sms_phase_modulation_mode, | ||
float | sms_slice_gap | ||
) |
[in] | selrf | rf object KS_SELRF |
[in] | max_b1 | peak B1 |
[in] | scaleFactor | initial stretch factor |
[in] | sms_multiband_factor | SMS factor |
[in] | sms_phase_modulation_mode | SMS phase modulation mode |
[in] | sms_slice_gap | SMS slice gap |
void ks_eval_transient_SPGR_FA_train_recursive | ( | float * | FA_train, |
float * | MZ_train, | ||
int | N, | ||
float | E1, | ||
float | target_MT, | ||
int | n | ||
) |
ADDDESCHERE
FA_train | ADDTEXTHERE | |
MZ_train | ADDTEXTHERE | |
[in] | N | ADDTEXTHERE |
[in] | E1 | ADDTEXTHERE |
[in] | target_MT | ADDTEXTHERE |
[in] | n | ADDTEXTHERE |
void ks_eval_transient_SPGR_FA_train_binary_search | ( | float * | FA_train, |
float * | MZ_train, | ||
int | N, | ||
float | E1, | ||
float | MTlo, | ||
float | MThi, | ||
float | total_FA | ||
) |
ADDDESCHERE
FA_train | ADDTEXTHERE | |
MZ_train | ADDTEXTHERE | |
[in] | N | ADDTEXTHERE |
[in] | E1 | ADDTEXTHERE |
[in] | MTlo | ADDTEXTHERE |
[in] | MThi | ADDTEXTHERE |
[in] | total_FA | ADDTEXTHERE |
STATUS ks_eval_check_FA_train | ( | int | N, |
float * | FA_train, | ||
float * | MZ_train, | ||
float | total_FA | ||
) |
ADDDESCHERE
[in] | N | ADDTEXTHERE |
FA_train | ADDTEXTHERE | |
MZ_train | ADDTEXTHERE | |
[in] | total_FA | ADDTEXTHERE |
STATUS | ADDTEXTHERE |
STATUS ks_eval_transient_SPGR_FA_train | ( | float * | FA_train, |
int | N, | ||
float | TR, | ||
float | T1, | ||
float | total_FA | ||
) |
ADDDESCHERE
FA_train | ADDTEXTHERE | |
[in] | N | ADDTEXTHERE |
[in] | TR | ADDTEXTHERE |
[in] | T1 | ADDTEXTHERE |
[in] | total_FA | ADDTEXTHERE |
STATUS | ADDTEXTHERE |
STATUS ks_eval_sms_make_multiband | ( | KS_SELRF * | selrfMB, |
const KS_SELRF * | selrf, | ||
const int | sms_multiband_factor, | ||
const int | sms_phase_modulation_mode, | ||
const float | sms_slice_gap, | ||
int | debug | ||
) |
[out] | selrfMB | Pointer to multiband (SMS) KS_SELRF object |
[in] | selrf | The original (single-band) KS_SELRF object (set up using ks_eval_selrf()) |
[in] | sms_multiband_factor | The multi-band acceleration factor |
[in] | sms_phase_modulation_mode | See ks_enum_smstype for options |
[in] | sms_slice_gap | Slice gap in [mm] for the selrfMB pulse |
[in] | debug | Debug flag for writing out text files (SIM: in current dir HW:/usr/g/mrraw/kstmp) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_sms_get_phase_modulation | ( | float * | sms_phase_modulation, |
const int | sms_multiband_factor, | ||
const int | sms_phase_modulation_mode | ||
) |
[out] | sms_phase_modulation | Array with phase modulation between slices in a MB RF |
[in] | sms_multiband_factor | The multi-band acceleration factor |
[in] | sms_phase_modulation_mode | See ks_enum_smstype for options |
STATUS | SUCCESS or FAILURE |
float ks_eval_sms_calc_slice_gap | ( | int | sms_multiband_factor, |
int | nslices, | ||
float | slthick, | ||
float | slspace | ||
) |
[in] | sms_multiband_factor | The multi-band acceleration factor |
[in] | nslices | Prescribed number of slices |
[in] | slthick | Prescribed slice thickness |
[in] | slspace | Prescribed slice spacing |
slicegap | SMS slice gap in [mm] |
float ks_eval_sms_calc_slice_gap_from_scan_info | ( | int | sms_multiband_factor, |
int | nslices, | ||
const SCAN_INFO * | org_slice_positions | ||
) |
[in] | sms_multiband_factor | The multi-band acceleration factor |
[in] | nslices | Prescribed number of slices |
[in] | org_slice_positions | Prescribed slice positions |
slicegap | SMS slice gap in [mm] |
float ks_eval_sms_calc_caipi_area | ( | int | caipi_fov_shift, |
float | sms_slice_gap | ||
) |
[in] | caipi_fov_shift | The FOV shift in units of faction of FOV (e.g. 2 means shift of FOV/2) |
[in] | sms_slice_gap | Slice gap in [mm] for the selrfMB pulse |
caipi_blip_area | The area of the CAIPIRINHA blip in [(G/cm) * us] |
STATUS ks_eval_caipiblip | ( | KS_TRAP * | caipiblip, |
const int | caipi_factor, | ||
const float | sms_slice_gap, | ||
const KS_DESCRIPTION | seq_desc | ||
) |
int ks_eval_sms_rf_scan_info | ( | SCAN_INFO * | sms_slice_positions, |
const SCAN_INFO * | org_slice_positions, | ||
int | sms_multiband_factor, | ||
int | nslices | ||
) |
The slice positions used for SMS needs to be shifted, since the SMS pulses are created symetrically around the center freq.
Even sms factor case: slice pos: | | | | | | | | sms slices: o o center freq. pos: v
Odd sms factor case: slice pos: | | | | | | | | | sms slices: o o o center freq. pos: v
[in,out] | sms_slice_positions | |
[in] | org_slice_positions | |
[in] | sms_multiband_factor | |
[in] | nslices |
sms_nslices |
STATUS ks_eval_stretch_rf | ( | KS_RF * | rf, |
float | stretch_factor | ||
) |
This function takes a KS_RF object already set up, having some resolution (rfwave.res
), bandwidth (.bw
), duration (rfwave.duration
) and waveform (.rfwave.waveform
) and performs a linear interpolation of the waveform contained in .rfwave.waveform
so its new duration becomes
newDuration = oldDuration * stretch_factor
.rfwave.description
) is updated with a suffix stretched.start2iso
, .iso2end
and .bw
are automatically updated to reflect the new duration[in,out] | rf | Pointer to the KS_RF object to be stretched |
[in] | stretch_factor | Stretch factor (float) that widens/shortens the RF pulse if larger/smaller than 1.0. If negative, the RF waveform will be mirrored (in time) |
STATUS | SUCCESS or FAILURE |
[out] | selrfPINS | PINS RF pulse (KS_SELRF object) |
[in] | selrf | The original (single-band) KS_SELRF object (set up using ks_eval_selrf()) |
[in] | sms_slice_gap | Slice gap in [mm] for the selrfMB pulse |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_sms_make_pins_dante | ( | KS_SELRF * | selrfPINS, |
const KS_SELRF * | selrf, | ||
float | sms_slice_gap | ||
) |
ADDDESCHERE
selrfPINS | ADDTEXTHERE | |
selrf | ADDTEXTHERE | |
[in] | sms_slice_gap | ADDTEXTHERE |
STATUS | ADDTEXTHERE |
int ks_eval_findNearestNeighbourIndex | ( | float | value, |
const float * | x, | ||
int | length | ||
) |
[in] | value | |
[in] | x | Input array |
[in] | length | Length of array |
index | Index into array |
void ks_eval_linear_interp1 | ( | const float * | x, |
int | x_length, | ||
const float * | y, | ||
const float * | xx, | ||
int | xx_length, | ||
float * | yy | ||
) |
[in] | x | Input array of x coordinates for data (y) |
[in] | x_length | Length of array |
[in] | y | Input array of data (same length as x) |
[in] | xx | Array of new sample points of the data in y |
[in] | xx_length | Length of array with new sample points |
[out] | yy | Output array with interpolated data |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_readtrap2readwave | ( | KS_READTRAP * | readtrap, |
KS_READWAVE * | readwave | ||
) |
The input KS_TRAP object will be converted to a KS_WAVE object, which will have its .waveform
(float array) field filled with the shape of the trapezoid with the maintained GRAD_UPDATE_TIME (4 [us]) sample duration. The .waveform
amplitude on the plateau will be .amp
[G/cm].
[out] | wave | Pointer to a KS_WAVE object to be set up with same shape as the trapezoid (KS_TRAP) in arg 2 |
[in] | trap | The trapezoid to convert into a waveform |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_coords2wave | ( | KS_WAVE * | wave, |
float * | t, | ||
float * | G, | ||
int | num_coords, | ||
int | dwell, | ||
const char * | desc | ||
) |
STATUS ks_eval_append_two_waveforms | ( | KS_WAVEFORM | first_waveform, |
KS_WAVEFORM | second_waveform, | ||
int | res1, | ||
int | res2 | ||
) |
STATUS ks_eval_concatenate_waves | ( | int | num_waves, |
KS_WAVE * | target_wave, | ||
KS_WAVE ** | waves_to_append | ||
) |
STATUS ks_eval_epi_constrained | ( | KS_EPI * | epi, |
const char *const | desc, | ||
float | ampmax, | ||
float | slewrate | ||
) |
The KS_EPI composite sequence object controls an entire EPI train (including de/rephasers on freq & phase axes). Four fields in KS_EPI are other sequence objects:
.read
: The EPI readout lobes including data acquisition.readphaser
: The dephaser & rephaser gradients before & after the train of readout lobes, on the same board as .read
.blip
: The blip gradients in the phase encoding direction between the readout lobes.blipphaser
: The dephaser & rephaser gradients on the same board as the .blip
gradients. For multi-shot EPI these gradients will change in scan() when calling ks_scan_epi_shotcontrol()Before calling this function, portions of the .read
field (KS_READTRAP) and .blipphaser
field (KS_PHASER) must be set up. Here follows a list of fields that must be set:
.read.fov
: The Field-of-View (FOV) in the frequency encoding (readout) direction.read.res
: The number of pixels within the FOV along the frequency encoding direction.blipphaser.fov
: The Field-of-View (FOV) in the phase encoding direction.blipphaser.res
: The number of pixels within the FOV along the phase encoding direction.blipphaser.R
: Either the number of EPI shots or the parallel imaging factor.read.rampsampling
: Whether rampsampling should be used (see KS_READTRAP). Value of 1 is recommended for EPI.read.acq.rbw
: The receiver bandwidth in [kHz/FOV]. Maximum: 250 (recommended)If the KS_EPI object is initialized with KS_INIT_EPI on declaration, .read.rampsampling
will already be set to 1 and .read.acq.rbw
will be set to 250.0 (hence steps 6-7 can be skipped).
Single-shot EPI acquisitions are geometrically distorted to some degree depending on chosen .read.res
and .blipphaser.fov
. To reduce the EPI distortions, either multi-shot EPI or parallel imaging acceleration can be used. For both alternatives, every Rth phase ecoding lines are acquired in k-space as the EPI train is played out. R corresponds to the number of shots (opnshots
menu in the UI) or the parallel imaging factor. Therefore, e.g. a 4-shot EPI readout is identical to an R = 4 accelerated EPI readout with the same FOV and resolution, why one same field .R
may be used to control the EPI train setup, be it multi-shot or parallel imaging acceleration (but not both at the same time). What differs between multi-shot and parallel imaging acceleration in the acquisition is only whether the .blipphaser
should change from TR to TR. Hence, to set up a KS_EPI object, use the field .R
for both multi-shot EPI and parallel imaging scenarios.
The remaining fields of interest in the KS_EPI sequence objects are:
.etl
: This is the echo-train-length (ETL) of the EPI readout train, set by ks_eval_epi() based on .blipphaser.res
and .blipphaser.R
.read_spacing
: Additional spacing in [us] between readout lobes. Default value is zero, but can be set > 0 if additional gradients is to be inserted between the readout lobes. One scenario is adding CAIPIRINHA blips on ZGRAD during the time where the EPI readout is played out in the pulse sequence.duration
: Convenience information for timing calculations, set by ks_eval_epi(). This is the total time in [us] for the EPI train, including the de/rephasers on the frequency/phase axes. Note that there are also .duration
fields for each of the four KS_***
sequence objects in KS_EPI, stating the duration of each of these components..time2center
: Convenience information for timing calculations, set by ks_eval_epi(). The time in [us] from the start of the first dephaser until the center of k-space is reached. This deviates from <epi>.duration/2
for partial Fourier EPI trains where .blipphaser.nover > 0
(a.k.a. fractional NEX, but typically shown as MiniumTE in the UI for EPI)If peripheral nerve stimulation would be observed, consider calling ks_eval_epi_constrained() with reduced slewrate. This will however increase the geometric distortions in the images
[in,out] | epi | Pointer to the KS_EPI object to be set up |
[in] | desc | A description (text string) of the KS_SELRF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | ampmax | The maximum allowed gradient amplitude ([G/cm]) |
[in] | slewrate | The maximum allowed slewrate ([(G/cm) / us]). Value of 0.01 corresponds to 100 mT/m/s |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_epi_setinfo | ( | KS_EPI * | epi | ) |
STATUS ks_eval_epi_maxamp_slewrate | ( | float * | ampmax, |
float * | slewrate, | ||
int | xres, | ||
float | quietnessfactor | ||
) |
Get a reasonably optimized max gradient amplitude and slewrate for the EPI train. This function results in similar values as GE's epigradopts(), where gradient system limits and peripheral-nerve-stimulation (PNS) are not to be exceeded. ks_eval_epi_maxamp_slewrate() has no dB/dt model, but is dependent on xres (assuming fixed FOV, rampsampling and maxmimum rBW). This has also been tested for axial and oblique scans on volunteers at Karolinska without PNS experience using FOV = 24 cm on both DV750 and DV750w with rampsampling and rBW = 250. If PNS should still occur, the slewrate value passed to ks_eval_epi_constrained() should be decreased. The units of the slewrate is [(G / cm) / us], i.e. gradient amp in G / cm divided by the ramptime in us. This value times 1e4 gives slewrate in SI units: T / m / s (up to e.g. 200).
[out] | ampmax | The maximum allowed gradient amplitude ([G/cm]) |
[out] | slewrate | The maximum allowed slewrate ([(G/cm) / us]). Value of 0.01 corresponds to 100 mT/m/s |
[in] | xres | The frequency encoding resolution |
[in] | quietnessfactor | Value >= 1 used for optional gradient derating |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_epi | ( | KS_EPI * | epi, |
const char *const | desc, | ||
float | quietnessfactor | ||
) |
This is a wrapper function to ks_eval_epi_constrained() with a reduced set of input arguments using preset gradient constraints. These constraints should allow for EPI readouts for double oblique slice angulations, but the values for ampmax or slewrate may not be optimal. If peripheral nerve stimulation (PNS) would be observed, consider calling ks_eval_epi_constrained() directly with reduced slewrate. This will however increase the geometric distortions in the images
See ks_eval_epi_constrained() for more details on fields in KS_EPI that must be set before calling this function
[in,out] | epi | Pointer to the KS_EPI object to be set up |
[in] | desc | A description (text string) of the KS_SELRF object. This description is used for pulse sequence generation (seen in the file generated by TimeHist in MGD Sim/WTools) |
[in] | quietnessfactor | Value >= 1 used for optional gradient derating |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_echotrain | ( | KS_ECHOTRAIN *const | echotrain | ) |
Ensures the echotrain design is resonable and counts the number of unique KS_READTRAPS and KS_READWAVES used. The array of KS_READCONTROL controls[KS_MAXUNIQUE_READ] and eval'd KS_READWAVES/KS_READTRAPS are the inputs.
[in,out] | echotrain | - A pointer to a KS_ECHOTRAIN structure |
STATUS | SUCCESS or FAILURE |
GRAD_PULSE ks_eval_makegradpulse | ( | KS_TRAP * | trp, |
int | gradchoice | ||
) |
GRAD_PULSE
struct from a KS_TRAP objectTo use GE's minseq()
function that determines gradient heating limits from the gradient usage, a GRAD_PULSE array needs to be generated for each gradient axis. This info is for standard EPIC psds stored on disk in a file grad_rf_<psdname>.h. KSFoundation EPIC psds with one or more sequence modules (KS_SEQ_CONTROL) being part of a KS_SEQ_COLLECTION struct, have all gradient trapezoid (KS_TRAP) information stored in seqcollection->seqctrlptr[i].gradrf.trapptr[]. Hence, from the seqcollection struct it is possible to reach all KS_TRAP for all sequence modules (see ks_eval_hwlimits()), which one by one can be converted to GRAD_PULSE structs using this function.
[in] | trp | Pointer to a KS_TRAP object |
[in] | gradchoice | XGRAD, YGRAD, or ZGRAD, specifying which gradient this is used on |
GRAD_PULSE | A gradient pulse structure in GE's standard form |
STATUS ks_eval_seqctrl_setminduration | ( | KS_SEQ_CONTROL * | seqctrl, |
int | mindur | ||
) |
It is recommended that this function is put at the end of the sequence generating function for the current sequence module (c.f. KS_SEQ_CONTROL), e.g. mypsd_pg(), which is a point where one knows how long the pulse sequence is, as the last gradient or RF waveform has been placed out. After passing the known minimum allowed sequence module duration as arg2 to ks_eval_seqctrl_setminduration(), both seqctrl.duration
and `seqctrl.min_duration are set to this minimum value + the SSI time for the sequence module (which must be > 0 before calling this function).
This function is only available on HOST for the reason that the .duration
field should not be reset to the minimum duration on TGT. The recommended order of events is the following:
cveval()
on HOST: Call mypsd_pg(). Having the ks_eval_seqctrl_setminduration() call at the end of mypsd_pg(), with the second argument (minimum duration) set to the absolute time corresponding to the last waveform, it is assured that both seqctrl.duration
(which can grow bigger later) and seqctrl.min_duration
(which should not be modified later) is equal to the same minimum possible value at this point. cveval()
on HOST, after the mypsd_pg() call: Do some TR timing calculations and increase the seqctrl.duration
field(s) for one or more sequence modules to fill up to the intended TR. The reasons for why seqctrl.duration
needs to be larger than seqctrl.min_duration
could be either that the TR is larger than the minimum possible by the waveforms, and/or that SAR or hardware constraints (reported back by ks_eval_mintr()) mandates that additional time must be added to the sequence to honor these limits.pulsegen()
on TGT (IPG): The mypsd_pg() function is called to place out the actual hardware waveforms, followed by the "sequence ending here"-call to KS_SEQLENGTH(), which is using seqctrl.duration
to determine the length of the sequence module. As efforts have been made on HOST to set seqctrl.duration
, we cannot have ks_eval_seqctrl_setminduration() to reset it again on TGT when mypsd_pg() is called. Hence this is why ks_eval_seqctrl_setminduration() is only accessible on HOST[in,out] | seqctrl | Pointer to KS_SEQ_CONTROL struct for the current sequence module |
[in] | mindur | mindur + .ssi_time => .min_duration = .duration @retval STATUS SUCCESSor FAILURE` |
STATUS ks_eval_seqctrl_setduration | ( | KS_SEQ_CONTROL * | seqctrl, |
int | dur | ||
) |
.duration
field of the sequence module (KS_SEQ_CONTROL), while checking that the input value is not less than .min_duration
[in,out] | seqctrl | Pointer to KS_SEQ_CONTROL struct for the current sequence module |
[in] | dur | Desired duration of the current sequence module (including its SSI time, .ssi_time ) |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_seqcollection_durations_setminimum | ( | KS_SEQ_COLLECTION * | seqcollection | ) |
.duration
fields of all sequence modules being part of the sequence collection (KS_SEQ_COLLECTION) to their .min_duration
value[in,out] | seqcollection | Pointer to KS_SEQ_COLLECTION struct holding pointers to all sequence modules |
STATUS | SUCCESS or FAILURE |
STATUS ks_eval_seqcollection_durations_atleastminimum | ( | KS_SEQ_COLLECTION * | seqcollection | ) |
.duration
fields of all sequence modules being part of the sequence collection (KS_SEQ_COLLECTION) are at least their .min_duration
value[in,out] | seqcollection | Pointer to KS_SEQ_COLLECTION struct holding pointers to all sequence modules |
STATUS | SUCCESS or FAILURE |
void ks_grad_heat_init | ( | KS_SEQ_COLLECTION * | seqcollection_p, |
STATUS(*)(const INT max_encode_mode, int nargs, void **args) | play, | ||
int | nargs, | ||
void ** | args | ||
) |
void ks_grad_heat_reset | ( | ) |
STATUS _grad_list_init | ( | struct _grad_list * | grads | ) |
STATUS _grad_list_append | ( | struct _grad_list * | grads, |
t_list * | grad, | ||
int | board | ||
) |
int _grad_compare | ( | const void * | _a, |
const void * | _b | ||
) |
STATUS _grad_list_remove_duplicates | ( | struct _grad_list * | grads | ) |
STATUS _grad_list_add_sequence | ( | struct _grad_list * | grads, |
KS_SEQ_CONTROL * | ctrl | ||
) |
STATUS __wrap_getCornerPoints | ( | FLOAT ** | p_time, |
FLOAT * | ampl[3], | ||
FLOAT * | pul_type[3], | ||
INT * | num_totpoints, | ||
const LOG_GRAD * | log_grad, | ||
const INT | seq_entry_index, | ||
const INT | samp_rate, | ||
const INT | min_tr, | ||
const FLOAT | dbdtinf, | ||
const FLOAT | dbdtfactor, | ||
const FLOAT | efflength, | ||
const INT | max_encode_mode, | ||
const dbLevel_t | debug | ||
) |
STATUS ks_eval_gradlimits | ( | int * | newtime, |
KS_SEQ_COLLECTION * | seqcollection, | ||
const LOG_GRAD * | log_grad, | ||
STATUS(*)(const INT max_encode_mode, int nargs, void **args) | play, | ||
int | nargs, | ||
void ** | args | ||
) |
int ks_eval_rflimits | ( | KS_SAR * | sar, |
KS_SEQ_COLLECTION * | seqcollection | ||
) |
This function uses one KS_SEQ_COLLECTION struct holding the RF for the entire psd (involving one or more sequence modules) to check if an interval can be played out as is or if the overall duration needs to be increased to honor SAR and hardware limits. The interval of measurement is given by the function pointer passed to ks_eval_mintr(), which typically is a sliceloop function playing out the slices for one TR (using one or more sequence modules).
The net time for this period is given by the sum of instances and durations of the sequence modules involved. This information is taken from ks_eval_seqcollection_gettotalduration(), which sums the product of the duration of each sequence module by the number of instances of each sequence module.
ks_eval_hwlimits() will call GE's regular SAR, RF power and gradient heating functions after creating temporary RF_PULSE and GRAD_PULSE structs using the sequence objects (RF and gradients) in the sequence modules.
The gradient information for all sequence modules is accessed via seqcollection->seqctrlptr[i].gradrf.trapptr[...]
, while the RF information for all sequence modules is accessed via seqcollection->seqctrlptr[i].gradrf.rfptr[...]
, with i being the internal sequence module index.
GE's hardware and SAR check functions will return new minimum durations, which may be equal or larger than the net time, depending on the hardware and safety limits. The largest new minimum duration is the return value for this function. Also, if the 1st argument (KS_SAR *) is not pointing to NULL, the SAR information will be stored in this struct, so it can be used by the calling function.
Currently, KSFoundation does not use GE's new gradheat method where cornerpoints of the sequence waveforms are used for the gradient heating calculations. When using the old method, the minseq()
function will likely be too conservative and may add unnecessary time penalty. The level of exaggeration is not clear, why there is a temporary solution with a 'gheatfact' as an input argument, where it is up to the EPIC programmer to decide on this. This variable should be 1.0 to fully obey the old gradient heating calculations (understanding the minimum TR can bump up significantly). To fully ignore gradient heating calculations a value of 0.0 is used. The proper value of this variable, that would correspond to the actual hardware gradient limits, is not known at the moment, but a value closer to 0.0 than 1.0 better matches the new gradient heating model used by GE's product psds. Having said that, absolutely no guarantees are given in terms of gradient damage or similar.
See also: ks_eval_mintr(), ks_eval_maxslicespertr(), ks_eval_seqcollection_gettotalduration()
[out] | sar | Pointer to KS_SAR struct with SAR parameters. If NULL, no attempt to store SAR parameters will be done. If not null, KS_SAR will be set up. In addition, the description of GE's CV 'optr' will be changed so that one can see the limit factor and how much time that had to be added to be within specs. This information can be viewed on the MR system while scanning by DisplayCV and type in 'optr'. |
[in] | seqcollection | A KS_SEQ_COLLECTION struct, which have undergone a reset of seqctlptr[].nseqinstances followed by a single run of the sequence's slice loop or equivalent period |
int | Minimum time in [us] that is needed to safetly play out the .nseqinstances sequence modules over the intended interval (usually one TR for 2D sequences) |
STATUS ks_eval_hwlimits | ( | int * | newtime, |
KS_SEQ_COLLECTION * | seqcollection, | ||
const LOG_GRAD * | log_grad, | ||
STATUS(*)(const INT max_encode_mode, int nargs, void **args) | play, | ||
int | nargs, | ||
void ** | args | ||
) |
s64 ks_eval_getduration | ( | KS_SEQ_COLLECTION * | seqcollection, |
STATUS(*)(const INT max_encode_mode, int nargs, void **args) | play, | ||
int | nargs, | ||
void ** | args | ||
) |
int ks_eval_mintr | ( | int | nslices, |
KS_SEQ_COLLECTION * | seqcollection, | ||
int(*)(int, int, void **) | play_loop, | ||
int | nargs, | ||
void ** | args | ||
) |
This function relies on the existence of a slice loop (wrapper) function that can be run on both HOST and TGT. In addition, it needs a KS_SEQ_COLLECTION struct containing references to the sequence modules (KS_SEQ_CONTROL) used in the slice loop. ks_eval_mintr() will call the slice loop, passed in as a function pointer, with nslices as the first argument.
Different psds have different arguments to their slice loop function depending on what is needed to know for the particular sequence, but a standardized argument list of the sliceloop function is required to allow it to be passed in to ks_eval_mintr(). Therefore, a small wrapper function is likely needed for the psd's sliceloop. Moreover, the sliceloop function must return the time in [us] (int) corresponding to the duration to play out the slice loop for nslices number of slices. E.g. if there is a psd specific function
there should be a wrapper function with the following fixed input args:
(void *)
for the nargs extra arguments)The most important argument is nslices, which must be passed to mysliceloop()
so that different times are returned for different nslices. Hence, mysliceloop()
must also have nslices as an input argument.
If the remaining arguments to mysliceloop()
(like ky, exc, somecustominfo) do not affect the sequence timing, the sliceloop wrapper function can be written as (using mysliceloop() above):
If some of the remaining arguments to mysliceloop()
(like ky, exc, somecustominfo) affect the sequence timing, the sliceloop wrapper function can be written as (using mysliceloop() above):
For scenario #2, nargs and args must be set up before calling ks_eval_mintr(), e.g. like:
[in] | nslices | Number of slices to play out in the slice loop |
[in] | seqcollection | A KS_SEQ_COLLECTION struct, which have undergone a reset of seqctlptr[].nseqinstances followed by a single run of the sequence's slice loop or equivalent period |
[in] | play_loop | Function pointer to the sliceloop (wrapper) function of the sequence. This function should perform all time consuming tasks for one TR. It is a requirement that this function has three input arguments: int nslices, int nargs, void **args |
[in] | nargs | Number of extra arguments to the slice loop wrapper function. This can be 0 if the slice loop is only temporally dependent on nslices |
[in] | args | void * pointer array to extra arguments. This can be NULL if the slice loop is temporally dependent only on nslices |
int | Minimum time in [us] that is needed to safetly play out the .nseqinstances sequence modules over the intended interval (usually one TR for 2D sequences) |
int ks_eval_maxslicespertr | ( | int | TR, |
KS_SEQ_COLLECTION * | seqcollection, | ||
int(*)(int, int, void **) | play_loop, | ||
int | nargs, | ||
void ** | args | ||
) |
The maximum numbers of slices per TR is determined by calling ks_eval_mintr() with an increasing number of slices until the input TR value is reached
[in] | TR | Repetition time in [us] |
[in] | seqcollection | A KS_SEQ_COLLECTION struct, which have undergone a reset of seqctlptr[].nseqinstances followed by a single run of the sequence's slice loop or equivalent period |
[in] | play_loop | Function pointer to the sliceloop (wrapper) function of the sequence. This function should perform all time consuming tasks for one TR. It is a requirement that this function has three input arguments: int nslices, int nargs, void **args |
[in] | nargs | Number of extra arguments to the slice loop wrapper function. This can be 0 if the slice loop is only temporally dependent on nslices |
[in] | args | void * pointer array to extra arguments. This can be NULL if the slice loop is temporally dependent only on nslices |
int | Maximum number of slices that can fit in one TR |
void ks_eval_seqcollection_resetninst | ( | KS_SEQ_COLLECTION * | seqcollection | ) |
.nseqinstances
field of each sequence module (KS_SEQ_CONTROL) equal to 0This function is called in ks_eval_mintr() and GEReq_eval_TR() to reset the sequence module counters before calling the psd's scanloop function, where the ks_scan_playsequence() functions internally increment .nseqinstances
by one every time they are called
[in,out] | seqcollection | Collection of all sequence modules (KS_SEQ_COLLECTION). C.f. ks_eval_addtoseqcollection() |
s64 ks_eval_seqcollection_gettotalduration | ( | KS_SEQ_COLLECTION * | seqcollection | ) |
Based on the seqctrl.ninstances
and seqctrl.duration
fields for each KS_SEQ_CONTROL (sequence module) that have been added to the sequence collection struct (KS_SEQ_COLLECTION), this function returns the total duration of the sequence collection. No time is added to comply with SAR or hardware limits, hence this time may not be possible to use in practice. See ks_eval_mintr(), GEReq_eval_TR(), and ks_eval_hwlimits() for more details.
[in] | seqcollection | Collection of all sequence modules (KS_SEQ_COLLECTION). C.f. ks_eval_addtoseqcollection() |
int | Time in [us] |
s64 ks_eval_seqcollection_gettotalminduration | ( | KS_SEQ_COLLECTION * | seqcollection | ) |
Based on the seqctrl.ninstances
and seqctrl.min_duration
fields for each KS_SEQ_CONTROL (sequence module) that have been added to the sequence collection struct (KS_SEQ_COLLECTION), this function returns the total minimum duration possible of the sequence collection, i.e. the time needed to play out the sequence waveforms without any deadtime. See ks_eval_mintr(), GEReq_eval_TR(), and ks_eval_hwlimits() for more details
[in] | seqcollection | Collection of all sequence modules (KS_SEQ_COLLECTION). C.f. ks_eval_addtoseqcollection() |
int | Time in [us] |
STATUS ks_eval_seqcollection2rfpulse | ( | RF_PULSE * | rfpulse, |
KS_SEQ_COLLECTION * | seqcollection | ||
) |
rfpulse[]
array from the contents of a KS_SEQ_COLLECTION structTo use GE's maxsar()
and maxseqrfamp()
functions in ks_eval_hwlimits() there needs to be an rfpulse[]
array containing info about the RF pulses. This info is for standard EPIC psds stored on disk in a file grad_rf_<psdname>.h. KSFoundation EPIC psds with one or more sequence modules (KS_SEQ_CONTROL) have all RF information stored in seqcollection->seqctrlptr[i].gradrf.rfptr[]. This function takes all RF information from all sequence modules in the sequence collection and puts in the proper format in rfpulse[]
. Then rfpulse[]
can be passed on to maxsar()
and maxseqrfamp()
(see ks_eval_hwlimits())
[out] | rfpulse | Pointer to rfpulse[] array |
[in] | seqcollection | Pointer to the sequence collection struct for the sequence |
STATUS | SUCCESS or FAILURE |
int ks_isIceHardware | ( | ) |
int ks_default_ssitime | ( | ) |
STATUS ks_bitmask_set | ( | unsigned int | out, |
const unsigned int | in, | ||
const unsigned int | size, | ||
const unsigned int | offset | ||
) |
unsigned int ks_bitmask_get | ( | const unsigned int | in, |
const unsigned int | size, | ||
const unsigned int | offset | ||
) |
unsigned int ks_calc_nextpow2 | ( | unsigned int | x | ) |
[in] | x | Integer (usually related to resolution) |
nextpow2 | Unsigned integer with a value equal to the nearest larger power-of-2 |
int ks_calc_roundupms | ( | int | time | ) |
STATUS ks_calc_filter | ( | FILTER_INFO * | echo_filter, |
int | tsp, | ||
int | duration | ||
) |
This function is used internally by ks_eval_read() as a part of the setup of a KS_READ sequence object, which contains the .filt
(FILTER_INFO) field that is used with the corresponding acquisition window in the field .echo
of the KS_READ object
ks_calc_filter() will set the field .filt.slot
to KS_NOTSET
(= -1). A final (global) hardware slot number is set when either setfilter()
or GEReq_predownload_setfilter() is called in predownload()
. With the assigned slot number, ks_pg_read() in pulsegen()
will connect this filter to the acquisition window by internally calling setrfltrs()
initfilter()
is called in the Requiredcvinit section of GERequired.e. Make sure this section is @inline'd in cvinit()
in the main sequencesetfilter()
, after @inlining the RequiredpredownloadBegin section of GERequired.e. Pass the .filt
field set up by this function to GEReq_predownload_setfilter()[out] | echo_filter | FILTER_INFO struct needed for data acquisition |
[in] | tsp | Duration in [us] for each data sample (dwell time) in the acquisition window. Minimum: 2 [us] |
[in] | duration | Duration in [us] of the entire data acquisition window |
STATUS | SUCCESS or FAILURE |
STATUS ks_write_vector_bf | ( | float * | vec, |
uint32_t | numel, | ||
const char * | fname | ||
) |
int ks_calc_bw2tsp | ( | float | bw | ) |
[in] | bw | +/- bandwidth per FOV in [kHz]. Maximum: 250 |
tsp | Duration in [us] for each data sample (dwell time) in the acquisition window |
float ks_calc_tsp2bw | ( | int | tsp | ) |
[in] | tsp | Duration in [us] for each data sample in the acquisition window. Minimum: 2 [us] |
bw | +/- bandwidth per FOV in [kHz] |
float ks_calc_nearestbw | ( | float | bw | ) |
As the dwell time is an integer and the reciprocal of receiver bandwidth, only certain values of receiver bandwidth are possible. This functions rounds a desired receiver bandwidth to the nearest valid value
[in] | bw | +/- bandwidth per FOV in [kHz]. Maximum: 250 |
bw | Rounded +/- bandwidth per FOV in [kHz] |
float ks_calc_lower_rbw | ( | float | rbw | ) |
ADDDESCHERE
[in] | rbw | ADDTEXTHERE |
float | ADDTEXTHERE |
float ks_calc_higher_rbw | ( | float | rbw | ) |
ADDDESCHERE
[in] | rbw | ADDTEXTHERE |
float | ADDTEXTHERE |
float ks_calc_max_rbw | ( | float | ampmax, |
float | fov | ||
) |
As the dwell time is an integer and the reciprocal of receiver bandwidth, only certain values of receiver bandwidth are possible. This functions rounds a desired receiver bandwidth to the nearest valid value
[in] | ampmax | Max gradient amplitude allowed |
[in] | fov | FOV in the readout direction [mm] |
bw | Rounded +/- bandwidth per FOV in [kHz] |
int ks_calc_trap_time2area | ( | KS_TRAP * | trap, |
float | area | ||
) |
[in] | trap | KS_TRAP* Trapezoid gradient |
[in] | area | Area to reach |
time | in [us] |
STATUS ks_calc_sliceplan | ( | KS_SLICE_PLAN * | slice_plan, |
int | nslices, | ||
int | slperpass | ||
) |
This function calls ks_calc_slice_acquisition_order_interleaved() with the last argument being 2, indicating an interleave factor of 2. This will make odd slices in each pass to be acquired first, followed by the even slices.
[out] | slice_plan | The slice plan (KS_SLICE_PLAN) set up earlier using ks_calc_sliceplan() or similar |
[in] | nslices | Total number of slices (usually opslquant) |
[in] | slperpass | Number of slices per pass (i.e. per TR) |
STATUS | SUCCESS or FAILURE |
STATUS ks_calc_sliceplan_interleaved | ( | KS_SLICE_PLAN * | slice_plan, |
int | nslices, | ||
int | slperpass, | ||
int | inpass_interleaves | ||
) |
The last argument to this function indicates the interleave factor of slices within each pass. If this value is
[out] | slice_plan | Pointer to the slice plan (KS_SLICE_PLAN) set up earlier using ks_calc_sliceplan() or similar |
[in] | nslices | Total number of slices (usually opslquant) |
[in] | slperpass | Number of slices per pass (i.e. per TR) |
[in] | inpass_interleaves | Interleave factor of slices in a pass |
STATUS | SUCCESS or FAILURE |
STATUS ks_calc_sliceplan_sms | ( | KS_SLICE_PLAN * | slice_plan, |
int | nslices, | ||
int | slperpass, | ||
int | multiband_factor | ||
) |
[out] | slice_plan | The slice plan (KS_SLICE_PLAN) set up earlier using ks_calc_sliceplan() or similar |
[in] | nslices | Total number of slices (usually opslquant) |
[in] | slperpass | Number of slices per pass (i.e. per TR) |
[in] | multiband_factor | Number of SMS slices |
STATUS | SUCCESS or FAILURE |
STATUS ks_sms_check_divisibility | ( | int * | inpass_interleaves, |
const int | sms_factor, | ||
const int | nslices_per_pass, | ||
const int | nslices | ||
) |
If possible, the number of inpass_interleaves will be adjusted to fix the issue.
[out] | inpass_interleaves | Interleave factor of slices in a pass |
[in] | sms_factor | Number of SMS slices |
[in] | nslices_per_pass | Number of slices per pass (i.e. per TR) |
[in] | nslices | Total number of slices |
STATUS | SUCCESS or FAILURE |
int ks_calc_sms_min_gap | ( | DATA_ACQ_ORDER * | dacq, |
int | nslices | ||
) |
TODO: just works for single acquisitions
[out] | dacq | Data acquisition order array (local) |
[in] | nslices | Total number of slices prescribed |
int | The minimum time gap between adjacent slices |
int ks_calc_slice_acquisition_order_smssingleacq_impl | ( | DATA_ACQ_ORDER * | dacq, |
int | nslices, | ||
int | interleave | ||
) |
int ks_calc_slice_acquisition_order_smssingleacq | ( | DATA_ACQ_ORDER * | dacq, |
int | nslices | ||
) |
[out] | dacq | Data acquisition order array (local) |
[in] | nslices | Total number of slices prescribed |
int | Resulting number of passes (or acqs) (in this case 1) |
float ks_calc_integrate_coords | ( | float * | t, |
float * | G, | ||
int | num_coords | ||
) |
[in] | t | Time points (array with num_coords elements) |
[in] | G | Amplitude (array with num_coords elements) |
[in] | num_coords | Number of points in t and G |
float | Integral (in units of G*t) |
int ks_get_center_encode | ( | const KS_PHASEENCODING_PLAN *const | peplan, |
int | shot, | ||
int | yres, | ||
int | zres | ||
) |
TODO: Support searching more than one shot
int ks_get_center_encode_linearsweep | ( | const KS_KSPACE_ACQ * | kacq, |
const int | etl, | ||
const KS_PF_EARLYLATE | pf_earlylate_te | ||
) |
void ks_print_seqcollection | ( | KS_SEQ_COLLECTION * | seqcollection, |
FILE * | fp | ||
) |
[in] | seqcollection | Collection of all sequence modules (KS_SEQ_COLLECTION). C.f. ks_eval_addtoseqcollection() |
[in] | fp | File pointer to file to write to |
void ks_print_sliceplan | ( | const KS_SLICE_PLAN | slice_plan, |
FILE * | fp | ||
) |
slice_plan | KS_SLICE_PLAN for the sequence |
fp | A file pointer (or stderr ) |
void ks_print_scaninfo | ( | const SCAN_INFO * | scan_info, |
int | nslices, | ||
const char * | desc, | ||
FILE * | fp | ||
) |
[in] | scan_info | File pointer to SCAN_INFO |
[in] | nslices | Number of slices prescribed |
[in] | desc | Description of the slice info (or NULL) |
[in] | fp | File pointer to file to write to |
void ks_print_waveform | ( | const KS_WAVEFORM | waveform, |
const char * | filename, | ||
int | res | ||
) |
[in] | waveform | A KS_WAVEFORM (i.e. float array) to be written |
[in] | filename | String with the output file name |
[in] | res | Number of elements in the waveform to be written |
void ks_print_wave_part | ( | const KS_WAVE *const | wave, |
const char * | filename, | ||
int | startidx, | ||
int | numel | ||
) |
void ks_print_readwave | ( | const KS_READWAVE *const | readwave, |
const char * | filename | ||
) |
ks_print_wave
on readwave.grads[].
[in] | readwave | Pointer to KS_READWAVE to be printed |
[in] | filename | String with the output file name |
void ks_print_wave | ( | const KS_WAVE *const | wave, |
const char * | filename | ||
) |
void ks_print_read | ( | KS_READ | read, |
FILE * | fp | ||
) |
If 2nd argument is stderr
or stdout
, the printed result will be seen in WTools for simulation. On the MR system, stderr
will show up in one of the mgd_term windows. A file pointer (opened with e.g. fp = fopen("/usr/g/mrraw/myname.txt","w")) saves a text file to disk
[in] | read | A KS_READ object to be printed |
[in] | fp | A file pointer (or stderr ) |
void ks_print_trap | ( | KS_TRAP | trap, |
FILE * | fp | ||
) |
If 2nd argument is stderr
or stdout
, the printed result will be seen in WTools for simulation. On the MR system, stderr
will show up in one of the mgd_term windows. A file pointer (opened with e.g. fp = fopen("/usr/g/mrraw/myname.txt","w")) saves a text file to disk
[in] | trap | A KS_TRAP object to be printed |
[in] | fp | A file pointer (or stderr ) |
void ks_print_readtrap | ( | KS_READTRAP | readtrap, |
FILE * | fp | ||
) |
If 2nd argument is stderr
or stdout
, the printed result will be seen in WTools for simulation. On the MR system, stderr
will show up in one of the mgd_term windows. A file pointer (opened with e.g. fp = fopen("/usr/g/mrraw/myname.txt","w")) saves a text file to disk
[in] | readtrap | A KS_READTRAP object to be printed |
[in] | fp | A file pointer (or stderr ) |
void ks_print_phaser | ( | KS_PHASER | phaser, |
FILE * | fp | ||
) |
If 2nd argument is stderr
or stdout
, the printed result will be seen in WTools for simulation. On the MR system, stderr
will show up in one of the mgd_term windows. A file pointer (opened with e.g. fp = fopen("/usr/g/mrraw/myname.txt","w")) saves a text file to disk
[in] | phaser | A KS_PHASER object to be printed |
[in] | fp | A file pointer (or stderr ) |
void ks_print_gradrfctrl | ( | KS_GRADRFCTRL | gradrfctrl, |
FILE * | fp | ||
) |
If 2nd argument is stderr
or stdout
, the printed result will be seen in WTools for simulation. On the MR system, stderr
will show up in one of the mgd_term windows. A file pointer (opened with e.g. fp = fopen("/usr/g/mrraw/myname.txt","w")) saves a text file to disk
[in] | gradrfctrl | A KS_GRADRFCTRL object to be printed |
[in] | fp | A file pointer (or stderr ) |
void ks_print_epi | ( | KS_EPI | epi, |
FILE * | fp | ||
) |
If 2nd argument is stderr
or stdout
, the printed result will be seen in WTools for simulation. On the MR system, stderr
will show up in one of the mgd_term windows. A file pointer (opened with e.g. fp = fopen("/usr/g/mrraw/myname.txt","w")) saves a text file to disk
[in] | epi | A KS_EPI object to be printed |
[in] | fp | A file pointer (or stderr ) |
void ks_print_rfpulse | ( | RF_PULSE | rfpulse, |
FILE * | fp | ||
) |
If 2nd argument is stderr
or stdout
, the printed result will be seen in WTools for simulation. On the MR system, stderr
will show up in one of the mgd_term windows. A file pointer (opened with e.g. fp = fopen("/usr/g/mrraw/myname.txt","w")) saves a text file to disk
[in] | rfpulse | An RF_PULSE struct (<rf>.rfpulse ) to be printed |
[in] | fp | A file pointer (or stderr ) |
void ks_print_rf | ( | KS_RF | rf, |
FILE * | fp | ||
) |
If 2nd argument is stderr
or stdout
, the printed result will be seen in WTools for simulation. On the MR system, stderr
will show up in one of the mgd_term windows. A file pointer (opened with e.g. fp = fopen("/usr/g/mrraw/myname.txt","w")) saves a text file to disk
[in] | rf | A KS_RF object to be printed |
[in] | fp | A file pointer (or stderr ) |
void ks_print_selrf | ( | KS_SELRF | selrf, |
FILE * | fp | ||
) |
If 2nd argument is stderr
or stdout
, the printed result will be seen in WTools for simulation. On the MR system, stderr
will show up in one of the mgd_term windows. A file pointer (opened with e.g. fp = fopen("/usr/g/mrraw/myname.txt","w")) saves a text file to disk
[in] | selrf | A KS_SELRF object to be printed |
[in] | fp | A file pointer (or stderr ) |
STATUS ks_print_acqwaves | ( | KS_SEQ_COLLECTION * | seqcollection | ) |
[in] | seqcollection | The KS_SEQ_COLLECTION sequence collection |
void ks_print_readwaves | ( | KS_ECHOTRAIN *const | echotrain, |
const char * | suffix, | ||
int | rhkacq_uid | ||
) |
ADDDESCHERE
echotrain | ADDTEXTHERE | |
suffix | ADDTEXTHERE | |
[in] | rhkacq_uid | ADDTEXTHERE |
int ks_eval_clear_readwave | ( | KS_READWAVE * | readwave | ) |
float get_t1 | ( | float | A, |
float | s, | ||
float | c | ||
) |
float get_T | ( | float | A, |
float | s, | ||
float | c, | ||
float | t1 | ||
) |
float get_b | ( | float | A, |
float | c, | ||
float | T, | ||
float | t1 | ||
) |
void get_ramp | ( | ks_rampparams_s * | out, |
float | A, | ||
float | s, | ||
float | c | ||
) |
STATUS ks_area_to_amp | ( | KS_WAVE * | out, |
float | area, | ||
float | max_slew, | ||
float | amp | ||
) |
int ks_eval_append_blip | ( | KS_WAVE * | wave, |
const float | max_s, | ||
const int | max_points, | ||
const float | area | ||
) |
int ks_file_exist | ( | char * | filename | ) |
void ks_plot_host_slicetime_path | ( | char * | path | ) |
void ks_plot_host_slicetime_fullfile | ( | char * | fullfile | ) |
void ks_plot_host_slicetime_delete | ( | ) |
ADDDESCHERE
void ks_plot_host_slicetime_begin | ( | ) |
ADDDESCHERE
void ks_plot_host_slicetime_endofslicegroup | ( | const char * | desc, |
const KS_PLOT_SLICEGROUP_MODE | tag | ||
) |
ADDDESCHERE
desc | ADDTEXTHERE | |
[in] | tag | ADDTEXTHERE |
void ks_plot_host_slicetime_endofpass | ( | KS_PLOT_PASS_MODE | pass_mode | ) |
ADDDESCHERE
[in] | pass_mode | ADDTEXTHERE |
void ks_plot_host_slicetime | ( | const KS_SEQ_CONTROL * | ctrl, |
int | nslices, | ||
float * | slicepos_mm, | ||
float | slthick_mm, | ||
KS_PLOT_EXCITATION_MODE | exctype | ||
) |
ADDDESCHERE
ctrl | ADDTEXTHERE | |
[in] | nslices | ADDTEXTHERE |
slicepos_mm | ADDTEXTHERE | |
[in] | slthick_mm | ADDTEXTHERE |
[in] | exctype | ADDTEXTHERE |
void ks_plot_host_slicetime_end | ( | ) |
ADDDESCHERE
void ks_plot_host | ( | const KS_SEQ_COLLECTION * | seqcollection, |
const KS_PHASEENCODING_PLAN * | plan | ||
) |
ADDDESCHERE
seqcollection | ADDTEXTHERE |
plan | ADDTEXTHERE |
void ks_plot_host_seqctrl | ( | const KS_SEQ_CONTROL * | ctrl, |
const KS_PHASEENCODING_PLAN * | plan | ||
) |
ADDDESCHERE
ctrl | ADDTEXTHERE |
plan | ADDTEXTHERE |
void ks_plot_host_rtscales_amps | ( | const KS_RT_SCALE_LOG * | rtscalelog, |
FILE * | fp, | ||
const int | instance | ||
) |
void ks_plot_host_rtscales_states | ( | const KS_RT_SCALE_LOG * | rtscalelog, |
FILE * | fp, | ||
const int | instance | ||
) |
void ks_plot_host_wavestates | ( | const KS_WAVE * | waveptr, |
FILE * | fp | ||
) |
void ks_plot_write_peplans | ( | const KS_PHASEENCODING_PLAN *const * | plans, |
const int | num_plans, | ||
FILE * | fp | ||
) |
ADDDESCHERE
plans | ADDTEXTHERE | |
[in] | num_plans | ADDTEXTHERE |
fp | ADDTEXTHERE |
void ks_plot_host_seqctrl_manyplans | ( | const KS_SEQ_CONTROL * | ctrl, |
const KS_PHASEENCODING_PLAN ** | plan, | ||
const int | num_plans | ||
) |
ADDDESCHERE
ctrl | ADDTEXTHERE | |
plan | ADDTEXTHERE | |
[in] | num_plans | ADDTEXTHERE |
void ks_plot_filename | ( | char * | fname, |
char * | path, | ||
char * | outputdir, | ||
char * | outputdir_uid, | ||
const char *const | seq_desc | ||
) |
ADDDESCHERE
fname | ADDTEXTHERE |
path | ADDTEXTHERE |
outputdir | ADDTEXTHERE |
outputdir_uid | ADDTEXTHERE |
seq_desc | ADDTEXTHERE |
void ks_plot_saveconfig | ( | KS_SEQ_CONTROL * | ctrl | ) |
ADDDESCHERE
ctrl | ADDTEXTHERE |
STATUS ks_repeat_peplan | ( | KS_PHASEENCODING_PLAN * | peplan, |
const KS_PHASEENCODING_REPEAT_DESIGN *const | repeat | ||
) |
ADDDESCHERE
peplan | ADDTEXTHERE |
repeat | ADDTEXTHERE |
STATUS | ADDTEXTHERE |
int ks_comp_kcoord_r_t | ( | const void * | a, |
const void * | b | ||
) |
ADDDESCHERE
a | ADDTEXTHERE |
b | ADDTEXTHERE |
int | ADDTEXTHERE |
int ks_comp_kcoord_dist_z_y | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_dist_z_y | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kcoord_dist_y_z | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_dist_y_z | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kcoord_z_y | ( | const void * | a, |
const void * | b | ||
) |
ADDDESCHERE
a | ADDTEXTHERE |
b | ADDTEXTHERE |
int | ADDTEXTHERE |
int ks_comp_kcoord_y_z | ( | const void * | a, |
const void * | b | ||
) |
ADDDESCHERE
a | ADDTEXTHERE |
b | ADDTEXTHERE |
int | ADDTEXTHERE |
int ks_comp_kview_r_t | ( | const void * | a, |
const void * | b | ||
) |
ADDDESCHERE
a | ADDTEXTHERE |
b | ADDTEXTHERE |
int | ADDTEXTHERE |
int ks_comp_kview_t_r | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_y_z | ( | const void * | a, |
const void * | b | ||
) |
ADDDESCHERE
a | ADDTEXTHERE |
b | ADDTEXTHERE |
int | ADDTEXTHERE |
int ks_comp_kview_z_y | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_y_r | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_z_r | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_e_tr | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_e_rt | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_e_zy | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_e_yz | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_e_yr | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_e_zr | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_e_sec_t | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_y_z_descend | ( | const void * | a, |
const void * | b | ||
) |
int ks_comp_kview_z_y_descend | ( | const void * | a, |
const void * | b | ||
) |
ks_comparator ks_get_comp_kview_y_z | ( | int | ascend | ) |
ks_comparator ks_get_comp_kview_z_y | ( | int | ascend | ) |
void ks_get_matrix_from_kcoords | ( | KS_KCOORD * | K, |
const int | num_coords, | ||
int * | y, | ||
int * | z | ||
) |
Checks all KCOORDS to find the largest span in ky and/or kz.
[in] | K | - Will be sorted |
[in] | num_coords | - number of entries in K |
[out] | y | - matrix size in y |
[out] | z | - matrix size in z |
void ks_pe_linear | ( | int * | view_order, |
int | ETL | ||
) |
void ks_pe_linear_roll | ( | int * | view_order, |
int | ETL, | ||
int | c | ||
) |
ADDDESCHERE
view_order | ADDTEXTHERE | |
[in] | ETL | ADDTEXTHERE |
[in] | c | ADDTEXTHERE |
void ks_pe_pivot_roll | ( | int * | view_order, |
int | ETL, | ||
int | c | ||
) |
ADDDESCHERE
view_order | ADDTEXTHERE | |
[in] | ETL | ADDTEXTHERE |
[in] | c | ADDTEXTHERE |
void ks_pivot_linear_center_symk | ( | int * | view_order, |
int | ETL, | ||
int | c | ||
) |
ADDDESCHERE
view_order | ADDTEXTHERE | |
[in] | ETL | ADDTEXTHERE |
[in] | c | ADDTEXTHERE |
void ks_pivot_specific_center_symk | ( | int * | view_order, |
int | ETL, | ||
int | c | ||
) |
ADDDESCHERE
view_order | ADDTEXTHERE | |
[in] | ETL | ADDTEXTHERE |
[in] | c | ADDTEXTHERE |
void ks_pivot_specific_center_radk | ( | int * | view_order, |
int | ETL, | ||
int | c | ||
) |
ADDDESCHERE
view_order | ADDTEXTHERE | |
[in] | ETL | ADDTEXTHERE |
[in] | c | ADDTEXTHERE |
int ks_readout_start_index | ( | int | center, |
int | etl, | ||
int | num_encodes_per_train | ||
) |
KS_PEPLAN_SHOT_DISTRIBUTION ks_peplan_distribute_shots | ( | const int | etl, |
const int | num_coords, | ||
const int | center | ||
) |
ADDDESCHERE
[in] | etl | ADDTEXTHERE |
[in] | num_coords | ADDTEXTHERE |
[in] | center | ADDTEXTHERE |
KS_PEPLAN_SHOT_DISTRIBUTION | ADDTEXTHERE |
int ks_peplan_find_center_from_linear_sweep | ( | KS_KCOORD *const | K, |
KS_VIEW * | views_in, | ||
const int | num_coords, | ||
const KS_MTF_DIRECTION | mtf_direction, | ||
const int | sweep_sign, | ||
const int | segment_size, | ||
const int | start_encode | ||
) |
STATUS ks_peplan_assign_shots | ( | KS_PHASEENCODING_PLAN * | peplan, |
const KS_VIEW *const | views, | ||
const int | num_views, | ||
const KS_PEPLAN_SHOT_DISTRIBUTION *const | shot_dist, | ||
const int | first_shot_number, | ||
const int | y_offset, | ||
const int | z_offset, | ||
const int | is3D | ||
) |
STATUS ks_generate_peplan_from_kcoords_american | ( | const KS_KSPACE_ACQ * | kacq, |
KS_PHASEENCODING_PLAN * | peplan, | ||
const KS_MTF_DIRECTION | mtf_direction, | ||
const int | etl, | ||
const int | center | ||
) |
<-— center
^ *
| *
ky *
Time ->
STATUS ks_generate_peplan_from_kcoords_dutch | ( | const KS_KSPACE_ACQ * | kacq, |
KS_PHASEENCODING_PLAN * | peplan, | ||
KS_MTF_DIRECTION | mtf_direction, | ||
const int | etl, | ||
const int | center | ||
) |
STATUS ks_assign_encodes | ( | KS_VIEW *const | views, |
const int | num_views, | ||
const int | start_encode, | ||
const int | num_encodes, | ||
const int | sign | ||
) |
STATUS ks_pe_permute_pclo_rad | ( | int * | view_order, |
const int | etl, | ||
const int | center | ||
) |
ADDDESCHERE
view_order | ADDTEXTHERE | |
[in] | etl | ADDTEXTHERE |
[in] | center | ADDTEXTHERE |
STATUS | SUCCESS or FAILURE |
STATUS ks_lcpo_assign_encodes | ( | KS_VIEW * | views, |
const int | num_coords, | ||
KS_MTF_DIRECTION | mtf_direction, | ||
const int | split_shots, | ||
const int | etl, | ||
const int | center | ||
) |
STATUS ks_generate_peplan_from_kcoords | ( | const KS_KSPACE_ACQ * | kacq, |
KS_PHASEENCODING_PLAN * | peplan, | ||
KS_MTF_DIRECTION | mtf_direction, | ||
KS_VIEW_SORT_ORDER | encode_shot_assignment_order, | ||
KS_VIEW_MTF_PROFILE | mtf_profile, | ||
const int | etl, | ||
int | center, | ||
const KS_COORDINATE_TYPE *const | coord_types | ||
) |
ADDDESCHERE
[in] | kacq | ADDTEXTHERE |
[out] | peplan | ADDTEXTHERE |
[in] | mtf_direction | ADDTEXTHERE |
[in] | encode_shot_assignment_order | ADDTEXTHERE |
[in] | mtf_profile | ADDTEXTHERE |
[in] | etl | ADDTEXTHERE |
[in] | center | ADDTEXTHERE |
[in] | coord_types | KS_COORDINATE_TYPE ADDTEXTHERE |
STATUS | SUCCESS or FAILURE |
STATUS ks_phaseencoding_generate_2d_singleshot_cal | ( | KS_PHASEENCODING_PLAN * | phaseenc_plan_ptr, |
int | yres | ||
) |
ADDDESCHERE
[out] | phaseenc_plan_ptr | Pointer to KS_PHASEENCODING_PLAN |
yres | ADDTEXTHERE |
STATUS | SUCCESS or FAILURE |
int ks_cal_from_nacslines | ( | int | R, |
int | nacslines | ||
) |
STATUS ks_generate_3d_coords_caipi | ( | KS_KSPACE_ACQ * | kacq, |
int | Ny, | ||
int | Nz, | ||
int | nover_y, | ||
int | nover_z, | ||
int | Ry, | ||
int | Rz, | ||
int | cal_y, | ||
int | cal_z, | ||
KS_COVERAGE | cal_coverage, | ||
KS_COVERAGE | acq_coverage, | ||
int | dy, | ||
int | dz, | ||
int | step_y, | ||
int | step_z | ||
) |
Generates Cartesian Coordinates with or without CAPIRINHA undersampling.
[out] | kacq | KS_KSPACE_ACQ object to be populated with coords, num_coords, and matrix_size |
[in] | Ny | Number of lines along ky (without acceleration) |
[in] | Nz | Number of lines accross Nz (without acceleration). |
[in] | nover_y | Number of lines beyond Ny/2 to acquire when using partial Fourier. If nover_y < 0 remove low ky. If nover_y > 0 remove high ky. If nover_y = 0 no Partial Fourier in y. |
[in] | nover_z | Number of lines beyond Nz/2 to acquire when using partial Fourier. If nover_z < 0 remove low ky. If nover_z > 0 remove high ky. If nover_z = 0 no Partial Fourier in z. |
[in] | Ry | Undersampling factor in y |
[in] | Rz | Undersampling factor in z |
[in] | cal_y | Width of calibration region in y |
[in] | cal_z | Width of calibration region in z |
[in] | cal_coverage | Calibration region coverage, (RECTANGULAR or ELLIPTICAL) |
[in] | acq_coverage | Acquisition region coverage, (RECTANGULAR or ELLIPTICAL) |
[in] | dy | (CAIPIRINHA) Amount of shifting of the y-coordinate between consecutive kz rows |
[in] | dz | Not used |
[in] | step_y | (CAIPIRINHA) Maximum y offset (N*dy) before it loops back to 0 |
[in] | step_z | Not used |
STATUS | SUCCESS or FAILURE |
STATUS ks_generate_3d_coords_simple | ( | KS_KSPACE_ACQ * | kacq, |
int | Ny, | ||
int | Nz, | ||
int | nover_y, | ||
int | nover_z, | ||
int | Ry, | ||
int | Rz, | ||
int | cal_y, | ||
int | cal_z, | ||
KS_COVERAGE | cal_coverage, | ||
KS_COVERAGE | acq_coverage | ||
) |
Generates Cartesian Coordinates.
Calls ks_generate_3d_coords_caipi with the CAIPIRINHA variables, dy, dz, step_y, and step_z set to 0.
[out] | kacq | KS_KSPACE_ACQ object to be populated with coords, num_coords, and matrix_size |
[in] | Ny | Number of lines along ky (without acceleration) |
[in] | Nz | Number of lines accross Nz (without acceleration). |
[in] | nover_y | Number of lines beyond Ny/2 to acquire when using partial Fourier. If nover_y < 0 remove low ky. If nover_y > 0 remove high ky. If nover_y = 0 no Partial Fourier in y. |
[in] | nover_z | Number of lines beyond Nz/2 to acquire when using partial Fourier. If nover_z < 0 remove low ky. If nover_z > 0 remove high ky. If nover_z = 0 no Partial Fourier in z. |
[in] | Ry | Undersampling factor in y |
[in] | Rz | Undersampling factor in z |
[in] | cal_y | Width of calibration region in y |
[in] | cal_z | Width of calibration region in z |
[in] | cal_coverage | Calibration region coverage, (RECTANGULAR or ELLIPTICAL) |
[in] | acq_coverage | Acquisition region coverage, (RECTANGULAR or ELLIPTICAL) |
STATUS | SUCCESS or FAILURE |
STATUS ks_generate_2d_coords_cal | ( | KS_KSPACE_ACQ * | kacq, |
int | num_desired_coords, | ||
int | yres | ||
) |
ADDDESCHERE
STATUS | SUCCESS or FAILURE |
STATUS ks_generate_3d_coords_radial | ( | KS_KSPACE_ACQ * | kacq, |
int | tiny_level, | ||
int | Ny, | ||
int | Nz, | ||
int | Ry, | ||
int | Rz, | ||
KS_RADIAL_SAMPLING_MODE | radial_mode, | ||
KS_RADIAL_SAMPLING_COVERAGE | radial_sampling_coverage | ||
) |
Generates Radial Coordinates.
If radial_sampling_mode is CARTESIAN, this function will call ks_generate_3d_coords_simple(kacq, Ny, Nz, 0, 0, Ry, Rz, 0, 0, RECTANGULAR, RECTANGULAR);
For 2D radial, Nz<=1. For 3D Kooshball radial, radial_mode must be RADIAL_THROUGH_CENTER and Nz>1. For 3D Stack-of-stars radial, radial_mode must be RADIAL_SOS and Nz>1.
For golden angle sampling (tiny_level != 0), the angular increment between consecutive spokes are generated using the following formula for 2D and stack of stars (Wundrak et al. https://doi.org/10.1002/mrm.25831):
phi_step = 1.0 /(KS_GOLDEN_MEANS_1D+tiny_level-1)
...and for kooshball this formula is followed (Fyrdahl et al. https://doi.org/10.1007/s10334-020-00859-z):
phi_step = 1.0/(pow(KS_GOLDEN_MEANS_2D_2,-1) + tiny_level-1.0)
theta_step = phi_step/(1+KS_GOLDEN_MEANS_2D_1)
For SAMPLE_360 radial_sampling_coverage the spokes are generated on the half circle/sphere but every other spoke is inverted.
In kacq.coords the angles are stored as signed 16 bit integers that can be converted to floats in the range -180:180 degrees using KS_ANGLE_PER_INT_16_MAX_180
[out] | kacq | KS_KSPACE_ACQ object to be populated with coords, num_coords, and matrix_size |
[in] | tiny_level | Tiny level for golden angle radial sampling (0 means uniform sampling instead of golden angle). |
[in] | Ny | Number of lines along ky (without acceleration) |
[in] | Nz | Number of lines accross Nz (without acceleration). |
[in] | Ry | Undersampling factor in coordinate 1 (phi) |
[in] | Rz | Undersampling factor in coordinte 2 (kz or theta) |
[in] | radial_mode | Sampling mode (Cartesian, radial through center, or stack-of-stars) |
[in] | radial_sampling_coverage | Whether the spokes should originate from a half circle/sphere or full circel/sphere |
STATUS | SUCCESS or FAILURE |
float rand_float_in_range | ( | float | min, |
float | max | ||
) |
float ks_poisson_disc_min_spacing | ( | const int | y, |
const int | z, | ||
const float | center_y, | ||
const float | center_z, | ||
const float | min_spacing, | ||
const float | max_spacing, | ||
const RADIUS_PATTERN | pattern | ||
) |
int check_conflicts | ( | int * | grid, |
int | Ny, | ||
int | Nz, | ||
KS_KCOORD | cand, | ||
float | cand_radius | ||
) |
void remove_element | ( | KS_KCOORD * | coord_array, |
int | idx, | ||
int | size | ||
) |
STATUS ks_generate_3d_coords_poisson_disc_R | ( | KS_KSPACE_ACQ * | kacq, |
int | Ny, | ||
int | Nz, | ||
float | R, | ||
KS_COVERAGE | cal_coverage, | ||
int | cal_y, | ||
int | cal_z, | ||
RADIUS_PATTERN | pattern | ||
) |
ADDDESCHERE
STATUS | SUCCESS or FAILURE |
STATUS ks_generate_3d_coords_poisson_disc | ( | KS_KSPACE_ACQ * | kacq, |
int | Ny, | ||
int | Nz, | ||
float | min_spacing, | ||
float | max_spacing, | ||
KS_COVERAGE | cal_coverage, | ||
int | cal_y, | ||
int | cal_z, | ||
RADIUS_PATTERN | pattern | ||
) |
ADDDESCHERE
STATUS | SUCCESS or FAILURE |
STATUS ks_generate_3d_coords_epi | ( | KS_KSPACE_ACQ * | kacq, |
const KS_EPI * | epitrain, | ||
const ks_enum_epiblipsign | blipsign, | ||
const int | Ry, | ||
const int | caipi_delta | ||
) |
ADDDESCHERE
STATUS | SUCCESS or FAILURE |
int cfsrmode |
int cfgcoiltype |
int rhkacq_uid |
int ks_plot_filefmt |
int ks_plot_kstmp |
char ks_psdname[256] |
struct _grad_heat_handle grad_heat_handle = {NULL, NULL, 0, NULL} |
int gradHeatMethod |
int enforce_minseqseg |
_cvint _optr |
int minseqcable_t |
int minseqbusbar_t |
int ks_plot_enable = 0 |