Pad/Crop

Node Icon

Pad or crop an input image or mask.

Example 1 Pad the input with 20 voxels in the positive and negative i and j directions:
Method: Add/Subtract, Pad/Crop i: [20, 20], Pad/Crop j: [20, 20], Pad/Crop k: [0, 0]

Example 2 Pad positive and i direction with 20 voxels and crop the negative i direction with 20 voxels:
Method: Add/Subtract, Pad/Crop i: [-20, 20], Pad/Crop j: [0, 0], Pad/Crop k: [0, 0]

Example 3 Set the new size to [192, 192, 192]:
Method: New Size, New Size: [192, 192, 192]

Inputs

Input

Input Mask or Image.

Type: Mask, Image, List, Required, Single

Outputs

Output

Input Mask or Image.

Type: Mask, Image, List

Settings

Output Size

Method Selection

Select method for defining output size.

Values: Add/Subtract, New Size

Pad/Crop i Integers

Pad or crop in the i direction.

Pad/Crop j Integers

Pad or crop in the j direction.

Pad/Crop k Integers

Pad or crop in the k direction.

New Size 3D Vector

Set output size. The result will be symmetrically padded or cropped in each dimension.

Pad Method

Pad Method Selection

Select the padding method.

Constant inserts the specified Pad Value into added voxels.

Mirror mirrors the padded dimension so the output is [..., end-2, end-1, end, end-1, end-2, ...].

Repeat repeats the padded dimension so the output is [..., end-2, end-1, end, end, end, ...].

Values: Constant, Mirror, Repeat

Pad Value Float

Set the value of the padded voxels.

See also

Keywords: