#include <sys/stat.h>
#include <sys/types.h>
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_dixon_asymreadwave (KS_DIXON_ASYMREADWAVE *asymreadwave) |
void | ks_init_dixon_dualreadtrap (KS_DIXON_DUALREADTRAP *dual_readtrap) |
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) |
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 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_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_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) |
int | ks_eval_kynover_fromnex (int yres, float nex, 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, int res, int duration, KS_WAVEFORM newwave) |
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_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) |
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_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, const SCAN_INFO *org_slice_positions, int nslices, float slthick, float slspace) |
float | ks_eval_sms_calc_caipi_area (int caipi_fov_shift, float sms_slice_gap) |
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_trap2wave (KS_WAVE *wave, const KS_TRAP *trap) |
STATUS | ks_eval_append_two_waves (KS_WAVE *first_wave, KS_WAVE *second_wave) |
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) |
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) |
int | ks_eval_gradrflimits (KS_SAR *sar, KS_SEQ_COLLECTION *seqcollection, float gheatfact) |
int | ks_eval_mintr (int nslices, KS_SEQ_COLLECTION *seqcollection, float gheatfact, int(*play_loop)(int, int, void **), int nargs, void **args) |
int | ks_eval_maxslicespertr (int TR, KS_SEQ_COLLECTION *seqcollection, float gheatfact, int(*play_loop)(int, int, void **), int nargs, void **args) |
void | ks_eval_seqcollection_resetninst (KS_SEQ_COLLECTION *seqcollection) |
int | ks_eval_seqcollection_gettotalduration (KS_SEQ_COLLECTION *seqcollection) |
int | ks_eval_seqcollection_gettotalminduration (KS_SEQ_COLLECTION *seqcollection) |
STATUS | ks_eval_seqcollection2rfpulse (RF_PULSE *rfpulse, KS_SEQ_COLLECTION *seqcollection) |
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) |
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) |
int | ks_calc_dixon_times_within_one_period (float t1, float t2, float B0) |
float | ks_calc_dixon_fat_nsa_2p (float t1, float t2, float B0, float F) |
float | ks_calc_dixon_water_nsa_2p (float t1, float t2, float B0, float W) |
double | ks_calc_dixon_cond_2p (double t1, double t2, double B0) |
float | ks_calc_dixon_mean_nsa_2p_ss_weighted (float t1, float t2, float B0, float w1, float w2) |
float | ks_calc_dixon_mean_nsa_2p_ss (float t1, float t2, float B0) |
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) |
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) |
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_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) |
int | ks_eval_clear_readwave (KS_READWAVE *readwave) |
int | ks_eval_clear_dualreadtrap (KS_DIXON_DUALREADTRAP *dual_read) |
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 (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 (KS_SEQ_COLLECTION *seqcollection, KS_PHASEENCODING_PLAN *plan) |
void | ks_plot_host_seqctrl (KS_SEQ_CONTROL *ctrl, KS_PHASEENCODING_PLAN *plan) |
void | ks_plot_host_seqctrl_manyplans (KS_SEQ_CONTROL *ctrl, KS_PHASEENCODING_PLAN **plans, const int num_plans) |
Variables | |
int | cfswgut |
int | cfswrfut |
int | cfsrmode |
int | cfgcoiltype |
float | GAM |
int | rhkacq_uid |
int | ks_plot_filefmt |
int | ks_plot_kstmp |
char | ks_psdname [256] |
int | gradHeatMethod |
int | gradDCsafeMethod |
int | minseqcable_t |
int | minseqbusbar_t |
This file contains functions only accessible on HOST.
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_dixon_asymreadwave | ( | KS_DIXON_ASYMREADWAVE * | asymreadwave | ) |
[in,out] | asymreadwave | Pointer to KS_DIXON_ASYMREADWAVE |
void ks_init_dixon_dualreadtrap | ( | KS_DIXON_DUALREADTRAP * | dual_readtrap | ) |
[in,out] | dual_readtrap | Pointer to KS_DIXON_DUALREADTRAP |
void ks_init_readwave | ( | KS_READWAVE * | 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) |
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 | 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] | 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_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_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 | ||
) |
int ks_eval_kynover_fromnex | ( | int | yres, |
float | nex, | ||
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, | ||
int | res, | ||
int | duration, | ||
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).#pragma endregion 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_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 | ||
) |
Sets up a KS_RF object with a rectangular (hard) pulse of a given duration.
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 | ||
) |
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 |
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_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 | ||
) |
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 | ||
) |
[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, |
const SCAN_INFO * | org_slice_positions, | ||
int | nslices, | ||
float | slthick, | ||
float | slspace | ||
) |
[in] | sms_multiband_factor | The multi-band acceleration factor |
[in] | org_slice_positions | SCAN_INFO struct holding the original slice information |
[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_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_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 | ||
) |
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 |
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_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 |
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_gradrflimits()), 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 |
int ks_eval_gradrflimits | ( | KS_SAR * | sar, |
KS_SEQ_COLLECTION * | seqcollection, | ||
float | gheatfact | ||
) |
This function uses one KS_SEQ_COLLECTION struct holding the RF and gradient information 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_gradrflimits() 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 |
[in] | gheatfact | Experimental fudge factor in range [0.0, 1.0] to control how much to obey the gradient heating calculations using the old gradient heating model. It is up to the EPIC programmer to set this to a proper value for now. This input argument can hopefully be removed in the future |
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_mintr | ( | int | nslices, |
KS_SEQ_COLLECTION * | seqcollection, | ||
float | gheatfact, | ||
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:
.nseqinstances
field to 0 for all KS_SEQ_CONTROL structs being a part of the KS_SEQ_COLLECTION using ks_eval_seqcollection_resetninst().nseqinstances
field for each sequence module equal to the number of playouts of that sequence module in the slice loop.nseqinstances
and .duration
fields of each sequence module to determine the total net duration for the given number of slicesThe return value of ks_eval_gradrflimits() is also the return value of ks_eval_mintr()
[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] | gheatfact | Experimental fudge factor in range [0.0, 1.0] to control how much to obey the gradient heating calculations using the old gradient heating model. It is up to the EPIC programmer to set this to a proper value for now. This input argument can hopefully be removed in the future |
[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, | ||
float | gheatfact, | ||
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] | gheatfact | Experimental fudge factor in range [0.0, 1.0] to control how much to obey the gradient heating calculations using the old gradient heating model. It is up to the EPIC programmer to set this to a proper value for now. This input argument can hopefully be removed in the future |
[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() |
int 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_gradrflimits() for more details.
[in] | seqcollection | Collection of all sequence modules (KS_SEQ_COLLECTION). C.f. ks_eval_addtoseqcollection() |
int | Time in [us] |
int 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_gradrflimits() 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_gradrflimits() 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_gradrflimits())
[out] | rfpulse | Pointer to rfpulse[] array |
[in] | seqcollection | Pointer to the sequence collection struct for the sequence |
STATUS | SUCCESS or FAILURE |
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 |
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 | ) |
float ks_calc_higher_rbw | ( | float | rbw | ) |
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] |
Given a maximum allowed gradient amplitude in [G/cm] and a readout FOV in [mm], the largest rBW time (i.e. smallest dwell time) in [us] is calculated.
[in] | ampmax | The maximum allowed gradient amplitude ([G/cm]) |
[in] | fov | FOV in the readout direction |
rbw | Receiver bandwidth 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] |
int ks_calc_dixon_times_within_one_period | ( | float | t1, |
float | t2, | ||
float | B0 | ||
) |
float ks_calc_dixon_fat_nsa_2p | ( | float | t1, |
float | t2, | ||
float | B0, | ||
float | F | ||
) |
float ks_calc_dixon_water_nsa_2p | ( | float | t1, |
float | t2, | ||
float | B0, | ||
float | W | ||
) |
double ks_calc_dixon_cond_2p | ( | double | t1, |
double | t2, | ||
double | B0 | ||
) |
float ks_calc_dixon_mean_nsa_2p_ss_weighted | ( | float | t1, |
float | t2, | ||
float | B0, | ||
float | w1, | ||
float | w2 | ||
) |
float ks_calc_dixon_mean_nsa_2p_ss | ( | float | t1, |
float | t2, | ||
float | B0 | ||
) |
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 |
int ks_calc_sms_min_gap | ( | DATA_ACQ_ORDER * | dacq, |
int | nslices | ||
) |
[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) |
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_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 ) |
int ks_eval_clear_readwave | ( | KS_READWAVE * | readwave | ) |
int ks_eval_clear_dualreadtrap | ( | KS_DIXON_DUALREADTRAP * | dual_read | ) |
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 | ( | 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 | ( | KS_SEQ_COLLECTION * | seqcollection, |
KS_PHASEENCODING_PLAN * | plan | ||
) |
void ks_plot_host_seqctrl | ( | KS_SEQ_CONTROL * | ctrl, |
KS_PHASEENCODING_PLAN * | plan | ||
) |
void ks_plot_host_seqctrl_manyplans | ( | KS_SEQ_CONTROL * | ctrl, |
KS_PHASEENCODING_PLAN ** | plans, | ||
const int | num_plans | ||
) |
int cfswgut |
int cfswrfut |
int cfsrmode |
int cfgcoiltype |
float GAM |
int rhkacq_uid |
int ks_plot_filefmt |
int ks_plot_kstmp |
char ks_psdname[256] |
int gradHeatMethod |
int gradDCsafeMethod |
int minseqcable_t |
int minseqbusbar_t |