Data Structures | |
struct | KSEPI_SEQUENCE |
struct | KSEPI_FLEET_SEQUENCE |
Macros | |
#define | KSEPI_MINHNOVER 8 /* N.B. overscans below about 16-24 should be avoided for long TE */ |
#define | KSEPI_MAXRBW_NORAMPSAMPLING 125.0 |
#define | KSEPI_DEFAULT_SSI_TIME_ICEHARDWARE 100 |
#define | KSEPI_DEFAULT_SSI_TIME 1500 |
#define | KSEPI_INIT_SEQUENCE1 KS_INIT_SEQ_CONTROL, KS_INIT_EPI, KS_INIT_EPI, KS_INIT_TRAP, KS_INIT_SELRF, KS_INIT_SELRF, KS_INIT_SELRF, KS_INIT_TRAP, KS_INIT_TRAP, KS_INIT_WAIT, KS_INIT_WAIT |
#define | KSEPI_INIT_SEQUENCE2 KS_INIT_TRAP, KS_INIT_TRAP, KS_INIT_PHASEENCODING_PLAN, KS_INIT_PHASEENCODING_PLAN, KS_INIT_PHASEENCODING_PLAN, NULL |
#define | KSEPI_INIT_SEQUENCE {KSEPI_INIT_SEQUENCE1, KSEPI_INIT_SEQUENCE2}; |
#define | KSEPI_FLEET_INIT_SEQUENCE {KS_INIT_SEQ_CONTROL, KS_INIT_EPI, KS_INIT_TRAP, KS_INIT_SELRF, KS_INIT_WAIT, KS_INIT_WAIT, KS_INIT_PHASEENCODING_PLAN}; |
#define | MAX_DIFSCHEME_LENGTH 1024 |
Typedefs | |
typedef float | DIFFSCHEME[3][MAX_DIFSCHEME_LENGTH] |
Enumerations | |
enum | KSEPI_MULTISHOT_MODE { KSEPI_MULTISHOT_OFF, KSEPI_MULTISHOT_ALLVOLS, KSEPI_MULTISHOT_1STVOL, KSEPI_MULTISHOT_B0VOLS } |
enum | OFFLINE_DIFFRETURN_MODE { OFFLINE_DIFFRETURN_ALL = 0, OFFLINE_DIFFRETURN_ACQUIRED = 1, OFFLINE_DIFFRETURN_B0 = 2, OFFLINE_DIFFRETURN_MEANDWI = 4, OFFLINE_DIFFRETURN_MEANADC = 8, OFFLINE_DIFFRETURN_EXPATT = 16, OFFLINE_DIFFRETURN_FA = 32, OFFLINE_DIFFRETURN_CFA = 64 } |
Functions | |
STATUS | cvinit (void) |
STATUS | cveval (void) |
STATUS | my_cveval (void) |
STATUS | cvcheck (void) |
STATUS | predownload (void) |
STATUS | pulsegen (void) |
STATUS | mps2 (void) |
STATUS | aps2 (void) |
STATUS | scan (void) |
abstract ("EPI [KSFoundation]") | |
psdname ("ksepi") | |
STATUS | ksepi_eval_flowcomp_phase (KS_TRAP *fcphase, const KS_EPI *epi, const char *desc) |
STATUS | ksepi_pg (int start_time) |
int | ksepi_scan_coreslice (const SCAN_INFO *slice_pos, int dabslice, int shot) |
int | ksepi_scan_coreslice_nargs (const SCAN_INFO *slice_pos, int dabslice, int nargs, void **args) |
int | ksepi_scan_sliceloop (int slperpass, int volindx, int passindx, int shot) |
int | ksepi_scan_sliceloop_nargs (int slperpass, int nargs, void **args) |
STATUS | ksepi_scan_seqstate (SCAN_INFO slice_info, int shot) |
float | ksepi_scan_acqloop (int passindx, int volindx, int multishotflag) |
float | ksepi_scan_scanloop () |
void | ksepi_init_imagingoptions (void) |
STATUS | ksepi_init_UI (void) |
STATUS | ksepi_eval_UI () |
STATUS | ksepi_eval_setuprf_3dexc (KS_SELRF *selrfexc, int rf3Dopt) |
STATUS | ksepi_eval_setuprf () |
STATUS | ksepi_eval_setupfleet () |
STATUS | ksepi_eval_setupobjects () |
STATUS | ksepi_eval_TErange () |
STATUS | ksepi_eval_inversion (KS_SEQ_COLLECTION *seqcollection) |
STATUS | ksepi_eval_tr (KS_SEQ_COLLECTION *seqcollection) |
int | ksepi_eval_ssitime () |
STATUS | ksepi_eval_scantime () |
STATUS | ksepi_check () |
STATUS | ksepi_predownload_plot (KS_SEQ_COLLECTION *seqcollection) |
STATUS | ksepi_predownload_setrecon () |
STATUS | ksepi_pg_fleet (int start_time) |
STATUS | ksepi_fleet_scan_seqstate (const SCAN_INFO *slice_info, int shot) |
void | ksepi_scan_rf_off () |
int | ksepi_fleet_scan_coreslice (const SCAN_INFO *slice_pos, int dabslice, int shot) |
int | ksepi_fleet_scan_sliceloop (int slperpass, int volindx, int passindx) |
STATUS | ksepi_scan_init (void) |
STATUS | ksepi_scan_prescanloop (int nloops, int dda) |
STATUS | ksepi_diffusion_readtensorfile (DIFFSCHEME diffscheme, int nb0, int ndirs) |
float | ksepi_diffusion_getmaxb () |
void | ksepi_diffusion_set_heat_scaling (DIFFSCHEME diffscheme) |
STATUS | ksepi_diffusion_init_UI () |
STATUS | ksepi_diffusion_eval_UI () |
void | SolveCubic (double a, double b, double c, double d, int *nsol, double *x) |
STATUS | ksepi_diffusion_calcTE (double *TE_s, int exciso2end, int crsh1_half180, int half180_crsh2, int crsh3_half180, int half180_crsh4, int readout2echo, int ramptime, float G, int bval_desired, int dualspinechoflag) |
STATUS | ksepi_diffusion_eval_gradients_TE (KSEPI_SEQUENCE *ksepi) |
STATUS | ksepi_diffusion_predownload_setrecon () |
STATUS | ksepi_diffusion_pg (KSEPI_SEQUENCE *ksepi, int TE) |
void | ksepi_diffusion_scan_diffamp (KSEPI_SEQUENCE *ksepi, int volindx) |
Variables | |
KS_SEQ_COLLECTION | seqcollection |
float | ksepi_excthickness = 0 |
float | ksepi_gscalerfexc = 0.9 with {0.1, 3.0, 0.9, VIS, "Excitation slice thk scaling (< 1.0 thicker slice)",} |
int | ksepi_slicecheck = 0 with {0, 1, 0, VIS, "move readout to z axis for slice thickness test",} |
float | ksepi_spoilerarea = 3000.0 with {0.0, 10000.0, 3000.0, VIS, "ksepi ksepi.spoiler gradient area",} |
int | ksepi_rfspoiling = 1 with {0, 1, 1, VIS, "Enable RF spoiling 1:on 0:off",} |
int | ksepi_fse90 = 0 with {0, 1, 0, VIS, "Use FSE90 instead of SPSP for non-fatsat",} |
int | ksepi_rf3Dopt = 0 with {0, 10, 0, VIS, "Choose optimized SPSP pulse for 3D [0:OFF]",} |
float | ksepi_kissoff_factor = 0.04 with {0, 1, 0.04, VIS, "Slice oversampling fraction on each side (3D)",} |
float | ksepi_crusherscale = 1.0 with { -20.0, 20.0, 1.0, VIS, "scaling of crusher gradient area",} |
float | ksepi_gscalerfref = 0.9 with {0.1, 3.0, 0.9, VIS, "Refocusing slice thk scaling (< 1.0 thicker slice)",} |
int | ksepi_rampsampling = 1 with {0, 1, 1, VIS, "Rampsampling [0:OFF 1:ON]",} |
int | ksepi_readlobegap = 0 with {0, 10ms, 0, VIS, "extra gap between readout lobes [us]",} |
int | ksepi_echogap = 0 with {0, 100ms, 0, VIS, "extra gap between EPI echoes [us]",} |
int | ksepi_readsign = 1 with { -1, 1, 1, VIS, "Readout polarity: +1/-1",} |
float | ksepi_readampmax = 3.0 with {0.0, 5.0, 3.0, VIS, "Max grad amp for EPI readout lobes",} |
float | ksepi_sr = 0.01 with {0.0, , 0.01, VIS, "EPI SR: amp/ramp [(G/cm) / us]",} |
int | ksepi_esp = 0 with {0, 1000000, 0, VIS, "View-only: Echo spacing in [us]",} |
int | ksepi_blipsign = KS_EPI_POSBLIPS with {KS_EPI_NEGBLIPS, KS_EPI_POSBLIPS, KS_EPI_POSBLIPS, VIS, "Blip polarity: +1/-1",} |
int | ksepi_echotime_shifting = 1 with {0, 1, 1, VIS, "Enable echo time shifting for multi shot",} |
int | ksepi_kynover = 24 with {KSEPI_MINHNOVER, 512, 24, VIS, "#extralines for MinTE",} |
int | ksepi_kznover = 0 with {0, 512, 0, VIS, "#extralines in kz",} |
int | ksepi_ky_R = 1 with {1, 512, 1, VIS, "Acceleration in ky",} |
int | ksepi_kz_R = 1 with {1, 512, 1, VIS, "Acceleration in kz",} |
int | ksepi_kz_nacslines = 16 with {0, 512, 16, VIS, "Number of acs lines in kz",} |
int | ksepi_caipi = 0 with {0, 512, 0, VIS, "CAIPIRINHA shift (affects 3D epi only. Set 0 for no CAIPI)",} |
int | ksepi_fcy = 1 with {0, 1, 0, VIS, "Flowcomp Y when opfcomp"} |
int | ksepi_fcz = 1 with {0, 1, 0, VIS, "Flowcomp Z when opfcomp"} |
int | ksepi_fleet = 0 with {0, 1, 0, VIS, "FLEET calibration volume [0:OFF 1:ON]",} |
float | ksepi_fleet_flip = 15.0 with {0.1, 90.0, 15.0, VIS, "FLEET flip angle [deg]",} |
int | ksepi_fleet_dda = 0 with {0, 200, 0, VIS, "Dummies for FLEET module",} |
int | ksepi_fleet_num_ky = 36 with {1, 512, 36, VIS, "Number of ky encodes for FLEET module",} |
int | ksepi_fleet_num_kz = 24 with {1, 512, 24, VIS, "Number of kz encodes for FLEET module (3D only)",} |
int | ksepi_reflines = 0 with {0, 96, 0, VIS, "Number of phase reference lines per shot",} |
int | ksepi_swi_returnmode = 0 with {0, 7, 0, VIS, "SWI recon 0:Off 1:Acq 2:SWI 4:SWIphase",} |
int | ksepi_pos_start = KS_RFSSP_PRETIME with {0, , KS_RFSSP_PRETIME, INVIS, "us from start until the first waveform begins",} |
int | ksepi_ssi_time = KSEPI_DEFAULT_SSI_TIME with {32, , KSEPI_DEFAULT_SSI_TIME, VIS, "time from eos to ssi in intern trig",} |
int | ksepi_dda = 1 with {0, 200, 1, VIS, "Number of dummy scans for steady state",} |
int | ksepi_debug = 1 with {0, 100, 1, VIS, "Write out e.g. plot files (unless scan on HW)"} |
int | ksepi_imsize = KS_IMSIZE_POW2 with {KS_IMSIZE_NATIVE, KS_IMSIZE_MIN256, KS_IMSIZE_POW2, VIS, "img. upsamp. [0:native 1:pow2 2:min256]"} |
int | ksepi_abort_on_kserror = FALSE with {0, 1, 0, VIS, "Hard program abort on ks_error [0:OFF 1:ON]",} |
int | ksepi_ghostcorr = 1 with {0, 1, 1, VIS, "Ghost correction [0:OFF 1:ON]",} |
int | ksepi_ref_nsegments = 1 with {1, 512, 1, VIS, "Number of kz segments in reference volume",} |
int | ksepi_multishot_control = KSEPI_MULTISHOT_B0VOLS with {KSEPI_MULTISHOT_OFF, KSEPI_MULTISHOT_B0VOLS, KSEPI_MULTISHOT_B0VOLS, VIS, "0:PI 1:All MulShot 2:1stMulShot 3:b0MulShot",} |
float | ksepi_epiqfact = 1.0 with {1.0, 10.0, 1.0, VIS, "Quetness factor for the EPI readout only",} |
KSEPI_SEQUENCE | ksepi = KSEPI_INIT_SEQUENCE |
KSEPI_FLEET_SEQUENCE | ksepi_fleetseq = KSEPI_FLEET_INIT_SEQUENCE |
int | ksepi_interechotime = 0 |
float | ksepi_echotime_shifting_shotdelay = 0 |
int | ksepi_echotime_shifting_sumdelay = 0 |
int | sequence_iopts [] |
int | rfspoiling_phase_counter = 0 |
int | ksepi_diffusion_ramptime = 1500 with {300, 30ms, 1500, VIS, "Ramp times for diffusion gradients", } |
float | ksepi_diffusion_maxamp = 0.0 with {0.0, 7.0, 3.0, VIS, "Cap for diffusion gradient amplitude", } |
float | ksepi_diffusion_amp = 0.0 with {0.0, 7.0, 0.0, VIS, "View-only: Current diffusion gradient amplitude", } |
int | ksepi_diffusion_heat_avg = 1 with {0, 1, 1, VIS, "Root mean sqared averaging diffusion amplitudes heat calculations", } |
float | ksepi_diffusion_scaleX_heatcal = 1 with {0, 1, 1, VIS, "View-only: x diffusion gradient amplitude for heating calculations", } |
float | ksepi_diffusion_scaleY_heatcal = 1 with {0, 1, 1, VIS, "View-only: y diffusion gradient amplitude for heating calculations", } |
float | ksepi_diffusion_scaleZ_heatcal = 1 with {0, 1, 1, VIS, "View-only: z diffusion gradient amplitude for heating calculations", } |
int | ksepi_diffusion_echotime = 0 with {0, , 0, VIS, "View-only: Echo time necessary to meet the desired b-value", } |
float | ksepi_diffusion_2ndcrushfact = 2.0 with {0.1, 10.0, 2.0, VIS, "Scale factor for 2nd crusher for opdualspinecho",} |
int | ksepi_diffusion_returnmode = OFFLINE_DIFFRETURN_ALL with {OFFLINE_DIFFRETURN_ALL, 128, OFFLINE_DIFFRETURN_ALL, VIS, "Diff maps All:0 Acq:1 b0:2 DWI:4 ADC:8 Exp:16 FA:32 cFA:64",} |
DIFFSCHEME | diffscheme |
int | ndiffdirs = 6 |
MR-contrasts supported
Features
#define KSEPI_MINHNOVER 8 /* N.B. overscans below about 16-24 should be avoided for long TE */ |
#define KSEPI_MAXRBW_NORAMPSAMPLING 125.0 |
#define KSEPI_DEFAULT_SSI_TIME_ICEHARDWARE 100 |
#define KSEPI_DEFAULT_SSI_TIME 1500 |
#define KSEPI_INIT_SEQUENCE1 KS_INIT_SEQ_CONTROL, KS_INIT_EPI, KS_INIT_EPI, KS_INIT_TRAP, KS_INIT_SELRF, KS_INIT_SELRF, KS_INIT_SELRF, KS_INIT_TRAP, KS_INIT_TRAP, KS_INIT_WAIT, KS_INIT_WAIT |
#define KSEPI_INIT_SEQUENCE2 KS_INIT_TRAP, KS_INIT_TRAP, KS_INIT_PHASEENCODING_PLAN, KS_INIT_PHASEENCODING_PLAN, KS_INIT_PHASEENCODING_PLAN, NULL |
#define KSEPI_INIT_SEQUENCE {KSEPI_INIT_SEQUENCE1, KSEPI_INIT_SEQUENCE2}; |
#define KSEPI_FLEET_INIT_SEQUENCE {KS_INIT_SEQ_CONTROL, KS_INIT_EPI, KS_INIT_TRAP, KS_INIT_SELRF, KS_INIT_WAIT, KS_INIT_WAIT, KS_INIT_PHASEENCODING_PLAN}; |
#define MAX_DIFSCHEME_LENGTH 1024 |
typedef float DIFFSCHEME[3][MAX_DIFSCHEME_LENGTH] |
enum KSEPI_MULTISHOT_MODE |
Enumerator | |
---|---|
KSEPI_MULTISHOT_OFF | |
KSEPI_MULTISHOT_ALLVOLS | |
KSEPI_MULTISHOT_1STVOL | |
KSEPI_MULTISHOT_B0VOLS |
STATUS cvinit | ( | void | ) |
STATUS cveval | ( | void | ) |
STATUS my_cveval | ( | void | ) |
STATUS cvcheck | ( | void | ) |
STATUS predownload | ( | void | ) |
STATUS pulsegen | ( | void | ) |
STATUS mps2 | ( | void | ) |
STATUS aps2 | ( | void | ) |
STATUS scan | ( | void | ) |
abstract | ( | "EPI " | [KSFoundation] | ) |
psdname | ( | "ksepi" | ) |
STATUS ksepi_pg | ( | int | start_time | ) |
This is the main pulse sequence in ksepi.e using the sequence objects in KSEPI_SEQUENCE with the sequence module name "ksepimain" (= ksepi.seqctrl.description)
STATUS | SUCCESS or FAILURE |
int ksepi_scan_coreslice | ( | const SCAN_INFO * | slice_pos, |
int | dabslice, | ||
int | shot | ||
) |
On TGT on the MR system (PSD_HW), this function sets up (ksepi_scan_seqstate()) and plays out the core ksepi sequence with optional sequence modules also called in this function. The low-level function call startseq()
, which actually starts the realtime sequence playout is called from within ks_scan_playsequence(), which in addition also returns the time to play out that sequence module (see time += ...).
On HOST (in ksepi_eval_tr()) we call ksepi_scan_sliceloop_nargs(), which in turn calls this function that returns the total time in [us] taken to play out this core slice. These times are increasing in each parent function until ultimately ksepi_scan_scantime(), which returns the total time of the entire scan.
After each call to ks_scan_playsequence(), ks_plot_slicetime() is called to add slice-timing information on file for later PDF-generation of the sequence. As scanning is performed in real-time and may fail if interrupted, ks_plot_slicetime() will return quietly if it detects both IPG (TGT) and PSD_HW (on the MR scanner). See predownload() for the PNG/PDF generation.
[in] | slice_pos | Position of the slice to be played out (one element in the global ks_scan_info[] array) |
[in] | dabslice | 0-based slice index for data storage |
[in] | shot | Linear ky kz shot index in range [0, (ksepi.peplan.num_shots-1)] |
coreslicetime | Time taken in [us] to play out one slice with potentially other sequence modules |
int ksepi_scan_coreslice_nargs | ( | const SCAN_INFO * | slice_pos, |
int | dabslice, | ||
int | nargs, | ||
void ** | args | ||
) |
KSInversion.e has functions (ksinv_eval_multislice(), ksinv_eval_checkTR_SAR() and ksinv_scan_sliceloop()) that expect a standardized function pointer to the coreslice function of a main sequence. When inversion mode is enabled for the sequence, ksinv_scan_sliceloop() is used instead of ksepi_scan_sliceloop() in ksepi_scan_acqloop(), and the generic ksinv_scan_sliceloop() function need a handle to the coreslice function of the main sequence.
In order for these ksinv_***
functions to work for any pulse sequence they need a standardized function pointer with a fixed set of input arguments. As different pulse sequences may need different number of input arguments (with different meaning) this ksepi_scan_coreslice_nargs() wrapper function provides the argument translation for ksepi_scan_coreslice().
The function pointer must have SCAN_INFO and slice storage index (dabslice) as the first two input args, while remaining input arguments (to ksepi_scan_coreslice()) are stored in the generic void pointer array with nargs
elements, which is then unpacked before calling ksepi_scan_coreslice().
[in] | slice_pos | Pointer to the SCAN_INFO struct corresponding to the current slice to be played out |
[in] | dabslice | 0-based slice index for data storage |
[in] | nargs | Number of extra input arguments to ksepi_scan_coreslice() in range [0,2] |
[in] | args | Void pointer array pointing to the variables containing the actual values needed for ksepi_scan_coreslice() |
coreslicetime | Time taken in [us] to play out one slice with potentially other sequence modules |
int ksepi_scan_sliceloop | ( | int | slperpass, |
int | volindx, | ||
int | passindx, | ||
int | shot | ||
) |
slperpass
slices corresponding to one TRThis function gets a spatial slice location index based on the pass index and temporal position within current pass. It then calls ksepi_scan_coreslice() to play out one coreslice (i.e. the main ksepi main sequence + optional sequence modules, excluding inversion modules).
[in] | slperpass | Number of slices to play in the slice loop |
[in] | volindx | Volume index in range [0, opfphases - 1] |
[in] | passindx | Pass index in range [0, ks_slice_plan.npasses - 1] |
[in] | shot | Linear ky kz shot index in range [0, (ksepi.peplan.num_shots-1)] |
slicelooptime | Time taken in [us] to play out slperpass slices |
int ksepi_scan_sliceloop_nargs | ( | int | slperpass, |
int | nargs, | ||
void ** | args | ||
) |
For TR timing heat/SAR calculations of regular 2D multislice sequences, GEReq_eval_TR(), ks_eval_mintr() and GEReq_eval_checkTR_SAR() use a standardized function pointer with a fixed set of input arguments to call the sliceloop of the main sequence with different number of slices to check current slice loop duration. As different pulse sequences may need different number of input arguments (with different meaning) this ksepi_scan_sliceloop_nargs() wrapper function provides the argument translation for ksepi_scan_sliceloop().
The function pointer must have an integer corresponding to the number of slices to use as its first argument while the remaining input arguments (to ksepi_scan_sliceloop()) are stored in the generic void pointer array with nargs
elements, which is then unpacked before calling ksepi_scan_sliceloop().
[in] | slperpass | Number of slices to play in the slice loop |
[in] | nargs | Number of extra input arguments to ksepi_scan_sliceloop() in range [0,3] |
[in] | args | Void pointer array pointing to the variables containing the actual values needed for ksepi_scan_sliceloop() |
slicelooptime | Time taken in [us] to play out slperpass slices |
STATUS ksepi_scan_seqstate | ( | SCAN_INFO | slice_info, |
int | shot | ||
) |
This function sets the current state of all ksepi sequence objects being part of KSEPI_SEQUENCE, incl. gradient amplitude changes, RF freq/phases and receive freq/phase based on current slice position and phase encoding indices.
The idea of having a 'seqstate' function is to be able to come back to a certain sequence state at any time and possibly play it out once more. This could for example be useful when certain lines or slices need to be rescanned due to image artifacts detected during scanning.
[in] | slice_info | Position of the slice to be played out (one element in the ks_scan_info[] array) |
[in] | shot | Linear ky kz shot index in range [0, (ksepi.peplan.num_shots-1)] |
STATUS | SUCCESS or FAILURE |
float ksepi_scan_acqloop | ( | int | passindx, |
int | volindx, | ||
int | multishotflag | ||
) |
This function traverses through all shots (ksepi_numshots
) to be played out and runs the ksepi_scan_sliceloop() for each set of shots and excitation. If ksepi_dda > 0, dummy scans will be played out before the phase encoding begins.
In the case of inversion, ksinv_scan_sliceloop() is called instead of ksepi_scan_sliceloop(), where the former takes a function pointer to ksepi_scan_coreslice_nargs() in order to be able to play out the coreslice in a timing scheme set by ksinv_scan_sliceloop().
[in] | passindx | 0-based pass index in range [0, ks_slice_plan.npasses - 1] |
[in] | volindx | 0-based image volume index in range [0, opfphases - 1] |
[in] | multishotflag | ksepi.epitrain.blipphaser.R is used as... 0: Parallel imaging factor 1: Multi-shot (all volumes, KSEPI_MULTISHOT_ON) 2: Multi-shot (multishot vol 1 (volindx=0), PI for vols 2-N, KSEPI_MULTISHOT_ON_VOL1) 3: Multi-shot (multishot for b0 volumes), PI for diffusion volumes (only when opdiffuse > 0) |
passlooptime | Time taken in [us] to play out all phase encodes and excitations for slperpass slices. Note that the value is a float instead of int to avoid int overrange at 38 mins of scanning |
float ksepi_scan_scanloop | ( | ) |
This function performs the entire scan and traverses through passes and volumes. For each passindx
(in range [0, ks_slice_plan.npasses-1]
), and volindx
, ksepi_scan_acqloop() will be called to acquire all data for the current set of slices belong to the current pass (acquisition).
scantime | Total scan time in [us] (float to avoid int overrange after 38 mins) |
void ksepi_init_imagingoptions | ( | void | ) |
STATUS ksepi_init_UI | ( | void | ) |
STATUS | SUCCESS or FAILURE |
STATUS ksepi_eval_UI | ( | ) |
STATUS | SUCCESS or FAILURE |
STATUS ksepi_eval_setuprf_3dexc | ( | KS_SELRF * | selrfexc, |
int | rf3Dopt | ||
) |
STATUS ksepi_eval_setuprf | ( | ) |
STATUS ksepi_eval_setupfleet | ( | ) |
STATUS ksepi_eval_setupobjects | ( | ) |
STATUS | SUCCESS or FAILURE |
STATUS ksepi_eval_TErange | ( | ) |
This function handles the TE range for SE-EPI, GE-EPI and DW-EPI (opdiffuse).
Multiple EPI trains (opnecho > 1) are supported Time between the EPI readouts is controlled using ksepi_echogap
, yielding a ksepi_interechotime
variable used in ksepi_pg().
N.B.: The minTE (avminte) and maxTE (avmaxte) ensures TE (opte) to be in the valid range for this pulse sequence to be set up in ksepi_pg(). If the pulse sequence design changes in ksepi_pg(), by adding/modifying/removing sequence objects in a way that affects the intended TE, this function needs to be updated too.
STATUS | SUCCESS or FAILURE |
STATUS ksepi_eval_inversion | ( | KS_SEQ_COLLECTION * | seqcollection | ) |
It is important that ksepi_eval_inversion() is called after other sequence modules have been set up and added to the KS_SEQ_COLLECTION struct in my_cveval(). Otherwise the TI and TR timing will be wrong.
Whether IR is on or off is determined by ksinv1_mode, which is set up in KSINV_EVAL()->ksinv_eval(). If it is off, this function will return quietly.
This function calls ksinv_eval_multislice() (KSInversion.e), which takes over the responsibility of TR timing that otherwise is determined in ksepi_eval_tr(). ksinv_eval_multislice() sets seqcollection.evaltrdone = TRUE, which indicates that TR timing has been done. ksepi_eval_tr() checks whether seqcollection.evaltrdone = TRUE to avoid that non-inversion TR timing overrides the TR timing set up in ksinv_eval_multislice().
At the end of this function, TR validation and heat/SAR checks are done.
[in,out] | seqcollection | Pointer to the KS_SEQ_COLLECTION struct holding all sequence modules |
STATUS | SUCCESS or FAILURE |
STATUS ksepi_eval_tr | ( | KS_SEQ_COLLECTION * | seqcollection | ) |
With the current sequence collection (see my_cveval()), and a function pointer to an argument-standardized wrapper function (ksepi_scan_sliceloop_nargs()) to the slice loop function (ksepi_scan_sliceloop(), this function calls GEReq_eval_TR(), where number of slices that can fit within one TR is determined by adding more slices as input argument to the slice loop function. For more details see GEReq_eval_TR().
With the number of slices/TR now known, a standard 2D slice plan is set up using ks_calc_sliceplan() and the duration of the main sequence is increased based on timetoadd_perTR, which was returned by GEReq_eval_TR(). timetoadd_perTR > 0 when optr > avmintr and when heat or SAR restrictions requires avmintr
to be larger than the net sum of sequence modules in the slice loop.
This function first checks whether seqcollection.evaltrdone == TRUE. This is e.g. the case for inversion where the TR timing instead is controlled using ksepi_eval_inversion() (calling ksinv_eval_multislice()).
At the end of this function, TR validation and heat/SAR checks are done using GEReq_eval_checkTR_SAR().
[in] | seqcollection | Pointer to the KS_SEQ_COLLECTION struct holding all sequence modules |
STATUS | SUCCESS or FAILURE |
int ksepi_eval_ssitime | ( | ) |
int | SSI time in [us] |
STATUS ksepi_eval_scantime | ( | ) |
After setting the number of dummy scans based on the current TR, the ksepi_scan_scanloop() is called to get the scan time. pitscan
is the UI variable for the scan clock shown in the top right corner on the MR scanner.
STATUS | SUCCESS or FAILURE |
STATUS ksepi_check | ( | ) |
STATUS | SUCCESS or FAILURE |
STATUS ksepi_predownload_plot | ( | KS_SEQ_COLLECTION * | seqcollection | ) |
The ks_plot_*** functions used in here will save plots to disk depending on the value of the CV ks_plot_filefmt
(see KS_PLOT_FILEFORMATS). E.g. if ks_plot_filefmt = KS_PLOT_OFF, nothing will be written to disk. On the MR scanner, the output will be located in /usr/g/mrraw/plot/<ks_psdname>. In simulation, it will be placed in the current directory (./plot/).
Please see the documentation on how to install the required python version and links. Specifically, there must be a link /usr/local/bin/apython pointing to the Anaconda 2 python binary (v. 2.7).
In addition, the following text files are printed out
SUCCESS
or FAILURE
STATUS ksepi_predownload_setrecon | ( | ) |
For most cases, the GEReq_predownload_*** functions in predownload() in ksepi.e set up the necessary rh*** variables for the reconstruction to work properly. However, if this sequence is customized, certain rh*** variables may need to be changed. Doing this here instead of in predownload() directly separates these changes from the standard behavior.
STATUS | SUCCESS or FAILURE |
STATUS ksepi_pg_fleet | ( | int | start_time | ) |
This is the fleet pulse sequence in ksepi.e using the sequence objects in KSEPI_FLEET_SEQUENCE with the sequence module name "ksepifleet" (= ksepi_fleet.seqctrl.description)
STATUS | SUCCESS or FAILURE |
STATUS ksepi_fleet_scan_seqstate | ( | const SCAN_INFO * | slice_info, |
int | shot | ||
) |
void ksepi_scan_rf_off | ( | ) |
int ksepi_fleet_scan_coreslice | ( | const SCAN_INFO * | slice_pos, |
int | dabslice, | ||
int | shot | ||
) |
int ksepi_fleet_scan_sliceloop | ( | int | slperpass, |
int | volindx, | ||
int | passindx | ||
) |
STATUS ksepi_scan_init | ( | void | ) |
STATUS | SUCCESS or FAILURE |
STATUS ksepi_scan_prescanloop | ( | int | nloops, |
int | dda | ||
) |
STATUS | SUCCESS or FAILURE |
STATUS ksepi_diffusion_readtensorfile | ( | DIFFSCHEME | diffscheme, |
int | nb0, | ||
int | ndirs | ||
) |
float ksepi_diffusion_getmaxb | ( | ) |
void ksepi_diffusion_set_heat_scaling | ( | DIFFSCHEME | diffscheme | ) |
STATUS ksepi_diffusion_init_UI | ( | ) |
STATUS ksepi_diffusion_eval_UI | ( | ) |
void SolveCubic | ( | double | a, |
double | b, | ||
double | c, | ||
double | d, | ||
int * | nsol, | ||
double * | x | ||
) |
STATUS ksepi_diffusion_calcTE | ( | double * | TE_s, |
int | exciso2end, | ||
int | crsh1_half180, | ||
int | half180_crsh2, | ||
int | crsh3_half180, | ||
int | half180_crsh4, | ||
int | readout2echo, | ||
int | ramptime, | ||
float | G, | ||
int | bval_desired, | ||
int | dualspinechoflag | ||
) |