ncigt-fil
Functions
Vendor Specific Functions: GE

Functions

int apply_epi_phase_ge (COMPLEX *k, int xres, int yres, int ncoils, DATA_OBJ *refdat, int expidir)
 
int apply_vrgf_ge (COMPLEX *k, int nz, int *sz, char *fname, COMPLEX **ko)
 
int correct_epi_phase_ge (COMPLEX *k, int xres, int yres, int ncoils, char *fname, int expidir)
 
void correct_fcard (SCAN_INFO hdr, COMPLEX *kspace_data)
 
int read_data_from_Pfile (SCAN_INFO *hdr, DATA_OBJ *rawframe, DATA_OBJ *vrgf, FILE *fid, char *buf, char *buf2, int slice, int vol, int nbaselines)
 
short read_data_ge (char **Pnames, int z, SCAN_INFO hdr, KCOORD *kline, KCOORD *kline_o, KCOORD *kline_e, COMPLEX *kspace_data)
 
short read_hdr_ge (char *Pname, SCAN_INFO *hdr_ptr)
 
int read_vrgf_ge (char *fname, int Nx, char endian, DATA_OBJ *H)
 

Detailed Description

Functions specific to GE MR scanners, mostly for reading files generated by GE scanners.

Function Documentation

int apply_epi_phase_ge ( COMPLEX *  k,
int  xres,
int  yres,
int  ncoils,
DATA_OBJ *  refdat,
int  expidir 
)

Applies EPI phase correction to the k-space data. The input data is assumed to be sized [ky kx c], where c can be coils, slices, etc. A linear and constant phase correction term should be provided in the 'refdat' object.

Parameters
kinput data to correct, of size [yres xres ncoils]
xresnumber of points along readout
yresnumber of points along phase-encode direction
ncoilsnumber of frames/coils
refdata data object derived from the ref.dat file
expidirthe direction of the applied shift. Choices are limited to +1 or -1.
int apply_vrgf_ge ( COMPLEX *  k,
int  nz,
int *  sz,
char *  fname,
COMPLEX **  ko 
)

Applies the VRGF correction matrix to EPI k-space data, to compensate for ramp-sampling during acquisition.

The VRGF data matrix is applied only to the first two dimensions of the input k-space data, i.e. the same matrix is applied to all coils and/or time frames.

DEPRECIATED: this function is to be replaced by read_vrgf_ge and correct_rampsamp

Parameters
kinput data to correct (output over-writes the input)
nznumber of dimension to the data
szan array holding the size of each data dimension. Holds the size of the output data matrix when the function successfully returns.
fnamethe filename holding the VRGF correction data (default: "vrgf.dat")
kooutput data
int correct_epi_phase_ge ( COMPLEX *  k,
int  xres,
int  yres,
int  ncoils,
char *  fname,
int  expidir 
)

Applies EPI phase correction to the k-space data. The input data is assumed to be sized [ky kx c], where c can be coils, slices, etc. A linear and constant phase correction term is read from the supplied ref.dat file, and applied to both odd and even lines to align them.

Parameters
kinput data to correct (output over-writes the input)
xresnumber of points along readout
yresnumber of points along phase-encode direction
ncoilsnumber of frames/coils
fnamethe filename holding the EPI phase correction data (default: "ref.dat")
expidirthe direction of the applied shift. Choices are limited to +1 or -1.
void correct_fcard ( SCAN_INFO  hdr,
COMPLEX *  kspace_data 
)

Fastcard sequences skip the first view of each segment, for the first cardiac phase. The reason has to do with the time it takes to detect an R wave, and that it would alread by too late to acquire the first view of the seg- ment. Fill-in the missing data using closest-neighbours.

Parameters
hdrStructure with scan info.
kspace_dataInput k-space data.
int read_data_from_Pfile ( SCAN_INFO *  hdr,
DATA_OBJ *  rawframe,
DATA_OBJ *  vrgf,
FILE *  fid,
char *  buf,
char *  buf2,
int  slice,
int  vol,
int  nbaselines 
)

A function to read raw data from a GE P-file. Will return data corresponding to a specific slice or volume, if requested.

Parameters
hdrthe scan information associated with the data
rawframethe output data buffer to fill
vrgfthe rampsamp correction data. set to NULL if not available or needed
fidFILE handle to read from
bufa pre-allocated scratch buffer of size: 2 * hdr.Nsl * hdr.ncoils * hdr.frame_size * (hdr.Ny+nbaselines) * sizeof(short)
buf2a pre-allocated (COMPLEX *) scratch buffer of size: hdr.Nsl * hdr.ncoils * hdr.frame_size * hdr.Ny * sizeof(DATATYPE) DATATYPE is declared by the 'type' field of rawframe. It can be "fltc" or "dblc" (the default)
slicethe slice number to read. set to -1 to read all slices.
volthe volume number (time point) to read
short read_data_ge ( char **  Pnames,
int  z,
SCAN_INFO  hdr,
KCOORD *  kline,
KCOORD *  kline_o,
KCOORD *  kline_e,
COMPLEX *  kspace_data 
)

Read the input k-space data from GE P-files, for cardiac applications with temporal encoding

Parameters
Pnamesan array of filename
hdrStructure with scan info.
kspace_datathe returned k-space data
short read_hdr_ge ( char *  Pname,
SCAN_INFO *  hdr_ptr 
)

Read the image scan header from a GE P file to find relevant imaging information.

Parameters
PnameName of the P file containing the header to be read.
hdr_ptrPointer to the structure where the info is to be stored.
int read_vrgf_ge ( char *  fname,
int  Nx,
char  endian,
DATA_OBJ *  H 
)

read in the GE ramp-sampling correction file. Use correct_rampsamp to apply to the measured data.

Parameters
fnamethe filename holding the VRGF correction data (default: "vrgf.dat" if passed a NULL)
Nxlength of readout data
endianendian-ness of the vrgf.dat file {'l','b'} [ little-endian by default ]
Hthe data object for the ramp-sampling correction operator. Memory will be allocated if the H.data memory is NULL.