KSFoundation  [October2024]
A platform for structured EPIC programming on GE MR systems
ksscan.cc File Reference
#include <ksscan.h>

Functions

int GEReq_endofpass ()
 
void ksscan_init_loopcontrol (KSSCAN_LOOP_CONTROL *loop_control)
 
void ksscan_init_slicetiming (KS_SLICETIMING *slicetiming)
 
STATUS ksscan_phaseencoding_plan_eval_design (KS_PHASEENCODING_PLAN *pe_plan, const KS_PHASEENCODING_PLAN_DESIGN *design)
 
STATUS ksscan_validate_slicetimingdesign (const KS_SLICETIMING_DESIGN *design)
 
STATUS ksscan_loop_control_eval_design (KSSCAN_LOOP_CONTROL *loop_control, KS_SEQ_CONTROL *sequence_to_inflate, KS_CORESLICETIME coreslice(const SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic), const KSSCAN_LOOP_CONTROL_DESIGN *design)
 
s64 _play_loop (int nslices, KS_CORESLICETIME coreslice(const SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic))
 
int _maxslicespertr (int TR, KS_CORESLICETIME coreslice(const SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic))
 
STATUS ksscan_slicetiming_eval_design (KS_SLICETIMING *slicetiming, KS_SEQ_CONTROL *sequence_to_inflate, KS_CORESLICETIME coreslice(const SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic), const KS_SLICETIMING_DESIGN *slicetiming_design)
 
void ksscan_copy_slices (KS_SLICETIMING_DESIGN *slicetiming_design, const SCAN_INFO *scan_info)
 
STATUS ksscan_eval_setup_rf_slices (KS_SLICETIMING *slicetiming, const KS_SLICETIMING_DESIGN *slicetiming_design, int is2D)
 
void ks_plot_psd (const KS_SEQ_CONTROL *ctrl, const KSSCAN_LOOP_CONTROL *loopctrl)
 
s64 ksscan_sliceloop (const KSSCAN_LOOP_CONTROL *loop_control, KS_DYNAMIC_STATE *dynamic, KS_CORESLICETIME coreslice(const SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic))
 
s64 ksscan_acqloop (const KSSCAN_LOOP_CONTROL *loop_control, KS_DYNAMIC_STATE *dynamic, KS_CORESLICETIME coreslice(const SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic))
 
void ksscan_plotloop_shots (const KSSCAN_LOOP_CONTROL *loop_control, KS_CORESLICETIME coreslice(const SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic))
 
void ksscan_plotloop_slices (const KSSCAN_LOOP_CONTROL *loop_control, KS_CORESLICETIME coreslice(const SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic))
 
s64 ksscan_scanloop (const KSSCAN_LOOP_CONTROL *orig_loop_control, KS_DYNAMIC_STATE *dynamic, KS_CORESLICETIME coreslice(const SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic))
 
void ksscan_prescanloop (const KSSCAN_LOOP_CONTROL *loop_control, KS_CORESLICETIME coreslice(const SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic), int nloops, int dda)
 

Function Documentation

◆ GEReq_endofpass()

int GEReq_endofpass ( )

Sets SSP word in sequence off_GEpass() to trigger data (Pfile) writing and reconstruction

After calling this function, the parent function must switch back to the previous/main sequence using ks_scan_playsequence() (or boffset()).

3621  {
3622 #ifdef IPG
3623  boffset(off_GEpass);
3624  setwamp(SSPD + DABPASS, &GEendpass, 2 ); /* end of pass */
3625  startseq(0, (short) MAY_PAUSE);
3626 #else
3627  /* HOST */
3629 
3630  KS_DESCRIPTION slicegroup_desc;
3631  sprintf(slicegroup_desc, "endofpass");
3633 
3635 #endif
3636  return pw_passpacket;
3637 
3638 } /* GEReq_endofpass() */
STATUS startseq(s16, s16)
#define KS_NOTSET
Definition: KSFoundation.h:115
STATUS boffset(long *offsets)
KS_SEQ_CONTROL seqctrl_passpack
Definition: GERequired.e:248
int nseqinstances
Definition: KSFoundation.h:1225
Definition: KSFoundation.h:403
int pw_passpacket
Definition: GERequired.e:266
void ks_plot_slicetime_endofslicegroup_tagged(const char *desc, const KS_PLOT_SLICEGROUP_MODE tag)
ADDTITLEHERE
Definition: KSFoundation_common.c:4296
Definition: KSFoundation.h:414
void ks_plot_slicetime(const KS_SEQ_CONTROL *ctrl, int nslices, float *slicepos_mm, float slthick_mm, KS_PLOT_EXCITATION_MODE exctype)
ADDTITLEHERE
Definition: KSFoundation_common.c:4276
char KS_DESCRIPTION[KS_DESCRIPTION_LENGTH]
Definition: KSFoundation.h:351

◆ _play_loop()

s64 _play_loop ( int  nslices,
KS_CORESLICETIME   coresliceconst SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic 
)
152  {
153  KS_DYNAMIC_STATE dynamic = KS_INIT_DYNAMIC_STATE;
155  loop_control.slicetiming.slice_plan.nslices_per_pass = nslices;
156 
157  return ksscan_sliceloop(&loop_control, &dynamic, coreslice);
158 
159 } /* _play_loop() */
KS_SLICETIMING slicetiming
Definition: ksscan.h:192
int nslices_per_pass
Definition: KSFoundation.h:1320
#define KS_INIT_DYNAMIC_STATE
Definition: KSFoundation.h:1829
s64 ksscan_sliceloop(const KSSCAN_LOOP_CONTROL *loop_control, KS_DYNAMIC_STATE *dynamic, KS_CORESLICETIME coreslice(const SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic))
Executes all loops for a single TR
Definition: ksscan.cc:458
Structure containing all the information to perform a standard scan loop
Definition: ksscan.h:184
#define KSSCAN_INIT_LOOP_CONTROL
Definition: ksscan.h:195
KS_SLICE_PLAN slice_plan
Definition: ksscan.h:42

◆ _maxslicespertr()

int _maxslicespertr ( int  TR,
KS_CORESLICETIME   coresliceconst SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic 
)
164  {
165  KS_DYNAMIC_STATE dynamic = KS_INIT_DYNAMIC_STATE;
167 
168  int i = 1;
169  for (; i < 1024; i++) {
170  loop_control.slicetiming.slice_plan.nslices_per_pass = i;
171  int acqtime = ksscan_sliceloop(&loop_control, &dynamic, coreslice);
172  if (acqtime > TR || acqtime < 0) {
173  break;
174  }
175  }
176 
177  return i-1;
178 
179 } /* _maxslicespertr() */
KS_SLICETIMING slicetiming
Definition: ksscan.h:192
int32_t i
Definition: KSFoundation_tgt.c:1694
int nslices_per_pass
Definition: KSFoundation.h:1320
#define KS_INIT_DYNAMIC_STATE
Definition: KSFoundation.h:1829
s64 ksscan_sliceloop(const KSSCAN_LOOP_CONTROL *loop_control, KS_DYNAMIC_STATE *dynamic, KS_CORESLICETIME coreslice(const SCAN_INFO *slice_pos, KS_DYNAMIC_STATE *dynamic))
Executes all loops for a single TR
Definition: ksscan.cc:458
Structure containing all the information to perform a standard scan loop
Definition: ksscan.h:184
#define KSSCAN_INIT_LOOP_CONTROL
Definition: ksscan.h:195
KS_SLICE_PLAN slice_plan
Definition: ksscan.h:42