Skip to content

cornucopia.kspace

This module contains transforms that operate in k-space (Fourier space).

ApplyArrayCoilTransform

ApplyArrayCoilTransform(sens, **kwargs)

Bases: FinalTransform

Apply coil sensitivities to an image and combine across coils.

Parameters:

Name Type Description Default
sens (K, *spatial) tensor

Complex coil sensitivities

required

Other Parameters:

Name Type Description
returns [(list | dict) of] {'input', 'sos', 'uncombined', 'sens', 'netsens'}

Default is 'uncombined'.

  • 'sos': Sum of square combined (magnitude) image
  • 'uncombined': Uncombined (complex) coil images
  • 'sens': Uncombined (complex) coil sensitivities
  • 'netsens': Net (magnitude) coil sensitivity

ArrayCoilTransform

ArrayCoilTransform(ncoils=8, fwhm=0.5, diameter=0.8, jitter=0.01, unit='fov', shape=4, sos=True, *, shared=True, **kwargs)

Bases: NonFinalTransform

Generate and apply random coil sensitivities (real or complex)

Parameters:

Name Type Description Default
ncoils int

Number of complex receiver channels

8
fwhm float

Width of each receiver profile

0.5
diameter float

Diameter of the ellipsoid on wich receivers are centered

0.8
jitter float

Amount of jitter off the ellipsoid

0.01
unit (fov, vox)

Unit of fwhm, diameter, jitter

'fov'
shape [list of] int

Number of control points for the underlying smooth component.

4

Other Parameters:

Name Type Description
returns [(list | dict) of] {'input', 'sos', 'uncombined', 'sens', 'netsens'}

Default is 'uncombined'.

  • 'sos': Sum of square combined (magnitude) image
  • 'uncombined': Uncombined (complex) coil images
  • 'sens': Uncombined (complex) coil sensitivities
  • 'netsens': Net (magnitude) coil sensitivity
shared (channels, tensors, channels + tensors, '')

Whether to share the sensitivities across channels/tensors

Final class-attribute instance-attribute

Final = ApplyArrayCoilTransform

The transform type returned by make_final.

Next class-attribute instance-attribute

Next = ApplyArrayCoilTransform

The transform type returned by make_final.

SumOfSquaresTransform

SumOfSquaresTransform(*, returns=None, append=False, prefix=True, include=None, exclude=None, consume=None)

Bases: FinalTransform

Compute the sum-of-squares across coils/channels

IntraScanMotionFinalTransform

IntraScanMotionFinalTransform(motion, patterns, sens=None, axis=-1, freq=False, **kwargs)

Bases: FinalTransform

Apply pre-computed intra-scan motion

Parameters:

Name Type Description Default
motion FinalTransform

A transform that applies the motion to an image

required
patterns tensor

Binary tensor of shape (N, X) indicating which frequencies/slices are acquired in each shot. N is the number of shots, X is the number of frequencies/slices along the motion axis.

required
sens FinalTransform

A transform that generates a set of complex sensitivity profiles.

None
axis int

Axis along which shots are acquired (slice or phase-encode)

-1
freq bool

Motion happens across a phase-encode direction, which means that the k-space is build from pieces with different object position. This typically happens in "3D" acquisitions. If False, motion happens along the slice direction ("2D" acquisition).

False

IntraScanMotionTransform

IntraScanMotionTransform(shots=4, axis=-1, freq=True, pattern='sequential', translations=0.1, rotations=15, sos=True, coils=None, *, shared='channels', **kwargs)

Bases: NonFinalTransform

Model intra-scan motion

Parameters:

Name Type Description Default
shots int

Number of acquisition shots. The object is in a different position in each shot.

4
axis int

Axis along which shots are acquired (slice or phase-encode)

-1
freq bool

Motion happens across a phase-encode direction, which means that the k-space is build from pieces with different object position. This typically happens in "3D" acquisitions. If False, motion happens along the slice direction ("2D" acquisition).

True
pattern (sequential, random)

k-space (or slice) sampling pattern. This argument encodes the frequencies (or slices) that are acquired in each shot. The 'sequential' options assumes that frequencies are acquired in order. The 'random' option assumes that frequencies are randomly distributed across shots.

'sequential'
translations Sampler or float

Sampler (or upper-bound) for random translations (in % of FOV)

0.1
rotations Sampler or float

Sampler (or upper-bound) for random rotations (in deg)

15
sos bool

Whether to return the sum-of-squares combined image across coils.

True
coils Transform

A transform that generates a set of complex sensitivity profiles

None

Other Parameters:

Name Type Description
returns [(list | dict) of] {'input', 'sos', 'uncombined', 'sens', 'netsens', 'flow', 'matrix', 'pattern'}

Default is 'sos'

  • 'sos': Sum of square combined (magnitude) image (C, X, Y, Z)
  • 'uncombined': Uncombined (complex) coil images (K, X, Y, Z)
  • 'sens': Uncombined (complex) coil sensitivities (K, X, Y, Z)
  • 'netsens': Net (magnitude) coil sensitivity (1, X, Y, Z)
  • 'flow': Displacement field in each shot (N, 3, X, Y, Z)
  • 'matrix': Rigid matrix in each shot (N, 4, 4)
  • 'pattern': Frequencies acquired in each shot (N, X)
shared (channels, tensors, channels + tensors, '')

Whether to share the parameters across channels/tensors

Final class-attribute instance-attribute

Final = IntraScanMotionFinalTransform

The transform type returned by make_final.

Next class-attribute instance-attribute

Next = IntraScanMotionFinalTransform

The transform type returned by make_final.

SmallIntraScanMotionTransform

SmallIntraScanMotionTransform(translations=0.05, rotations=5, axis=-1, *, shared='channels', **kwargs)

Bases: IntraScanMotionTransform

Model intra-scan motion that happens once across k-space

Parameters:

Name Type Description Default
translations Sampler or float

Sampler (or upper-bound) for random translations (in % of FOV)

0.05
rotations Sampler or float

Sampler (or upper-bound) for random rotations (in deg)

5
axis int

Axis along which shots are acquired (slice or phase-encode)

-1

Other Parameters:

Name Type Description
shared (channels, tensors, channels + tensors, '')