-
Michiel Cottaar authoredMichiel Cottaar authored
Using implemented sequences
Usage
MRIBuilder comes with several sequences pre-defined.
Each sequence can be created through a simple function call.
To get help on a specific sequence, either follow the link in the sequence list below or type ?<function_name>
in Julia.
When reading the help, you will notice that there are two type of expected inputs:
-
Parameters
: these define the type of components that will be includes, e.g., the shape of the excitation pulse or the readout strategy. These parameters have to be set to certain fixed values. If unset, they will be determined by their default value as defined in the documentation. -
Variables
: These are a special type of parameters. In addition to being set to a fixed value, they can also be set to:min
or:max
to minimise or maximise the variable. If they are unset, they will be determined based on the other variables. For more details, see the section on sequence optimisation.
As an example, the following creates and plots a DiffusionSpinEcho
that has a b-value of 1, a minimal echo time, and a slice thickness of 2 mm:
using MRIBuilder
using CairoMakie
sequence = DiffusionSpinEcho(bval=1., TE=:min, slice_thickness=2)
f = plot(sequence)
f
save("dwi_1_min_2.png", f) # hide
nothing # hide
If we want a specific diffusion_time
, we can just add it to the constraints, and the rest of the sequence will adapt as needed:
using MRIBuilder # hide
using CairoMakie # hide
sequence = DiffusionSpinEcho(bval=1., diffusion_time=80, TE=:min, slice_thickness=2)
f = plot(sequence)
f
save("dwi_1_80_min_2.png", f) # hide
nothing # hide
We can even directly set some aspect of one of the sequence components, such as slowing down the gradient rise_time
and the additional constraint will just be included in the sequence optimisation:
using MRIBuilder # hide
using CairoMakie # hide
sequence = DiffusionSpinEcho(bval=1., diffusion_time=80, TE=:min, slice_thickness=2, gradient=(rise_time=15, ))
f = plot(sequence)
f
save("dwi_1_80_min_2_15.png", f) # hide
nothing # hide
Note that the previous sequences do not contain a realistic readout.
Most sequences will only include an instant readout, unless you directly set the voxel_size
and resolution
.
using MRIBuilder # hide
using CairoMakie # hide
sequence = DiffusionSpinEcho(bval=1., TE=:min, voxel_size=2, resolution=(20, 20, 20))
f = plot(sequence)
f
save("dwi_1_80_min_2_15_epi.png", f) # hide
nothing # hide
Available sequences
CollapsedDocStrings = true
Modules = [
MRIBuilder.Sequences,
MRIBuilder.Sequences.GradientEchoes,
MRIBuilder.Sequences.SpinEchoes,
MRIBuilder.Sequences.DiffusionSpinEchoes,
]