MIRTio.jl Documentation
Contents
Overview
File I/O routines useful for the Michigan Image Reconstruction Toolbox (MIRT)
Index
MIRTio.MIRTio
MIRTio.h5_get_ESC
MIRTio.h5_get_RSS
MIRTio.h5_get_attributes
MIRTio.h5_get_ismrmrd
MIRTio.h5_get_keys
MIRTio.h5_get_kspace
MIRTio.header_example
MIRTio.header_init
MIRTio.header_read
MIRTio.header_size
MIRTio.header_string
MIRTio.header_write
MIRTio.loadpfile
MIRTio.loadpfile
MIRTio.loadpfile
MIRTio.rdb_hdr_26_002_def
MIRTio.read_rdb_hdr
MIRTio.read_rdb_hdr
Functions
MIRTio.MIRTio
— ModuleMIRTio
I/O routines for Michigan Image Reconstruction Toolbox (MIRT)
MIRTio.h5_get_ESC
— Methodesc = h5_get_ESC(filename::String; T::DataType = ComplexF32)
Return Array
of ESC (emulated single coil) data from file.
HDF5.jl reads the data differently than Python's h5py. This is significant because the fastMRI paper says that the datasets have certain dimensionality, but the dimensions are permuted in Julia compared to Python, hence the calls to permutedims
in the following functions.
MIRTio.h5_get_RSS
— Methodrss = h5_get_RSS(filename::String; T::DataType = ComplexF32)
Return Array
of RSS (root sum of squares) data from file.
MIRTio.h5_get_attributes
— Methodattr = h5_get_attributes(filename::String)
Get attributes attr
from file. Returns a Dict
MIRTio.h5_get_ismrmrd
— Methodhdr = h5_get_ismrmrd(filename::String)
Get ISMRM header data from file. Returns a ?
MIRTio.h5_get_keys
— Methodkeys = h5_get_keys(filename::String)
Get keys
from file using keys()
. Returns an Array{String}
MIRTio.h5_get_kspace
— Methodkspace = h5_get_kspace(filename::String; T::DataType = ComplexF32))
Return Array
of kspace data from file.
MIRTio.header_example
— Methodhd = header_example()
Return example of header description
out
hd
header definition array (N × 3)
MIRTio.header_init
— Methodht = header_init(hd::Matrix{Any})
Return named tuple initialized with arbitrary values for testing
in
hd
header definition array (N × 3), e.g., fromheader_example()
out
ht::NamedTuple
MIRTio.header_read
— Methodht = header_read(fid::IOStream, hd::Matrix{Any} ; seek0::Bool)
Read header from scan file
in
fid::IOStream
from open(file, "r")hd
header definition array (N × 3), e.g., fromheader_example()
option
seek0::Bool
seek to0
location in file first? defaulttrue
out
ht::NamedTuple
with header values, accessed by ht.key
MIRTio.header_size
— Methodbytes = header_size(hd::Matrix{Any})
return total size of header in bytes
in
hd
header definition array (N × 3), e.g., fromheader_example()
out = bytes::Int
MIRTio.header_string
— Methodht = header_string(ht::NamedTuple ; strip::Bool)
Convert each Array{Cuchar}
to String
in NamedTuple
in
ht::NamedTuple
fromheader_init()
orheader_read()
option
strip::Bool
strip tail white space characters from strings? defaultfalse
out
ht::NamedTuple
MIRTio.header_write
— Methodheader_write(fid::IOStream, ht::NamedTuple)
Write header to fid
in
fid::IOStream
from open(file, "w")ht::NamedTuple
fromheader_init()
orheader_read()
MIRTio.loadpfile
— Method(dat, rdb_hdr) = loadpfile(fid::IOStream ; ...)
Load data for one or more echoes from GE MRI scan Pfile.
in
fid::IOStream
option
coils::AbstractVector{Int}
only get data for these coils; default: all coils
echoes::AbstractVector{Int}
only get data for these echoes; default: all echoes
slices::AbstractVector{Int}
only get data for these slices; default: 2:nslices
(NB!) because first slice (dabslice=0 slot) may contain corrupt data.
views::AbstractVector{Int}
only get data for these views; default: all views
quiet::Bool
non-verbosity, defaultfalse
out
dat::Array{Complex{Int16}}
[ndat, ncoil, nslice, necho, nview]
rdb_hdr::NamedTuple
header information
To save memory the output type is complex-valued Int16.
MIRTio.loadpfile
— Method(dat, rdb_hdr) = loadpfile(file, echo::Integer ; ...)
Load a single echo from file
.
MIRTio.loadpfile
— Method(dat, rdb_hdr) = loadpfile(file::String ; ...)
Load from file
.
MIRTio.rdb_hdr_26_002_def
— Methodhd = rdb_hdr_26_002_def()
Return array [Symbol Int DataType] ? × 3
used in header_read()
MIRTio.read_rdb_hdr
— Methodht = read_rdb_hdr(fid::IOStream)
Read GE raw (RDB) header for MRI scans
Returns NamedTuple ht
with header values accessible by ht.key
MIRTio.read_rdb_hdr
— Methodht = read_rdb_hdr(file::String)
Read from file