MIRTio.jl Documentation
Contents
Overview
File I/O routines useful for the Michigan Image Reconstruction Toolbox (MIRT)
Index
MIRTio.MIRTioMIRTio.h5_get_ESCMIRTio.h5_get_RSSMIRTio.h5_get_attributesMIRTio.h5_get_ismrmrdMIRTio.h5_get_keysMIRTio.h5_get_kspaceMIRTio.header_exampleMIRTio.header_initMIRTio.header_readMIRTio.header_sizeMIRTio.header_stringMIRTio.header_writeMIRTio.loadpfileMIRTio.loadpfileMIRTio.loadpfileMIRTio.rdb_hdr_26_002_defMIRTio.read_rdb_hdrMIRTio.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
hdheader definition array (N × 3)
MIRTio.header_init — Methodht = header_init(hd::Matrix{Any})Return named tuple initialized with arbitrary values for testing
in
hdheader 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::IOStreamfrom open(file, "r")hdheader definition array (N × 3), e.g., fromheader_example()
option
seek0::Boolseek to0location in file first? defaulttrue
out
ht::NamedTuplewith header values, accessed by ht.key
MIRTio.header_size — Methodbytes = header_size(hd::Matrix{Any})return total size of header in bytes
in
hdheader 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::NamedTuplefromheader_init()orheader_read()
option
strip::Boolstrip 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::IOStreamfrom open(file, "w")ht::NamedTuplefromheader_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::Boolnon-verbosity, defaultfalse
out
dat::Array{Complex{Int16}}[ndat, ncoil, nslice, necho, nview]rdb_hdr::NamedTupleheader 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