NumpyPad

MLModule

author

Felix Thielke

package

FMEstable/ReleaseMeVis

dll

MLPythonImageProcessing

definition

NumpyPad.def

see also

SubImage, itkMirrorPadImageFilter

keywords

padding, image, constant, reflect, mirror, edge, wrap, symmetric

Purpose

The NumpyPad applies the selected numpy padding mode to the input image and outputs the padded image.

Windows

Default Panel

Input image that will be padded.

Parameter Fields

Field Index

Constant Values After: Vector6

Constant Values Before: Vector6

Padding at End: IntVector6

Padding at Start: IntVector6

Padding Mode: Enum

Reflect Mode: Enum

Configure per-axis padding width and behavior to control how new border values are generated.

Visible Fields

Padding at Start

name: paddingStart, type: IntVector6, default: 0 0 0 0 0 0

Number of voxels to add at the lower/start side of each axis (x, y, z, c, t, u).

Padding at End

name: paddingEnd, type: IntVector6, default: 0 0 0 0 0 0

Number of voxels to add at the upper/end side of each axis (x, y, z, c, t, u).

Padding Mode

name: paddingMode, type: Enum, default: constant

Padding mode passed to numpy.pad. Some modes use additional parameters such as Constant Values Before, Constant Values After, or Reflect Mode.

Values:

Title

Name

Description

Constant

constant

Pads with constant values defined by Constant Values Before and Constant Values After.

Edge

edge

Pads with the edge values of the array.

Linear Ramp

linear_ramp

Pads with a linear ramp between edge values and the configured end values.

Maximum

maximum

Pads with the maximum value from each axis edge region.

Mean

mean

Pads with the mean value from each axis edge region.

Median

median

Pads with the median value from each axis edge region.

Minimum

minimum

Pads with the minimum value from each axis edge region.

Reflect

reflect

Pads by reflecting the array at the edge; behavior is controlled by Reflect Mode.

Symmetric

symmetric

Pads symmetrically by mirroring including edge values.

Wrap

wrap

Pads with values wrapped from the opposite edge of the array.

Empty

empty

Pads with uninitialized values; output border content is undefined.

Reflect Mode

name: reflectMode, type: Enum, default: even

Sub-mode used for Padding Mode = Reflect to control whether edge values are repeated.

Values:

Title

Name

Description

Even

even

Reflection excludes repeating the edge element (numpy reflect_type='even').

Odd

odd

Reflection includes an odd-style mirror around the edge (numpy reflect_type='odd').

Constant Values Before

name: constantValuesBefore, type: Vector6, default: 0 0 0 0 0 0

Constant pad values for the lower/start side of each axis, used with Padding Mode = Constant.

Constant Values After

name: constantValuesAfter, type: Vector6, default: 0 0 0 0 0 0

Constant pad values for the upper/end side of each axis, used with Padding Mode = Constant.