-
Notifications
You must be signed in to change notification settings - Fork 1
/
control.js
472 lines (369 loc) · 19.2 KB
/
control.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
/*
================== qMRLab vfa_t1 pulse sequence =
This is the controller script which is responsible for
passing the variables between the GUI (control.ui) and
RTHawk's sequencing engine.
Waveforms exported by SpinBench and described by application.apd
determine the initial state of the sequence. For this
application, initial parameters are fetched from:
- [excitation] SincRF + Z (SlabSelect.spv)
- [echodelay] in us, to be exposed to GUI. (Not linked to a file)
- [readout] 3D Cartesian Readout (CartesianReadout3D.spv)
- [spoiler] Area Trapezoid (SpoilerGradient.spv)
Author: Agah Karakuzu [email protected]
Created: October, 2019.
// =================================================
*/
// Get sequence ID
var sequenceId = rth.sequenceId();
// Fetch initial parameters described in CartesianReadout3D.spv
var xPixels = SB.readout["<Cartesian Readout>.xRes"]; // Number of samples, no need for this, acquisition emits this.
var phaseEncodes = SB.readout["<Cartesian Readout>.yRes"]; // Number of repeats
var zPartitions = SB.readout["<Phase Encode Gradient>.res"]; // Number of partitions (has attr fov as well)
// Disable at the beginning so that they do not determine minimum TR
// This part is a bit tricky, if you enable 1200 here by default, the minimum TR
// at the beginning of the app will assume MTC on, then T1w won't be able to set
// a shorter TR or min TR for MT and PD will be longer than what you want.
rth.addCommand(new RthUpdateEnableBlockCommand(sequenceId, "mt1200", false));
rth.addCommand(new RthUpdateEnableBlockCommand(sequenceId, "mt2000", false));
// These values are changed in the SB only.
rth.addCommand(new RthUpdateChangeReconstructionParameterCommand(sequenceId, {
phaseEncodes: phaseEncodes,
zPartitions: zPartitions
}));
var instanceName = rth.instanceName();
// Get the sequence parameters from the sequencer.
var scannerParameters = new RthUpdateGetParametersCommand(sequenceId);
rth.addCommand(scannerParameters);
var parameterList = scannerParameters.receivedData();
rth.addSeriesDescription(instanceName);
rth.informationInsert(sequenceId, "mri.SequenceName", "qMRLab " + instanceName);
rth.informationInsert(sequenceId, "mri.ScanningSequence", "GR");
rth.informationInsert(sequenceId, "mri.SequenceVariant", "SS, SP");
rth.informationInsert(sequenceId, "mri.ScanOptions", "");
rth.informationInsert(sequenceId, "mri.MRAcquisitionType", "3D");
rth.informationInsert(sequenceId, "mri.NumberOfAverages", 1);
rth.informationInsert(sequenceId, "mri.NumberOfCoils", parameterList[2]);
rth.informationInsert(sequenceId, "mri.EchoTrainLength", 1);
rth.informationInsert(sequenceId, "mri.ExcitationTimeBandwidth",SB.excitation["<Sinc RF>.timeBandwidth"]);
rth.informationInsert(sequenceId, "mri.ExcitationDuration",SB.excitation["<Sinc RF>.duration"]);
rth.informationInsert(sequenceId, "mri.ExcitationType","SINC Hamming");
rth.informationInsert(sequenceId, "mri.RawTrajectory","cartesian");
rth.informationInsert(sequenceId, "mri.SpoilingState","True");
rth.informationInsert(sequenceId, "mri.SpoilingType","COMBINED");
rth.informationInsert(sequenceId, "mri.SpoilingRFPhaseIncrement",117);
rth.informationInsert(sequenceId, "mri.SpoilingGradientDuration",SB.spoiler["<Area Trapezoid>.duration"]);
rth.informationInsert(sequenceId, "mri.SpoilingGradientAreaCycCm",SB.spoiler["<Area Trapezoid>.area"]);
rth.informationInsert(sequenceId, "mri.RxAttenuationManual", "False");
// Get minimum TR
var scannerTR = new RthUpdateGetTRCommand(sequenceId, [], []);
rth.addCommand(scannerTR);
var minTR = scannerTR.tr();
var startingTR = minTR;
RTHLOGGER_WARNING("MTSAT Minimum TR: " + minTR);
// Starting FOV also depends on CartesianReadout3D.spv
// In SpinBench, FOV is defined in cm. xFOV = yFOV always.
var startingFOV = SB.readout["<Cartesian Readout>.fov"]; // cm
var startingZFOV = SB.readout["<Phase Encode Gradient>.fov"]*10; //mm
// Slice thickness depends on SlabSelect.spv
// In SpinBench, SliceThickness is defined in mm.
// RF pulse is associated with the gradient. Changes in SSG updates RF as well.
var startingThickness = SB.excitation["<Slice Select Gradient>.thickness"]; // mm
// Insert metadata
//rth.informationInsert(sequenceId,"mri.SliceThickness",startingZFOV/zPartitions);
rth.addCommand(new RthUpdateChangeSliceThicknessCommand(sequenceId, startingZFOV/zPartitions));
rth.informationInsert(sequenceId,"mri.ExcitationSlabThickness",startingZFOV);
var startingResolution = startingFOV/xPixels* 10; // mm
rth.informationInsert(sequenceId,"mri.VoxelSpacing",[startingResolution*10,startingResolution*10,startingZFOV/zPartitions]);
// Specify TE delay interval
var minTE = SB.excitation['<Sinc RF>.end'] - SB.excitation['<Sinc RF>.peak'] + SB.readout['<Cartesian Readout>.readoutCenter'];
var startingTE = minTE + rth.apdKey("echodelay/duration")/1000; //ms
rth.informationInsert(sequenceId,"mri.EchoTime",startingTE);
// Assume FA from SB as the smaller.
var startingFA2 = SB.excitation["<Sinc RF>.tip"]; //20
// FA should be in decreasing order (FA1 > FA2)
var startingFA1 = startingFA2 - 14;
// To store the current values
var sliceThickness = startingThickness;
var encodedThickness = startingZFOV;
var fieldOfView = startingFOV;
//FIXME: This is temporary. Fix the order
var flipAngle1 = startingFA2; // large (20 init)
var flipAngle2 = startingFA1; // small (6 init)
var echoTime = startingTE;
var repetitionTime = startingTR;
// Import display tool
rth.importJS("lib:RthDisplayThreePlaneTools.js");
var displayTools = new RthDisplayThreePlaneTools();
// This is the encoded area (larger than excited slab)
// TODO: Change variable names and manage these guys later on.
//displayTools.setSliceThickness(startingZFOV) //mm
function changeFOV(fov){
if (fov<startingFOV) fov = startingFOV;
var scale = startingFOV/fov;
// Scale gradients (x,y,z) assuming in-plane isometry
rth.addCommand(new RthUpdateScaleGradientsCommand(sequenceId,"readout",scale,scale, startingZFOV/encodedThickness));
// Waveforms are not affected by the below:
rth.addCommand(new RthUpdateChangeResolutionCommand(sequenceId,startingResolution/scale));
rth.addCommand(new RthUpdateChangeFieldOfViewCommand(sequenceId, fov*10,fov*10,startingThickness));
// Annotation
displayTools.setFOV(fov * 10); //mm
//displayTool.setResolution(startingResolution/scale,startingResolution/scale);
// Update
fieldOfView = fov;
}
function changeSliceThickness(encodedZ){
// The value user provides interacts with the ZFOV. The ratio between
// Encoded and the Excited slab is 0.8. So whatever ZFOV user selects,
// that*0.83 will be the new excited slab thickness.
if (encodedZ < startingZFOV) encodedZ = startingZFOV;
var encFactor = 50/60;
// Scale SS gradient
// The scaling is always performed with respect to the STARTING VALUE (1). Factors must be always smaller than 1.
rth.addCommand(new RthUpdateFloatParameterCommand(sequenceId,"excitation","scaleGradients","",startingThickness/(encodedZ*encFactor)));
// If the slice thickness is increased, so should the zFOV (by scaling down z-grad)
rth.addCommand(new RthUpdateScaleGradientsCommand(sequenceId,"readout",startingFOV/fieldOfView,startingFOV/fieldOfView,startingZFOV/encodedZ));
// Update slice prescription UI tools (the green lines in the UI)
// Semantics: In 3D this is actually "SLAB THICKNESS" the following updates prescription, so that we see the proper scaling.
displayTools.setSliceThickness(encodedZ);
// Update metadata.
rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId,{
SliceThickness:encodedZ/zPartitions,
VoxelSpacing: [fieldOfView/xPixels*10,fieldOfView/phaseEncodes*10,encodedZ/zPartitions]
}));
rth.addCommand(new RthUpdateChangeFieldOfViewCommand(sequenceId, fieldOfView*10,fieldOfView*10,encodedZ));
encodedThickness = encodedZ;
}
// TODO: UPDATE WITH LOOP COMMANDS
// TODO: UPDATE WITH LOOP COMMANDS TRT1 too!!
function changeTR(tr) {
if (tr < minTR) {
tr = minTR;
}
// TR is a generic integer parameter, so to be updated by RthUpdateIntParameterCommand
// Method name is given by "setDesiredTR", defined in microseconds!
var value = tr * 1000; // Convert from milisec to microsec
//var trCommand = new RthUpdateIntParameterCommand(sequenceId, "", "setDesiredTR", "", value);
//mtsLoopCommands(value,TRT1,offsetIndex)
//rth.addCommand(trCommand);
//rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId, "RepetitionTime", tr));
repetitionTime = tr;
}
// TODO: UPDATE WITH LOOP COMMANDS
function changeFlipAngle1(angle1) {
//var flipCommand = RthUpdateFloatParameterCommand(sequenceId, "sequence", "scaleRF", "", angle / startingFA1);
//rth.addCommand(flipCommand);
rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId, "FlipAngle1", angle1));
flipAngle1 = angle1;
}
// TODO: UPDATE WITH LOOP COMMANDS
function changeFlipAngle2(angle2){
// Just referencing global var here.
rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId, "FlipAngle2", angle2));
flipAngle2 = angle2;
}
function changeTE(te)
{
rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId, "EchoTime", te));
rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId, "EchoTime", te));
var echoDelay = (te - minTE) * 1000; // Convert to usec
rth.addCommand(new RthUpdateIntParameterCommand(sequenceId, "echodelay", "setDelay", "", echoDelay));
}
/* Define UI element settings and link outputs from change events to the respective vars
inputWidget_FOV (Done)
inputWidget_SliceThickness (Done)
inputWidget_FA1 (Done)
inputWidget_FA2 (Done)
inputWidget_TR (Done)
*/
// Send metadata to recon
rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId,{
ExcitationTimeBandwidth: SB.excitation["<Sinc RF>.timeBandwidth"],
ExcitationDuration: SB.excitation["<Sinc RF>.duration"],
NumberOfCoils: parameterList[2],
FlipAngle1:flipAngle1,
FlipAngle2: flipAngle2,
FlipIndex: "on",
PreAcqDuration: SB.readout["<Preacquisitions>.duration"]
}));
function changeRxAtten(val)
{
RTHLOGGER_WARNING("Setting attenuation to " + val);
rth.addCommand(new RthUpdateFloatParameterCommand(sequenceId, "readout", "setRxAttenuation", "", val));
// A bit circular, but to ensure I assume.
var getRxAtten = new RthUpdateGetRxAttenuationCommand(sequenceId, "readout");
rth.addCommand(getRxAtten);
var atten = getRxAtten.receivedData();
controlWidget.inputWidget_RxAttenuation.value = atten;
}
controlWidget.inputWidget_RxAttenuation.valueChanged.connect(changeRxAtten);
controlWidget.inputWidget_RxAttenuation.minimum = 0;
controlWidget.inputWidget_RxAttenuation.maximum = 20;
controlWidget.inputWidget_SliceThickness.minimum = startingZFOV;
controlWidget.inputWidget_SliceThickness.maximum = startingZFOV*2;
controlWidget.inputWidget_SliceThickness.value = startingZFOV;
controlWidget.inputWidget_FOV.minimum = startingFOV;
controlWidget.inputWidget_FOV.maximum = startingFOV*2;
controlWidget.inputWidget_FOV.value = startingFOV;
// PDw and MTw
controlWidget.inputWidget_TR.minimum = minTR + 15;
controlWidget.inputWidget_TR.maximum = minTR + 30;
controlWidget.inputWidget_TR.value = 28;
// T1w
controlWidget.inputWidget_TRT1.minimum = minTR;
controlWidget.inputWidget_TRT1.maximum = minTR + 30;
controlWidget.inputWidget_TRT1.value = 18;
//FIXME: FA param names
controlWidget.inputWidget_FA1.minimum = 3;
controlWidget.inputWidget_FA1.maximum = 20;
controlWidget.inputWidget_FA1.value = startingFA2;
//FIXME: FA param names
controlWidget.inputWidget_FA2.minimum = 1;
controlWidget.inputWidget_FA2.maximum = 19;
controlWidget.inputWidget_FA2.value = startingFA1;
controlWidget.inputWidget_TE.minimum = minTE;
controlWidget.inputWidget_TE.maximum = 8;
controlWidget.inputWidget_TE.value = 3;
function attenuationClicked(chck){
if (chck){
controlWidget.inputWidget_RxAttenuation.enabled = true;
controlWidget.inputWidget_RxAttenuation.value = 0;
rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId, "RxAttenuationManual", "True"));
}else{
RTHLOGGER_WARNING("Rx attenuation has been disabled.");
controlWidget.inputWidget_RxAttenuation.enabled = false;
controlWidget.inputWidget_RxAttenuation.value = 0;
rth.addCommand(new RthUpdateFloatParameterCommand(sequenceId, "readout", "setRxAttenuation", "", 0));
rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId, "RxAttenuationManual", "False"));
}
}
function sessionClicked(chck){
if (chck){
controlWidget.sessionBIDS.enabled = true;
controlWidget.sessionBIDS.setText("00");
}else{
controlWidget.sessionBIDS.enabled = false;
controlWidget.sessionBIDS.text = "";
controlWidget.sessionBIDS.placeholderText = "_ses-<index>";
}
}
function acqClicked(chck){
if (chck){
controlWidget.acqBIDS.enabled = true;
controlWidget.acqBIDS.setText("freeform");
}else{
controlWidget.acqBIDS.enabled = false;
controlWidget.acqBIDS.text = "";
controlWidget.acqBIDS.placeholderText = "_acq-<label>";
}
}
var acqLabel = "";
function acqTextChanged(txt){
acqLabel = txt;
rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId,"AcquisitionBIDS",acqLabel));
}
var sesIndex = "";
function sesTextChanged(txt){
sesIndex = txt;
rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId,"SessionBIDS",sesIndex));
}
var subIndex = "";
function subTextChanged(txt){
subIndex = txt;
rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId,"SubjectBIDS",subIndex));
}
// Defaults
function mtsLoopCommands(TRPD,TRT1,offsetIndex){
// MTW
if (offsetIndex == 0) { // 1200
// Both MT pulses are of the same duration and energy, shape etc. just offsets are different
// If more MT pulses are added to the lib, adjust accordingly.
RTHLOGGER_WARNING("ENABLED OFFSET 1.2kHZ");
var mtwCommand1 = new RthUpdateEnableBlockCommand(sequenceId, "mt1200", true);
var mtwCommand2 = new RthUpdateEnableBlockCommand(sequenceId, "mt2000", false);
var offsetFreq = 1200;
var duration = SB.mt1200["<Fermi RF>.duration"];
} else if (offsetIndex == 1){
RTHLOGGER_WARNING("ENABLED OFFSET 2kHZ");
var mtwCommand1 = new RthUpdateEnableBlockCommand(sequenceId, "mt1200", false);
var mtwCommand2 = new RthUpdateEnableBlockCommand(sequenceId, "mt2000", true);
var duration = SB.mt1200["<Fermi RF>.duration"];
var offsetFreq = 2000;
}
else
{
// When the dropdown menu is initialized, the first arg passed is not 0 or 1.
// So on init, code hits this condition, where we'll enable mt1200 block.
RTHLOGGER_WARNING("Initializing...");
RTHLOGGER_WARNING("ENABLED OFFSET 1.2kHZ");
var mtwCommand1 = new RthUpdateEnableBlockCommand(sequenceId, "mt1200", true);
var mtwCommand2 = new RthUpdateEnableBlockCommand(sequenceId, "mt2000", false);
var offsetFreq = 1200;
var duration = SB.mt1200["<Fermi RF>.duration"];
}
var mtwCommand3 = new RthUpdateIntParameterCommand(sequenceId, "", "setDesiredTR", "", TRPD);
var mtwCommand4 = new RthUpdateFloatParameterCommand(sequenceId, "excitation", "scaleRF", "", flipAngle2/flipAngle1); // Small
var mtwCommand5 = new RthUpdateChangeMRIParameterCommand(sequenceId,{FlipAngle: flipAngle2, MTIndex: "on",FlipIndex: "01", RepetitionTime: 0.028, MTState: "True", MTOffsetFrequency: offsetFreq, MTPulseDuration: duration, MTPulseShape: "Fermi"});
var mtwGroup = new RthUpdateGroup([mtwCommand1, mtwCommand2, mtwCommand3, mtwCommand4, mtwCommand5]);
// PDW
var pdwCommand1 = new RthUpdateEnableBlockCommand(sequenceId, "mt1200", false);
var pdwCommand2 = new RthUpdateEnableBlockCommand(sequenceId, "mt2000", false);
var pdwCommand3 = new RthUpdateIntParameterCommand(sequenceId, "", "setDesiredTR", "", TRPD);
var pdwCommand4 = new RthUpdateFloatParameterCommand(sequenceId, "excitation", "scaleRF", "", flipAngle2/flipAngle1); // Small
var pdwCommand5 = new RthUpdateChangeMRIParameterCommand(sequenceId,{FlipAngle: flipAngle2, MTIndex: "off", FlipIndex: "01", RepetitionTime: 0.028, MTState: "False"});
var pdwGroup = new RthUpdateGroup([pdwCommand1, pdwCommand2, pdwCommand3, pdwCommand4, pdwCommand5]);
// T1w
var t1wCommand1 = new RthUpdateEnableBlockCommand(sequenceId, "mt1200", false);
var t1wCommand2 = new RthUpdateEnableBlockCommand(sequenceId, "mt2000", false);
var t1wCommand3 = new RthUpdateIntParameterCommand(sequenceId, "", "setDesiredTR", "", TRT1);
var t1wCommand4 = new RthUpdateFloatParameterCommand(sequenceId, "excitation", "scaleRF", "", 1); // Large
var t1wCommand5 = new RthUpdateChangeMRIParameterCommand(sequenceId,{FlipAngle: flipAngle1, MTIndex: "off", FlipIndex: "02", RepetitionTime: 0.018, MTState: "False"});
var t1wGroup = new RthUpdateGroup([t1wCommand1, t1wCommand2, t1wCommand3, t1wCommand4, t1wCommand5]);
rth.addCommand(new RthUpdateChangeMRIParameterCommand(sequenceId,{
SubjectBIDS: controlWidget.subjectBIDS.text,
SessionBIDS: controlWidget.sessionBIDS.text,
AcquisitionBIDS: controlWidget.acqBIDS.text
}));
// The order is set such that the highest SNR image (FA 20) is acquired first,
// so that the pre-scan is set with reference to that. Note that manual attenuation value
// may need to be set on GE manually to avoid clipping (probably 9+ DB in 3D phantom). If that's the case,
// it is important to set it with FA 20 image as a reference.
var loopCommands = [t1wGroup, mtwGroup, pdwGroup];
rth.setLoopCommands(sequenceId, "mtsatloop", loopCommands);
}
function changeOffset(offsetIndex){
//RTHLOGGER_WARNING("Selected Offset" + idx);
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! FIXED PARAMS FOR NOW !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
mtsLoopCommands(28000,18000,offsetIndex)
}
// Connect UI elements to the callback functions.
var offsetFreqs = new Array();
offsetFreqs = ["Fermi | 1200","Fermi | 2000"];
controlWidget.offsetSelectionWidget.addItems(offsetFreqs);
controlWidget.offsetSelectionWidget.setNeedsAttention(true);
controlWidget.offsetSelectionWidget.currentIndexChanged.connect(changeOffset);
changeOffset(controlWidget.offsetSelectionWidget.currentIndex);
controlWidget.acqBIDS.textChanged.connect(acqTextChanged);
acqTextChanged(controlWidget.acqBIDS.text);
controlWidget.sessionBIDS.textChanged.connect(sesTextChanged);
sesTextChanged(controlWidget.sessionBIDS.text);
controlWidget.subjectBIDS.textChanged.connect(subTextChanged);
subTextChanged(controlWidget.subjectBIDS.text);
controlWidget.isSessionBIDS.toggled.connect(sessionClicked);
sessionClicked(controlWidget.isSessionBIDS.checked)
controlWidget.isRxAttenuation.toggled.connect(attenuationClicked);
attenuationClicked(controlWidget.isRxAttenuation.checked)
controlWidget.isAcqBIDS.toggled.connect(acqClicked);
acqClicked(controlWidget.isAcqBIDS.checked)
controlWidget.inputWidget_FOV.valueChanged.connect(changeFOV);
changeFOV(controlWidget.inputWidget_FOV.value);
controlWidget.inputWidget_TR.valueChanged.connect(changeTR);
changeTR(controlWidget.inputWidget_TR.value);
controlWidget.inputWidget_FA1.valueChanged.connect(changeFlipAngle1);
changeFlipAngle1(controlWidget.inputWidget_FA1.value);
controlWidget.inputWidget_FA2.valueChanged.connect(changeFlipAngle2);
changeFlipAngle2(controlWidget.inputWidget_FA2.value);
controlWidget.inputWidget_TE.valueChanged.connect(changeTE);
changeTE(controlWidget.inputWidget_TE.value);
controlWidget.inputWidget_SliceThickness.valueChanged.connect(changeSliceThickness);
changeSliceThickness(controlWidget.inputWidget_SliceThickness.value);