etspy.base.CommonStack.trans_stack(xshift: float = 0.0, yshift: float = 0.0, angle: float = 0.0, interpolation: 'linear' | 'cubic' | 'nearest' | 'none' = 'linear') Self[source]

Create a copy of a Stack, transformed using the skimage Affine transform.

Parameters:
xshift: float = 0.0

Number of pixels by which to shift in the X dimension

yshift: float = 0.0

Number of pixels by which to shift the stack in the Y dimension

angle: float = 0.0

Angle in degrees by which to rotate the stack about the X-Y plane

interpolation: 'linear' | 'cubic' | 'nearest' | 'none' = 'linear'

Mode of interpolation to employ. Must be either 'linear', 'cubic', 'nearest' or 'none'. Note that 'nearest' and 'none' are equivalent. Default is 'linear'.

Returns:

out – Transformed copy of the input stack

Return type:

Self

Examples

>>> import etspy.datasets as ds
>>> stack = ds.get_needle_data()
>>> xshift = 10.0
>>> yshift = 3.5
>>> angle = -15.2
>>> transformed = stack.trans_stack(xshift, yshift, angle)
>>> transformed
<TomoStack, title: , dimensions: (77|256, 256)>