vreg.Volume3D.stretch#

Volume3D.stretch(stretch, values=False, reshape=False)[source]#

Stretch the volume.

Parameters:
  • stretch (array-like) – 3-element stretch vector with strictly positive dimensionless values (1 = no stretch).

  • values (bool, optional) – If set to True, the values are transformed. Otherwise the affine is transformed. Defaults to False.

  • reshape (bool, optional) – When values=True, reshape=False will retain the shape and location of the volume. With reshape=True, the volume will be reshaped to fit the transformed values. This keyword is ignored when values=False. Defaults to False.

Returns:

transformed volume.

Return type:

vreg.Volume3D