ddd_pylib.image_manip.

RescaleOperator#

class ddd_pylib.image_manip.RescaleOperator[source]#

Bases: ImageOperator

Applies rescaling to the input image based on the specified scale factors for each axis and the chosen interpolation method. The time axis cannot be rescaled. Different interpolation methods are available, including ‘Nearest’, ‘Linear’, and ‘Cubic’.

Methods

static defaultInterpolation()[source]#
Return type:

str

static defaultScale()[source]#
Return type:

dict

getInterpolation()[source]#

Return the active interpolation method

Return type:

str

getPrefix()[source]#

Prefix added to the input image name to generate the output image name.

Return type:

str

getScale()[source]#

Return the new scale in which the image will be rescaled

Return type:

dict

sanityCheck()[source]#

Simple check to prevent simple error, it may be implemented in subclasses to check more precise stuff

setInterpolation(interpolation)[source]#

Set the interpolation method.

Parameters:

interpolation (str) – ‘Nearest’, ‘Linear’, or ‘Cubic’

setScale(scale)[source]#

Set the scale factor of each dimensions

Parameters:

scale (dict) – Dictionary with axis as keys and their scale factor as values