ddd_pylib.image_manip.

TypeCastOperator#

class ddd_pylib.image_manip.TypeCastOperator[source]#

Bases: ImageOperator

Change the data type of an image. It uses a target type given as a string that defines the type to which the image should be casted. If the target type has a maximum value under the maximum value of the image, it will be downcast either by clipping or by scaling, the downcasting rule can be chosen.

Methods

static defaultDowncastRule()[source]#
static defaultTargetType()[source]#
getDowncastRule()[source]#

Return a string that define the downcast rule used

Return type:

str

getPrefix()[source]#

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

Return type:

str

getTargetType()[source]#

Give the target type in which the image was/will be downcasted as a string

setDowncastRule(rule)[source]#

Set the downcast rule using the rule parameter

Parameters:

rule – The downcast rule that will be used

setTargetType(target)[source]#

Use the target parameter to set the target type

Parameters:

target – String defining the target type