-
Notifications
You must be signed in to change notification settings - Fork 2
/
rdbm.h
1510 lines (1321 loc) · 70.9 KB
/
rdbm.h
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
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*@Start***********************************************************/
/* GEMSBG Include File
* Copyright (C) 1992 The General Electric Company
*
* Include File Name: @RDBM@
* Developer: X. Zang
*
* $Source: rdbm.h $
* $Revision: 1.23 $ $Date: 4/4/94 12:41:07 $
*/
// NOT ORIGINAL GE VERSION:
// 090216 slg edited to rid dependencies on coilParameters.h and ConfigParameter.h within op_prescan.h
/*@Synopsis
Define all constants and structures needed to interface with RDBM.
*/
/*@Description
Applications who uses RDBM must include this file.
There are two ways this file can be used.
1. Applications who uses the toolsdata, exam header, serise
header and/or image header section of the raw header must
include the following files prior to the #include
directive of this file.
#include toolsdata.h
#include imagedb.h
2. Applications who wish to do away with the objcc dependancy
and have no need to access the sections mentioned above
can do so by
#define RECON_FLAG
prior to the #include directive of this file.
Generation Date Author(s) Comments
---------- ---- -------- --------
vmx 10/17/94 M. Hartley Merge 5.5 into vmx
vmx 12/21/94 Y. Oda Add YMS's gradient
coil types
CV1M3 05.27.98 S. Murthy Removed GradCoil Definitions
Added Gradwarp Definitions
CV2 09/28/99 AKG MRIge56094 added RDB_FCINE_ET to recon dacq ctrl
CV2 11/05/99 A.T. Add entries for gridding.
LX 09/21/00 BWL MRIge61012 - reserved 12th bit of rhdacqctrl for
CERD to enable queing at AIME input end for normal
2D/3D scans.
CV2 08/11/00 ALP MRIge61411 - reserved 12th bit of rhdacqctrl for
CERD to enable queing at AIME input end for normal
2D/3D scans.
PLX 11/06/00 BJM Added slice_factor.h and SLICE_FACTOR to DATA_ACQ_ORDER
table
8.34 08/21/00 Y. Oda Added RDB_LINE_SCAN
in rdb_hdr_data_collect_type1
8.34 05/08/01 N. Adachi Added rdn_hdr_fiestamlf for MFO FIESTA
27/08/02 M. Miyoshi YMSmr04091. Added RDB_FIESTA_1ST_LAST for FIESTA.
11.0 07-Mar-03 S.Lawrence
T.Abraham Added entries for EC-TRICKS
HFO3 12/16/2002 Rakesh Shevde Added
rdb_hdr_retro_control, rdb_hdr_etl for Retro FSE
phase correction.
RDB_RETRO_PC bit to identify Retro FSE phase
correction scan.
12.0 10-Mar-04 Alok Modak Changes to overcome slice limit of 1024 for Multiphase
(RDB_SINGLE_PHASE_INFO type) scans.
New limit: RDB_MAX_SLICES_MULTIPHASE 10000
Added entries for >1024
12.0 26-Mar-2004 Rakesh Shevde Added fields to RDB_HEADER_REC to indicate offsets for
the respective data structures of the POOL_HEADER.
11.0 08-Aug-2004 Raman Subramanian MRIge91592 - 8.x comments for 11.0 states that the raw header size is
60464. It should be 61464
14.0 08-May-2005 Sanjay Joshi Changed P-file header revision to
14.0. Changed comments regarding
P-file header size.
14.0 14-June-2005 Alok Modak Changes to support SWIFT
14.0 20-Dec-2005 Bhavik Kanabar Added PRESCAN_HEADER to POOL_HEADER.
*/
/*@End*********************************************************/
#include "GEtypes.h"
#include "toolsdata.h"
#include "op_global.h"
#include "op_prescan.h"
#include "GElimits.h"
#include "slice_factor.h"
#ifndef RDBM_INCL /* only do this once in any given compilation.*/
#define RDBM_INCL
/*---------------------------------------------------------------------
| RDBM Function codes
---------------------------------------------------------------------*/
#define RDB_ALLOCATE 1
#define RDB_CLOSE 2
#define RDB_DEALLOCATE 3
#define RDB_INIT 4
#define RDB_LOCK 5
#define RDB_OPEN 6
#define RDB_RDHEADER 7
#define RDB_UNLOCK 8
#define RDB_WRHEADER 9
#define RDB_PREALLOCATE 10
#define RDB_LASTRUN 11
#define RDB_CLEANUP 12
#define RDB_LOPEN 13
#define RDB_LCLOSE 14
#define RDB_READ 15
#define RDB_WRITE 16
#define RDB_LOCK_TO_TAPE 17
#define RDB_UNLOCK_FROM_TAPE 18
#define RDB_HDR_UNLOCK 19
#define RDB_GETADDR 20
#define RDB_VALID 21
#define RDB_RDPFRAME 22
#define RDB_PERM 23
#define RDB_HIDE 24
#define RDB_UNHIDE 25
#define RDB_RDTFRAME 26
#define RDB_RDPOPS 27
#define RDB_RDTOPS 28
#define RDB_CREATE_LINK 29
#define RDB_LOCK_SLICE 30
#define RDB_DEALLOCATE_RFF 31
#define RDB_PERM_RFF 32
#define RDB_UNLOCK_RFF 33
#define RDB_UNLOCK_FROM_TAPE_RFF 34
#define RDB_DEALLOCATE_DS 35
#define RDB_HDR_UNLOCK_RFF 36
#define RDB_SET_RECEIVER 37
#define RDB_DISK_TO_TAPE 38
#define RDB_TAPE_TO_DISK 39
#define RDB_CLEARDB 40
#define RDB_UNINIT 41
#define RDB_WRITE_RAW 42
#define RDB_SAVE_BAM 43
#define RDB_LOAD_BAM 44
/*---------------------------------------------------------------------
| RDBM status codes
---------------------------------------------------------------------*/
#define RDB_STATUS_OK 0
#define RDB_STATUS_ERR -1
#define RDB_NO_RUNS -2
/*---------------------------------------------------------------------
| rdb_hdr_rdbm_rev
| RDBM header fields that filled by rdbm routines
---------------------------------------------------------------------*/
#define RDB_RDBM_REVISION 14.3F
/*---------------------------------------------------------------------
| rdb_hdr_transpose
| Relating to transpose and rotating the image 16 bit integer
---------------------------------------------------------------------*/
#define RDB_TRANSPOSE 3
#define RDB_NO_TRANSPOSE 0
#define RDB_TRANSPOSE_AFTER -1
#define RDB_TRANSPOSE_BEFORE 1
/*---------------------------------------------------------------------
| rdb_hdr_rotation
| For 'ROTATION' field in header
---------------------------------------------------------------------*/
#define RDB_NO_ROTATION 0
#define RDB_ROTATE_90 1
#define RDB_ROTATE_180 2
#define RDB_ROTATE_270 3
/*---------------------------------------------------------------------
| rdb_hdr_scan_type
| Scan types, may be added together to form the right combination
| storage is 16 bit mask.
---------------------------------------------------------------------*/
#define RDB_SPIN_ECHO 0x0002 /* 2 */
#define RDB_PARTIAL_SAT 0x0008 /* 8 */
#define RDB_INVERSION_REC 0x0010 /* 16 */
#define RDB_HADAMARD 0x0020 /* 32 */
#define RDB_SPIN_WARP 0x0800 /* 2048 */
#define RDB_GRE 0x1000 /* 4096 */
/*---------------------------------------------------------------------
| rdb_hdr_data_collect_type
| Data collection types are a bitmask which may be added together
| to form the right combination of bits.
---------------------------------------------------------------------*/
#define RDB_CHOPPER 0x0001
#define RDB_CINE 0x0002
#define RDB_SHIM 0x0004
#define RDB_GRASS 0x0008
#define RDB_HNEX 0x0010 /* 16 */
#define RDB_STRIP 0x0020 /* 32 */
#define RDB_Y_STRIP 0x0020 /* 32 */
#define RDB_3DFFT 0x0040 /* 64 */
#define RDB_EXORCIST 0x0080 /* 128 */
#define RDB_NO_PHASE_WRAP 0x0100 /* 256 */
#define RDB_NO_FREQ_WRAP 0x0200 /* 512 */
#define RDB_X_STRIP 0x0400 /* 1024 */
#define RDB_HECHO 0x0800 /* 2048 */
#define RDB_OVERSCAN 0x1000 /* 4096 */
#define RDB_3QNEX 0x2000 /* 8192 */
#define RDB_POMP 0x4000 /* 16384 */
/*---------------------------------------------------------------------
| rdb_hdr_data_collect_type1
| Data collection types are a bitmask which may be added together
| to form the right combination of bits.
| RDB_USE_NEXA is used to indicated that the nex abort table will be
| used to store the nex values during the collection of the 2nd echo.
| RDB_USE_NEXA is normally used for Odd Nex Fast Spin Echo scans with
| two echoes.
|
| Added RDB_SFRAME for 64kHz bandwidth multi-coil norec superframe processing
|
| Added RDB_MULTISLAB, RDB_MAX_OVLPROC, RDB_MIN_OVLPROC for MOTSA
| overlap image processing
|
| Added RDB_SPIRAL for data acquired using a spiral sequence.
| Added RDB_LINE_SCAN (reserved for hfo/mfo)
| Added RDB_RECON_ALL_PASSES so Recon does not skip any.
| Added RDB_ECTRICKS for EC-TRICKS sequence.
| Added RDB_RETRO_PC for applying Retrospective FSE phase correction(set by PSD).
| RDB_SUPPORT_RDS Set if this scan supports raw data server
| RDB_INITPATH_RDS Set when initial datapath is RDS (instead of regular Recon datapath)
---------------------------------------------------------------------*/
#define RDB_HRHOMO 0x0001
#define RDB_USE_NEXA 0x0002
#define RDB_CINE_ODDNEX 0x0004
#define RDB_SFRAME 0x0008
#define RDB_MULTISLAB 0x0010 /* 16 */
#define RDB_MAX_OVLPROC 0x0020 /* 32 */
#define RDB_MIN_OVLPROC 0x0040 /* 64 */
#define RDB_FAST_PHASE_OFF 0x0080 /* 128 */
#define RDB_AUTO_PASS 0x0100 /* 256 */
#define RDB_IMG_NEX 0x0200 /* 512 */
#define RDB_SPIRAL 0x0400 /* 1024 */
#define RDB_FAST_VRGF 0x0800 /* 2048 */
#define RDB_RECON_ALL_PASSES 0x1000 /* 4096 */
#define RDB_LINE_SCAN 0x2000 /* 8192 */
#define RDB_ECTRICKS 0x4000 /* 16384 */
#define RDB_VRGF_AFTER_PCOR 0x8000 /* 32768 */
#define RDB_ZERO_ROW_ENDS 0x10000 /* 65536 */
#define RDB_RETRO_PC 0x20000 /* 131072 */
#define RDB_ZERO_FILL 0x40000 /* 262144 */
#define RDB_SUPPORT_RDS 0x80000 /* 524288 */
#define RDB_INITPATH_RDS 0x100000 /* 1048576 */
#define RDB_DIFFUSION_EPI 0x200000 /* 2097152 */
/*---------------------------------------------------------------------
| rdb_hdr_data_format
| Define bits for the FORMAT offset in the RDBM hdr. These define
| various non-data related processes which may be turned on or off
| just for fun. These bits may be added together to form a 16-bit
| bitmask. Please note that there is NOT a clear distinction being
| made between what should be in the FORMAT offset and what should
| be in the DATA COLLECTION offset. It's up to the keeper of the RDBM.
---------------------------------------------------------------------*/
#define RDB_NO_GRADWARP 0x0001 /* 1 */
#define RDB_NO_FERMI 0x0002 /* 2 */
#define RDB_ZCHOP 0x0004 /* 4 */
#define RDB_YCHOP 0x0008 /* 8 */
#define RDB_IIC 0x0010 /* 16 */
#define RDB_CSI 0x0020 /* 32 */
#define RDB_HS 0x0040 /* 64 */
#define RDB_SPECTRO 0x0080 /* 128 */
#define RDB_IMAGE_CHECKSUM 0x0100 /* 256 */
#define RDB_NOREC_CHECKSUM 0x0200 /* 512 */
#define RDB_GRADWARP_USE_FILE 0x0400 /* 1024 */
#define RDB_USE_FLIPTABLE 0x0800 /* 2048 */
#define RDB_CERD_USE_FLIP_SSP 0x1000 /* 4096 */
#define RDB_PSIR_CORRECTION 0x2000 /* 8192 MRIge65943 */
#define RDB_MCSI 0x2020 /* 8224 Phase Array MultiVoxel CSI -- Anish Jacob 102705*/
#define RDB_SINGLE_PHASE_INFO 0x4000 /* 16384 */
/*---------------------------------------------------------------------
| Define the different gradwarp types.
---------------------------------------------------------------------*/
#define RDB_GWTYPE_NONE 0
#define RDB_GWTYPE_PHASE 1
#define RDB_GWTYPE_FREQ 2
#define RDB_GWTYPE_RADIAL 3
/*--------------------------------------------------------*/
/* Gradwarp Processing Type */
/*--------------------------------------------------------*/
#define RDB_GW_TYPE1 1 /* spherical harmonic correction */
#define RDB_GW_TYPE2 2 /* polynomical correction */
#define RDB_GW_TYPE3 3 /* no correction */
#define RDB_GW_TYPE4 4 /* zaxis only ? */
/*---------------------------------------------------------------------
| Define a few maximums for number of echoes, slices,
| dabs, and the I/O packet size
---------------------------------------------------------------------*/
#define RDB_MAX_SLICES GEMRI_MAXNOSLICES
#define RDB_MAX_SLICES_MULTIPHASE 10000
#define RDB_MAX_PASSES RDB_MAX_SLICES
#define RDB_MAX_ECHOES 16
#define RDB_IOPACKET_SIZE sizeof(RDB_IO_PACKET)
#define RDB_MAX_DABS 1
/*---------------------------------------------------------------------
| Value of the dab board.
---------------------------------------------------------------------*/
#define DAB_VALUE 0
/*---------------------------------------------------------------------
| rdb_hdr_file_contents
| Data type of locked data set.
---------------------------------------------------------------------*/
#define RDB_FILE_EMPTY 0
#define RDB_FILE_NOREC 1
#define RDB_FILE_RAW 2
/*---------------------------------------------------------------------
| Constants for rdb_tape_disk routine.
---------------------------------------------------------------------*/
#define RDB_RET_RUN 0
#define RDB_OVERWRITE 1
#define RDB_NOOVERWRITE 2
/*---------------------------------------------------------------------
| rdb_hdr_dacq_ctrl
| Control bit definitions for how the data was played out by the psd.
---------------------------------------------------------------------*/
#define RDB_RAW_COLLECT 0x0001 /* 1 */
#define RDB_FLIP_PHASE_EVEN 0x0002 /* 2 */
#define RDB_FLIP_PHASE_ODD 0x0004 /* 4 */
#define RDB_FLIP_FREQ_EVEN 0x0008 /* 8 */
#define RDB_FLIP_FREQ_ODD 0x0010 /* 16 */
#define RDB_RAW_WITHOUT_SSP 0x0020 /* 32 */
#define RDB_RAW_WRAP_AROUND 0x0040 /* 64 */
#define RDB_USER_PROCESSING 0x0080 /* 128 */
#define RDB_CARDIAC_MMODE 0x0100 /* 256 */
#define RDB_FASTCINE 0x0200 /* 512 */ /* used in dacq_tps_init.c
for fastcine packet */
#define RDB_FCINE_ET Ox0400 /* 1024 */ /*MRIge56094 used by CERD for fcine_ET */
#define RDB_PASS_THROUGH_CERD 0x0800 /* 2048 */
#ifndef RDB_CERD_CONSTANT_FILTER
#define RDB_CERD_CONSTANT_FILTER 0x1000 /* 4096 */ /* MRIge61012 */
#endif
/*---------------------------------------------------------------------
| rdb_hdr_exec_ctrl
| Control bit definitions for what results the tps will transfer to the host.
---------------------------------------------------------------------*/
#define RDB_AUTO_DISPLAY 0x0001 /* 1 */
#define RDB_AUTO_LOCK 0x0002 /* 2 */
#define RDB_AUTO_PERM 0x0004 /* 4 */
#define RDB_XFER_IM 0x0008 /* 8 */
#define RDB_SAVE_IM 0x0010 /* 16 */
#define RDB_TAPE_LOCK 0x0020 /* 32 */
#define RDB_INTERMEDIATE 0x0040 /* 64 */
#define RDB_OVERRIDE_BROADCAST 0x0080 /* 128 */
#define RDB_OVERRIDE_IMG_INSTALL 0x0100 /* 256 */
#define RDB_OVERRIDE_AUTODISPLAY 0x0200 /* 512 */
#define RDB_RTD_XFER_IM_REMOTE 0x0400 /* 1024 */
#define RDB_RTD_SCAN 0x0800 /* 2048 */
#define RDB_REF_SCAN 0x1000 /* 4096 */
#define RDB_DONT_WRITE_OR_INSTALL 0x2000 /* 8192 */
#define RDB_RTD_XFER_ALL_IM_PER_PASS 0x4000 /* 16384 */
#define RDB_XFER_IMG_RIR 0x8000 /* 32768 */
/*---------------------------------------------------------------------
| rdb_hdr_recon_ctrl
| Control bit definitions for determining what type of images tps will cresate.
---------------------------------------------------------------------*/
#define RDB_MAG_IM 0x0001 /* 1 */
#define RDB_PHASE_IM 0x0002 /* 2 */
#define RDB_I_IM 0x0004 /* 4 */
#define RDB_Q_IM 0x0008 /* 8 */
#define RDB_COMPRESSION 0x0010 /* 16 */
#define RDB_GRID_ON 0x0020 /* 32 */
/* 64 */
/* the following "raw data mode" definitions describe new bit positions
being used in rdb_hdr_recon_ctrl. These bits will be copied from
rdb_hdr_recon_ctrl into the control_flag at the beginning of
rc_recon_seg.c
If the SKIP_ALL_RECON bit is set, all of the SKIP bits will
be set in the control_flag.
*/
#define RDB_SKIP_ALL_RECON 0x0080 /* 128 */
#define RDB_SKIP_ROW_FFT 0x0100 /* 256 */
#define RDB_SKIP_COL_FFT 0x0200 /* 512 */
#define RDB_SKIP_HALF_FOURIER 0x0400 /* 1024 */
#define RDB_SKIP_FERMI 0x0800 /* 2048 */
#define RDB_SKIP_NEX_SCALE 0x1000 /* 4096 */
#define RDB_SKIP_IMAGE_SCALE 0x2000 /* 8192 */
#define RDB_SKIP_3DJOB_FFT 0x4000 /* 16384 */
#define RDB_UNUSED 0x8000 /* 32768 */
/* Previous flags are set by PSD through rdb_hdr_recon_ctrl
(limited to 16 bits). Here we define additional recon
control flags for internal recon use.
*/
#define HECHO_SMOOTH 0x10000
#define ASSET_CENTER 0x20000
#define EPI_BASELINE_CORRECT 0x40000
/*---------------------------------------------------------------------
| rdb_hdr_fd_ctrl
| Control bits for feeder.
---------------------------------------------------------------------*/
#define RDB_FD_DF 0x0001 /* 1 */
#define RDB_FD_UNLOCKED 0x0002 /* 2 */
#define RDB_FD_ALGOR 0x0004 /* 4 */
#define RDB_FD_VALIDATE 0x0008 /* 8 */
#define RDB_FD_DEBUG_SS 0x0010 /* 16 */
#define RDB_FD_TE 0x0020 /* 32 */
#define RDB_FD_ISR_ALGR 0x0040 /* 64 */
#define RDB_FD_SINK_DF 0x0001
#define RDB_FD_SOURCE_UNLOCKED 0x0002
#define RDB_FD_SOURCE_ALGOR 0x0004
#define RDB_FD_5XVALIDATE 0x0008
#define RDB_FD_5XDEBUG_SS 0x0010
#define RDB_FD_TE_ENABLE 0x0020
#define RDB_FD_ISR_ALGOR 0x0040
#define RDB_FD_SOURCE_LOCKED 0x0080
#define RDB_FD_SOURCE_RCVR 0x0100
#define RDB_FD_SINK_DAB 0x0200
#define RDB_FD_EXTERNAL_SSP 0x0400
#define RDB_FD_DEBUG 0x8000
#define RDB_FD_AUTOSTART 0x1000
#define RDB_FD_CHKSUM 0x2000
/*---------------------------------------------------------------------
| RDBM constants used by rdbm functions.
---------------------------------------------------------------------*/
#define RDB_VALID_LOGO "GE_MED_NMR"
#define RDB_INVALID_LOGO "INVALIDNMR"
#define RDB_MAX_OPS 4
#define RDB_ISVALID 0
#define RDB_INVALID -2
#define RDB_HDR_LOCK_PASS 00
#define RDB_HDR_LOCK_SLICE 01
#define RDB_HDR_LOCK_TAPE 02
#define RDB_DS_SCAN -3
#define RDB_RAWFF_SCAN -2
#define RDB_RAWFF_TYPE -2
#define RDB_RAWFF_ALL -1
#define RDB_NORMAL_SCAN 0
#define PHASE_ORDERED 0
#define TIME_ORDERED 1
#define RDB_POOL_FILE "HEADER_POOL"
#define RDB_DIR_FILE "/usr/g/mrraw"
#define RDB_HDR_FILE "/usr/g/mrraw/HEADER_POOL"
#define RDB_LCK_FILE "/usr/g/mrraw/Pxxxxx"
#define RDBM_NMRID "RDBM_xxxxxx"
#define DATA_AREA 0
#define SSP_AREA 1
#define UDA_AREA 2
/*---------------------------------------------------------------------
| rdb_hdr_v_type
| Define constants for Vascular
---------------------------------------------------------------------*/
#define RDB_VASC 0x00000001 /* 1 */
#define RDB_PC 0x00000002 /* 2 */
#define RDB_2SETS 0x00000008 /* 8 */
#define RDB_ALIAS 0x00000010 /* 16 */
#define RDB_PHASE1 0x00000020 /* 32 */
#define RDB_PHASE2 0x00000040 /* 64 */
#define RDB_NMASK 0x00000080 /* 128 */
#define RDB_MAG 0x00000100 /* 256 */
#define RDB_XFLOW 0x00000200 /* 512 */
#define RDB_YFLOW 0x00000400 /* 1024 */
#define RDB_ZFLOW 0x00000800 /* 2048 */
#define RDB_SLICE 0x00001000 /* 4096 */
#define RDB_READOUT 0x00002000 /* 8192 */
#define RDB_PHASE 0x00004000 /* 16384 */
#define RDB_VINNIE1 0x00008000 /* 32768 */
#define RDB_VINNIE2 0x00010000 /* 65536 */
#define RDB_VINNIE3 0x00020000 /* 131072 */
#define RDB_PROJ10 0x00080000 /* 524288 */
#define RDB_PROJ5 0x00100000 /* 1048576 */
#define RDB_NMASK2 0x00200000 /* 2097152 */
#define RDB_QSHIM 0x00400000 /* 4194304 */
/*---------------------------------------------------------------------
| Constants used to identify vascular image types
---------------------------------------------------------------------*/
#define VASC_PROJ 0x00000200 /* 512 */
#define VASC_ZPHASE 0x00000400 /* 1024 */
#define VASC_YPHASE 0x00000800 /* 2048 */
#define VASC_XPHASE 0x00001000 /* 4096 */
#define VASC_MAG 0x00002000 /* 8192 */
#define VASC_VASC 0x00004000 /* 16384 */
#define VASC_COLLAPSE 0x00008000 /* 32768 */
/*---------------------------------------------------------------------
| Constants used to identify variable view sharing
---------------------------------------------------------------------*/
/* rdb_hdr_vvsmode */
#define VV_ON 1
#define VV_NN 2
#define VV_LI 4
#define VV_WRAP 8
#define VV_DIASTOLE 16
#define VV_NOREC_VVSHARE 32
/*---------------------------------------------------------------------
| Fat and Water Dual Recon
---------------------------------------------------------------------*/
/* rdb_hdr_fatwater */
/*---------------------------------------------------------------------
Bit Name Definition
0-2 FW_IMAGE_BIT used for fat/water/original image
3 FW_FAT_WATER_SWAP the flag to swap "fat" and "water"
4-6 FW_PHASE_DIFF_VALU used for phase difference value
---------------------------------------------------------------------*/
#define FW_FATWATER_OFF 0x0000 /* fat/water recon off */
#define FW_WATER_IMAGE 0x0001 /* water image */
#define FW_FAT_IMAGE 0x0002 /* fat image */
#define FW_ORIGINAL_IMAGE 0x0004 /* original image */
#define FW_IMAGE_BIT_MASK 0x0007 /* mask the bit 0-2 */
#define FW_IS_FATWATER_ON(ARG) (((ARG) & FW_IMAGE_BIT_MASK) != FW_FATWATER_OFF)
/*****************************************************************************/
/* */
/* if fat/water is on, return 1. */
/* else fat/water is off, return 0. */
/* */
/*****************************************************************************/
#define FW_GET_IMAGE_TYPE_VALUE(ARG) (((ARG) & FW_IMAGE_BIT_MASK))
#define FW_IS_IMAGE_TYPE_SELECTED(ARG, FW_TYPE) ((((ARG) & FW_IMAGE_BIT_MASK) & FW_TYPE ) == FW_TYPE)
#define FW_FAT_WATER_SWAP 0x0008 /* swap real part and imag. part */
/*****************************************************************************/
/* */
/* FAT */
/* ^ FW_REAL_IMAG_SWAP:OFF */
/* |__>WATER */
/* */
/* WATER */
/* ^ FW_REAL_IMAG_SWAP:ON */
/* |__>FAT */
/* */
/*****************************************************************************/
#define FW_IS_FAT_WATER_SWAP(ARG) (((ARG) & FW_FAT_WATER_SWAP) >> 3)
#define FW_1_2_PI_PHASE_DIFF 0x0000 /* fat/water phase difference is 1/2*PI */
#ifndef FW_1_4_PI_PHASE_DIFF
#define FW_1_4_PI_PHASE_DIFF 0x0001 /* fat/water phase difference is 1/4*PI */
#endif
#ifndef FW_2_3_PI_PHASE_DIFF
#define FW_2_3_PI_PHASE_DIFF 0x0002 /* fat/water phase difference is 2/3*PI */
#endif
#ifndef FW_1_3_PI_PHASE_DIFF
#define FW_1_3_PI_PHASE_DIFF 0x0004 /* fat/water phase difference is 1/3*PI */
#endif
/* MRIhc06477 Dheeraj@extenprise */
#define FW_PHASE_DIFF_VALUE_MASK 0x0070 /* mask the bit 4-6 */
#define FW_GET_PHASE_DIFF_VALUE(ARG) (((ARG) & FW_PHASE_DIFF_VALUE_MASK) >> 4)
/*****************************************************************************/
/* */
/* phase_diff_value = FW_GET_PHASE_DIFF_VALUE(rdb_hdr_fatwater); */
/* */
/* phase_diff_value: FW_1_2_PI_PHASE_DIFF */
/* (fat/water phase difference is 1/2*PI) */
/* : FW_1_4_PI_PHASE_DIFF */
/* (fat/water phase difference is 1/4*PI) */
/* : FW_2_3_PI_PHASE_DIFF */
/* (fat/water phase difference is 2/3*PI) */
/* */
/*****************************************************************************/
/*--------------------------------------------------------*/
/* rdb_hdr_fiestamlf */
/* Definition for MFO FIESTA Recon 05/08/01 N.Adachi */
/*--------------------------------------------------------*/
#define RDB_FIESTA_ECHO_DFT 0x0100 /* 9th bit:256 */
#define RDB_FIESTA_FASTCINE 0x0200 /* 10th bit:512 */
#define FIESTA_PROC_TYPE_MASK 0x00FF /* 255 */
#define RDB_FIESTA_AVE 1 /* combine by averaging */
#define RDB_FIESTA_RMS 2 /* combine by root mean square */
#define RDB_FIESTA_MIP 3 /* combine by MIP */
#define RDB_FIESTA_1ST_LAST 4 /* YMSmr04091. combine 1st and last echo */
#define RDB_FIESTA_1ST_ONLY 5 /* YMSmr05612. combine 1st echo only*/
/*--------------------------------------------------------*/
/* rdb_hdr_dfmctrl */
/* Modified for MFO DFM support 09/13/01 N.A */
/*--------------------------------------------------------*/
#define RDB_DFM_ON 0x0001 /* 1st bit:DFM on/off */
#define RDB_DFM_USESUM 0x0002 /* 2nd bit:DFM TYPE; =1: Use Summation, =0:Non Use */
/*--------------------------------------------------------*/
/* rdb_hdr_dwnav_cor */
/* YMSmr03584 */
/* Definition for Nav echo phase correction 02/22/02 N.A */
/*--------------------------------------------------------*/
#define RDB_DWNAV_NAVCOR 0x0001
#define RDB_DWNAV_PHASESHIFT 0x0002
/*--------------------------------------------------------*/
/* rdb_hdr_clariview_type */
/* YMSmr */
/* Definition for distinction between ogirin filter */
/* and clariview filter */
/*--------------------------------------------------------*/
#define OG_FLT_TYPE_OFFSET 100
/*--------------------------------------------------------*/
/* rdb_hdr_herawflt */
/* Half Echo Recon Mode (default = 0) */
/* 0: Standard Homodyne II Recon (Real image created) */
/* 1: Homodyne II + New filter (Real image created) */
/* 2: 0 Fill + HPF + New filter (Magnitude image created)*/
/*--------------------------------------------------------*/
#define RDB_RAWFLT_STANDARD 0
#define RDB_RAWFLT_HOMODYNEII_NEWFLT 1
#define RDB_RAWFLT_0FILL_HPF_NEWFLT 2
#define RDB_RAWFLT_NEWFLT_HOMODYNEII 3
#define RDB_RAWFLT_0FILL_NEWFLT 4
/*--------------------------------------------------------*/
/* rdb_hdr_multiphase_type */
/* Definitions to show acq order */
/*--------------------------------------------------------*/
#define INTERLEAVED_TYPE 0
#define SEQUENTIAL_TYPE 1
/*--------------------------------------------------------*/
/* rdb_hdr_swiftenable */
/* Definitions to values rhswiftenable can take */
/*--------------------------------------------------------*/
#define ENABLE_SWIFT 1
#define SWITCH_RECEIVER_WEIGHTS 2
/**********************************************************************
*
* The following is the typedef of the raw header structure.
*
**********************************************************************/
/*---------------------------------------------------------------------
| Multiple receiver structure
---------------------------------------------------------------------*/
typedef struct
{
short start_rcv;
short stop_rcv;
} RDB_MULTI_RCV_TYPE;
typedef struct _RDB_HEADER_REC
{
float rdb_hdr_rdbm_rev;
long rdb_hdr_run_int; /* Rdy pkt Run Number */
short rdb_hdr_scan_seq; /* Rdy pkt Sequence Number */
char rdb_hdr_run_char [6]; /* Rdy pkt Run no in char */
char rdb_hdr_scan_date [10]; /* */
char rdb_hdr_scan_time [8]; /* */
char rdb_hdr_logo [10]; /* rdbm used to verify file */
short rdb_hdr_file_contents; /* Data type 0=emp 1=nrec 2=rw 0, 1, 2 */
short rdb_hdr_lock_mode; /* unused */
short rdb_hdr_dacq_ctrl; /* rhdacqctrl bit mask 15 bits */
short rdb_hdr_recon_ctrl; /* rhrcctrl bit mask 15 bits */
short rdb_hdr_exec_ctrl; /* rhexecctrl bit mask 15 bits */
short rdb_hdr_scan_type; /* bit mask 15 bits */
short rdb_hdr_data_collect_type; /* rhtype bit mask 15 bits */
short rdb_hdr_data_format; /* rhformat bit mask 15 bits */
short rdb_hdr_recon; /* rhrecon proc-a-son recon 0 - 100 */
short rdb_hdr_datacq; /* rhdatacq proc-a-son dacq */
short rdb_hdr_npasses; /* rhnpasses passes for a scan 0 - 256 */
short rdb_hdr_npomp; /* rhnpomp pomp group slices 1,2 */
short rdb_hdr_nslices; /* rhnslices slices in a pass 0 - 256 */
short rdb_hdr_nechoes; /* rhnecho echoes of a slice 1 - 32 */
short rdb_hdr_navs; /* rhnavs num of excitiations 1 - 32727 */
short rdb_hdr_nframes; /* rhnframes yres 0 - 1024 */
short rdb_hdr_baseline_views; /* rhbline baselines 0 - 1028 */
short rdb_hdr_hnover; /* rhhnover overscans 0 - 1024 */
unsigned short rdb_hdr_frame_size; /* rhfrsize xres 0 - 32768 */
short rdb_hdr_point_size; /* rhptsize 2 - 4 */
short rdb_hdr_vquant; /* rhvquant 3d volumes 1 */
short rdb_hdr_cheart; /* RX Cine heart phases 1 - 32 */
float rdb_hdr_ctr; /* RX Cine TR in sec 0 - 3.40282e38*/
float rdb_hdr_ctrr; /* RX Cine RR in sec 0 - 30.0 */
short rdb_hdr_initpass; /* rhinitpass allocate passes 0 - 32767 */
short rdb_hdr_incrpass; /* rhincrpass tps autopauses 0 - 32767 */
short rdb_hdr_method_ctrl; /* rhmethod 0=recon, 1=psd 0, 1 */
unsigned short rdb_hdr_da_xres; /* rhdaxres 0 - 32768 */
short rdb_hdr_da_yres; /* rhdayres 0 - 2049 */
short rdb_hdr_rc_xres; /* rhrcxres 0 - 1024 */
short rdb_hdr_rc_yres; /* rhrcyres 0 - 1024 */
short rdb_hdr_im_size; /* rhimsize 0 - 512 */
long rdb_hdr_rc_zres; /* power of 2 > rhnslices 0 - 128 */
/*
These variables are changed to unsigned int to support greater than 2GB of BAM.
Throughout RECON the same change has been made by using the typedef BAM_size
defined in bam.h
*/
unsigned long int rdb_hdr_raw_pass_size; /* rhrawsize 0 - 2147483647*/
unsigned long int rdb_hdr_sspsave; /* rhsspsave 0 - 2147483647*/
unsigned long int rdb_hdr_udasave; /* rhudasave 0 - 2147483647*/
float rdb_hdr_fermi_radius; /* rhfermr fermi radius 0 - 3.40282e38*/
float rdb_hdr_fermi_width; /* rhfermw fermi width 0 - 3.40282e38*/
float rdb_hdr_fermi_ecc; /* rhferme fermi excentiricty 0 - 3.40282e38*/
float rdb_hdr_clip_min; /* rhclipmin 4x IP limit +-16383 */
float rdb_hdr_clip_max; /* rhclipmax 4x IP limit +-16383 */
float rdb_hdr_default_offset; /* rhdoffset default offset = 0 +-3.40282e38 */
float rdb_hdr_xoff; /* rhxoff scroll img in x +-256 */
float rdb_hdr_yoff; /* rhyoff scroll img in y +-256 */
float rdb_hdr_nwin; /* rhnwin hecho window width 0 - 256 */
float rdb_hdr_ntran; /* rhntran hecho trans width 0 - 256 */
float rdb_hdr_scalei; /* PS rhscalei +-3.40282e38 */
float rdb_hdr_scaleq; /* PS rhscaleq def = 0 +-3.40282e38 */
short rdb_hdr_rotation; /* RX 0 90 180 270 deg 0 - 3 */
short rdb_hdr_transpose; /* RX 0, 1 n / y transpose 0 - 1*/
short rdb_hdr_kissoff_views; /* rhblank zero image views 0 - 512 */
short rdb_hdr_slblank; /* rhslblank slice blank 3d 0 - 128 */
short rdb_hdr_gradcoil; /* RX 0=off 1=Schnk 2=Rmr 0 - 2 */
short rdb_hdr_ddaover; /* rhddaover unused */
short rdb_hdr_sarr; /* SARR bit mask 15 bits */
short rdb_hdr_fd_tr; /* SARR feeder timing info */
short rdb_hdr_fd_te; /* SARR feeder timing info */
short rdb_hdr_fd_ctrl; /* SARR control of feeder */
short rdb_hdr_algor_num; /* SARR df decimation ratio */
short rdb_hdr_fd_df_dec; /* SARR which feeder algor */
RDB_MULTI_RCV_TYPE rdb_hdr_dab[4]; /* rhdab0s rhdab0e st, stp rcv 0 - 15 */
float rdb_hdr_user0; /* rhuser0 +-3.40282e38 */
float rdb_hdr_user1; /* rhuser1 +-3.40282e38 */
float rdb_hdr_user2; /* rhuser2 +-3.40282e38 */
float rdb_hdr_user3; /* rhuser3 +-3.40282e38 */
float rdb_hdr_user4; /* rhuser4 +-3.40282e38 */
float rdb_hdr_user5; /* rhuser5 +-3.40282e38 */
float rdb_hdr_user6; /* rhuser6 +-3.40282e38 */
float rdb_hdr_user7; /* rhuser7 +-3.40282e38 */
float rdb_hdr_user8; /* rhuser8 +-3.40282e38 */
float rdb_hdr_user9; /* rhuser9 +-3.40282e38 */
float rdb_hdr_user10; /* rhuser10 +-3.40282e38 */
float rdb_hdr_user11; /* rhuser11 +-3.40282e38 */
float rdb_hdr_user12; /* rhuser12 +-3.40282e38 */
float rdb_hdr_user13; /* rhuser13 +-3.40282e38 */
float rdb_hdr_user14; /* rhuser14 +-3.40282e38 */
float rdb_hdr_user15; /* rhuser15 +-3.40282e38 */
float rdb_hdr_user16; /* rhuser16 +-3.40282e38 */
float rdb_hdr_user17; /* rhuser17 +-3.40282e38 */
float rdb_hdr_user18; /* rhuser18 +-3.40282e38 */
float rdb_hdr_user19; /* rhuser19 +-3.40282e38 */
long rdb_hdr_v_type; /* rhvtype bit mask 31 bits */
float rdb_hdr_v_coefxa; /* RX x flow direction control 0 - 4 */
float rdb_hdr_v_coefxb; /* RX x flow direction control 0 - 4 */
float rdb_hdr_v_coefxc; /* RX x flow direction control 0 - 4 */
float rdb_hdr_v_coefxd; /* RX x flow direction control 0 - 4 */
float rdb_hdr_v_coefya; /* RX y flow direction control 0 - 4 */
float rdb_hdr_v_coefyb; /* RX y flow direction control 0 - 4 */
float rdb_hdr_v_coefyc; /* RX y flow direction control 0 - 4 */
float rdb_hdr_v_coefyd; /* RX y flow direction control 0 - 4 */
float rdb_hdr_v_coefza; /* RX z flow direction control 0 - 4 */
float rdb_hdr_v_coefzb; /* RX z flow direction control 0 - 4 */
float rdb_hdr_v_coefzc; /* RX z flow direction control 0 - 4 */
float rdb_hdr_v_coefzd; /* RX z flow direction control 0 - 4 */
float rdb_hdr_vm_coef1; /* RX weight for mag image 1 0 - 1 */
float rdb_hdr_vm_coef2; /* RX weight for mag image 2 0 - 1 */
float rdb_hdr_vm_coef3; /* RX weight for mag image 3 0 - 1 */
float rdb_hdr_vm_coef4; /* RX weight for mag image 4 0 - 1 */
float rdb_hdr_v_venc; /* RX vel encodeing cm / sec 0.001 - 5000 */
float spectral_width; /* specwidth filter width kHz 500 - 3355432 */
short csi_dims; /* spectro */
short xcsi; /* rhspecrescsix 2 - 64 */
short ycsi; /* rhspecrescsiy 2 - 64 */
short zcsi; /* spectro */
float roilenx; /* RX x csi volume dimension */
float roileny; /* RX y csi volume dimension */
float roilenz; /* RX z csi volume dimension */
float roilocx; /* RX x csi volume center */
float roilocy; /* RX y csi volume center */
float roilocz; /* RX z csi volume center */
float numdwell; /* specdwells 0 - 3.40282e38*/
long rdb_hdr_ps_command; /* PS internal use only */
long rdb_hdr_ps_mps_r1; /* PS MPS R1 setting 1 - 7 */
long rdb_hdr_ps_mps_r2; /* PS MPS R2 setting 1 - 30 */
long rdb_hdr_ps_mps_tg; /* PS MPS Transmit gain setting 0 - 200*/
long rdb_hdr_ps_mps_freq; /* PS MPS Center frequency hz +-3.40282e38 */
long rdb_hdr_ps_aps_r1; /* PS APS R1 setting 1 - 7 */
long rdb_hdr_ps_aps_r2; /* PS APS R2 setting 1 - 30 */
long rdb_hdr_ps_aps_tg; /* PS APS Transmit gain setting 0 - 200*/
long rdb_hdr_ps_aps_freq; /* PS APS Center frequency hz +-3.40282e38 */
float rdb_hdr_ps_scalei; /* PS rational scaling +-3.40282e38 */
float rdb_hdr_ps_scaleq; /* PS unused */
long rdb_hdr_ps_snr_warning; /* PS noise test 0=16 1=32 bits 0, 1 */
long rdb_hdr_ps_aps_or_mps; /* PS prescan order logic 0 - 5 */
long rdb_hdr_ps_mps_bitmap; /* PS bit mask 4 bits*/
char rdb_hdr_ps_powerspec [256];/* PS */
long rdb_hdr_ps_filler1; /* PS filler */
long rdb_hdr_ps_filler2; /* PS filler */
float obsolete1[16]; /* PS mean noise each receiver +-3.40282e38 */
float obsolete2[16]; /* PS noise calc for muti rec +-3.40282e38 */
short halfecho; /* spectro full, half echo 0, 1 */
/* 858 bytes */
/* New fields 02-19-92 */
short rdb_hdr_im_size_y; /* rh???? 0 - 512 */
long rdb_hdr_data_collect_type1;/* rh???? bit mask 31 bits */
float rdb_hdr_freq_scale; /* rh???? freq k-space step +-3.40282e38 */
float rdb_hdr_phase_scale; /* rh???? freq k-space step +-3.40282e38 */
/* 14 bytes */
short rdb_hdr_ovl; /* rhovl - overlaps for MOTSA */
/* Phase Correction Control Param. */
short rdb_hdr_pclin; /* Linear Corr. 0:off, 1:linear, 2:polynomial */
short rdb_hdr_pclinnpts; /* fit number of points */
short rdb_hdr_pclinorder; /* fit order */
short rdb_hdr_pclinavg; /* linear phase corr avg 0:off, 1:on */
short rdb_hdr_pccon; /* Const Corr. 0:off, 1:Ky spec., 2:polyfit(2/ilv), 3:polyfit(1/ilv) */
short rdb_hdr_pcconnpts; /* fit number of points */
short rdb_hdr_pcconorder; /* fit order */
short rdb_hdr_pcextcorr; /* external correction file 0:don't use, 1: use */
short rdb_hdr_pcgraph; /* Phase Correction coef. image 0:off, 1:linear & constant */
short rdb_hdr_pcileave; /* Interleaves to use for correction: 0=all, 1=only first */
short rdb_hdr_hdbestky; /* bestky view for fractional Ky scan */
short rdb_hdr_pcctrl; /* phase correction research control */
short rdb_hdr_pcthrespts; /* 2..512 adjacent points */
short rdb_hdr_pcdiscbeg; /* 0..512 beginning point to discard */
short rdb_hdr_pcdiscmid; /* 0..512 middle point to discard */
short rdb_hdr_pcdiscend; /* 0..512 ending point to discard */
short rdb_hdr_pcthrespct; /* Threshold percentage */
short rdb_hdr_pcspacial; /* Spacial best ref scan index 0..512 */
short rdb_hdr_pctemporal; /* Temporal best ref scan index 0..512 */
short rdb_hdr_pcspare; /* spare for phase correction */
short rdb_hdr_ileaves; /* Number of interleaves */
short rdb_hdr_kydir; /* Ky traversal dircetion 0: top-down, 1:center out */
short rdb_hdr_alt; /* Alt read sign 0=no, 1=odd/even, 2=pairs */
short rdb_hdr_reps; /* Number of scan repetitions */
short rdb_hdr_ref; /* Ref Scan 0: off 1: on */
float rdb_hdr_pcconnorm; /* Constant S term normalization factor */
float rdb_hdr_pcconfitwt; /* Constant polyfit weighting factor */
float rdb_hdr_pclinnorm; /* Linear S term normalization factor */
float rdb_hdr_pclinfitwt; /* Linear polyfit weighting factor */
float rdb_hdr_pcbestky; /* Best Ky location */
/* VRG Filter param */
long rdb_hdr_vrgf; /* control word for VRG filter */
long rdb_hdr_vrgfxres; /* control word for VRGF final x resolution */
/* Bandpass Asymmetry Correction Param. */
long rdb_hdr_bp_corr; /* control word for bandpass asymmetry */
float rdb_hdr_recv_freq_s; /* starting frequency (+62.5) */
float rdb_hdr_recv_freq_e; /* ending frequency (-62.5) */
long rdb_hdr_hniter; /* Selects the number of
iterations used in homodyne processing */
long rdb_hdr_fast_rec; /* Added for homodyne II, tells if
teh fast receiver is being used
and the lpf setting of teh fast
receiver, 0: fast receiver off,
1 - 5: lpf settings */
long rdb_hdr_refframes; /* total # of frames for ref scan */
long rdb_hdr_refframep; /* # of frames per pass for a ref scan */
long rdb_hdr_scnframe; /* total # of frames for a entire scan */
long rdb_hdr_pasframe; /* # of frames per pass */
unsigned long rdb_hdr_user_usage_tag; /* for spectro */
unsigned long rdb_hdr_user_fill_mapMSW; /* for spectro */
unsigned long rdb_hdr_user_fill_mapLSW; /* for Spectro */
float rdb_hdr_user20; /* all following usercv are for spectro */
float rdb_hdr_user21;
float rdb_hdr_user22;
float rdb_hdr_user23;
float rdb_hdr_user24;
float rdb_hdr_user25;
float rdb_hdr_user26;
float rdb_hdr_user27;
float rdb_hdr_user28;
float rdb_hdr_user29;
float rdb_hdr_user30;
float rdb_hdr_user31;
float rdb_hdr_user32;
float rdb_hdr_user33;
float rdb_hdr_user34;
float rdb_hdr_user35;
float rdb_hdr_user36;
float rdb_hdr_user37;
float rdb_hdr_user38;
float rdb_hdr_user39;
float rdb_hdr_user40;
float rdb_hdr_user41;
float rdb_hdr_user42;
float rdb_hdr_user43;
float rdb_hdr_user44;
float rdb_hdr_user45;
float rdb_hdr_user46;
float rdb_hdr_user47;
float rdb_hdr_user48;
short rdb_hdr_pcfitorig; /* Adjust view indexes if set so bestky view = 0 */
short rdb_hdr_pcshotfirst; /* First view within an echo group used for fit */
short rdb_hdr_pcshotlast; /* Last view within an echo group used for fit */
short rdb_hdr_pcmultegrp; /* If = 1, force pts from other egrps to be used */
short rdb_hdr_pclinfix; /* If = 2, force slope to be set to pclinslope */
/* If = 1, neg readout slope = pos readout slope */
short rdb_hdr_pcconfix; /* If = 2, force slope to be set to pcconslope */
/* If = 1, neg readout slope = pos readout slope */
float rdb_hdr_pclinslope; /* Value to set lin slope to if forced */
float rdb_hdr_pcconslope; /* Value to set con slope to if forced */
short rdb_hdr_pccoil; /* If 1,2,3,4, use that coil's results for all */
/* Variable View Sharing */
short rdb_hdr_vvsmode; /* Variable view sharing mode */
short rdb_hdr_vvsaimgs; /* number of original images */
short rdb_hdr_vvstr; /* TR in microseconds */
short rdb_hdr_vvsgender; /* gender: male or female */
/* 3D Slice ZIP */
short rdb_hdr_zip_factor; /* Slice ZIP factor: 0=OFF, 2, or 4 */
/* Maxwell Term Correction Coefficients */
float rdb_hdr_maxcoef1a; /* Coefficient A for flow image 1 */
float rdb_hdr_maxcoef1b; /* Coefficient B for flow image 1 */
float rdb_hdr_maxcoef1c; /* Coefficient C for flow image 1 */
float rdb_hdr_maxcoef1d; /* Coefficient D for flow image 1 */
float rdb_hdr_maxcoef2a; /* Coefficient A for flow image 2 */
float rdb_hdr_maxcoef2b; /* Coefficient B for flow image 2 */
float rdb_hdr_maxcoef2c; /* Coefficient C for flow image 2 */
float rdb_hdr_maxcoef2d; /* Coefficient D for flow image 2 */
float rdb_hdr_maxcoef3a; /* Coefficient A for flow image 3 */
float rdb_hdr_maxcoef3b; /* Coefficient B for flow image 3 */
float rdb_hdr_maxcoef3c; /* Coefficient C for flow image 3 */
float rdb_hdr_maxcoef3d; /* Coefficient D for flow image 3 */
long rdb_hdr_ut_ctrl; /* System utility control variable */
short rdb_hdr_dp_type; /* EPI II diffusion control cv */
short rdb_hdr_arw; /* Arrhythmia rejection window(percentage:1-100)*/
short rdb_hdr_vps; /* View Per Segment for FastCine */
short rdb_hdr_mcReconEnable; /* N-Coil recon map */
float rdb_hdr_fov; /* Auto-NCoil */
long rdb_hdr_te; /* TE for first echo */
long rdb_hdr_te2; /* TE for second and later echoes */
float rdb_hdr_dfmrbw; /* BW for navigator frames */
long rdb_hdr_dfmctrl; /* Control flag for dfm (0=off, other=on)*/
long rdb_hdr_raw_nex; /* Uncombined NEX at start of recon */
long rdb_hdr_navs_per_pass; /* Max. navigator frames in a pass */
long rdb_hdr_dfmxres; /* xres of navigator frames */
long rdb_hdr_dfmptsize; /* point size of navigator frames */
long rdb_hdr_navs_per_view; /* Num. navigators per frame (tag table) */
long rdb_hdr_dfmdebug; /* control flag for dfm debug */
float rdb_hdr_dfmthreshold; /* threshold for navigator correction */
/* Section added to support gridding */
short rdb_hdr_grid_control; /* bit settings controlling gridding */
short rdb_hdr_b0map; /* B0 map enable and map size */
short rdb_hdr_grid_tediff; /* TE difference between b0 map arms */
short rdb_hdr_grid_motion_comp; /* flag to apply motion compensation */
float rdb_hdr_grid_radius_a; /* variable density transition */
float rdb_hdr_grid_radius_b; /* variable density transition */
float rdb_hdr_grid_max_gradient; /* Max gradient amplitude */
float rdb_hdr_grid_max_slew; /* Max slew rate */
float rdb_hdr_grid_scan_fov; /* Rx scan field of view */
float rdb_hdr_grid_a2d_time; /* A to D sample time microsecs */