deepmr.rosette#
- deepmr.rosette(shape, nviews=None, bending_factor=1.0)[source]#
 Design a rosette trajectory.
The rosette petals are rotated by a pseudo golden angle with period 377 interelaves. Rotations are performed both along
viewandcontrastdimensions. Acquisition is assumed to traverse thecontrastdimension first and then theview, i.e., all the contrasts are acquired before moving to the second view. If multiple echoes are specified, final contrast dimensions will have lengthncontrasts * nechoes.- Parameters:
 shape (Iterable[int]) – Matrix shape
(in-plane, contrasts=1, echoes=1).nviews (int, optional) – Number of spokes. The default is
$\pi$ * shape[0]ifshape[1] == 1, otherwise it is1.bending_factor (float, optional) – This is
0.0for radial-like trajectory; increase for maximum coverage per shot. In real world, must account for hardware and safety limitations. The default is1.0.
- Returns:
 head – Acquisition header corresponding to the generated sampling pattern.
- Return type:
 Header
Example
>>> import deepmr
We can create a Nyquist-sampled rosette trajectory for an in-plane matrix of
(128, 128)pixels by:>>> head = deepmr.rosette(128)
An undersampled trajectory can be generated by specifying the
nviewsargument:>>> head = deepmr.rosette(128, nviews=64)
Petals bending can be modified via
bending_factor:>>> head = deepmr.rosette(128, bending_factor=1.0) # radial-like trajectory
Multiple contrasts with different sampling (e.g., for MR Fingerprinting) can be achieved by providing a tuple of ints as the
shapeargument:>>> head = deepmr.rosette((128, 420)) >>> head.traj.shape torch.Size([420, 1, 128, 2])
corresponding to 420 different contrasts, each sampled with a different single radial spoke of 128 points. Similarly, multiple echoes (with fixed sampling) can be specified as:
>>> head = deepmr.rosette((128, 1, 8)) # 8 echoes >>> head.traj.shape torch.Size([8, 402, 128, 2])
corresponding to a 8-echoes fully sampled k-spaces, e.g., for QSM and T2* mapping.
Notes
The returned
head(deepmr.Header()) is a structure with the following fields:- shape (torch.Tensor):
 This is the expected image size of shape
(nz, ny, nx).
- t (torch.Tensor):
 This is the readout sampling time
(0, t_read)inms. with shape(nsamples,).
- traj (torch.Tensor):
 This is the k-space trajectory normalized as
(-0.5 * shape, 0.5 * shape)with shape(ncontrasts, nviews, nsamples, 2).
- dcf (torch.Tensor):
 This is the k-space sampling density compensation factor with shape
(ncontrasts, nviews, nsamples).
- TE (torch.Tensor):
 This is the Echo Times array.