Purpose

The ModifyRegion module offers operations to extend, shrink, or even move an image’s region.

To specify the modifications, either millimeters, voxels, or a percentage of the input box extensions can be used.

Usage

First, you have to connect an input image the modifications are to be applied to. Then you can specify the enlargement parameters, provide a clamping box and/or specify a common divisor for the x,y and z dimension. Press Update or enable Auto-Update to apply your changes.

Windows

Default Panel

../../../Modules/Macros/Geometry/mhelp/Images/Screenshots/ModifyRegion._default.png

Input Fields

The module has two inputs, the second one being optional.

input0

name: input0, type: Image

Input0 is the input image to be modified with respect to the new ROI on output0.

input1

name: input1, type: Image

Optional clamping region input

Output Fields

output0

name: output0, type: Image

Input0 in the Modified Region

Parameter Fields

Visible Fields

Parameter Interpretation

name: offsetMode, type: Enum, default: Millimeters

Parameter Interpretation: Here you can select whether the enlargement parameters are to be interpreted as mm, voxels, or a percentage of the overall extension.

Values:

Title Name
Millimeters Millimeters
Voxels Voxels
Percentage Percentage

Scalar Modifier

name: scalarModifier, type: Float, default: 0

Vector Modifier

name: vectorModifier, type: Vector3, default: 0 0 0

Box Modifier

name: boxModifier, type: String, default: 0 0 0 0 0 0 0 0 0 0 0 0

Make Overall Voxel Extensions dividable by:

name: voxelExtensionDivisor, type: Integer, default: 1, minimum: 1, maximum: 100

Here you can specify an integer number to make sure that the resulting voxel extensions have a common divisor, thus allowing simple resizing using the Scale3D operator.

Fit by

name: voxelExtensionMode, type: Enum, default: Shrinking

The Fit by parameter tells the operator whether to shrink or to enlarge the box to achieve this.

Values:

Title Name Deprecated Name
Shrinking Shrinking shrinking
Enlarging Enlarging enlarging

Clear

name: clear, type: Trigger

Clears the output

Apply

name: apply, type: Trigger, deprecated name: update

Updates the output

Auto-Apply

name: autoApply, type: Bool, default: TRUE, deprecated name: autoUpdate

Auto-Updates on all parameter/input changes

Up To Date

name: upToDate, type: Bool, persistent: no

Indicates if the current output is up-to-date and valid.

Enlargement Parameters

name: selectParameter, type: Enum, default: Scalar

Enlargement Parameters: You can select Scalar, Vector, or Box. By giving negative numbers, the box can be shrunk instead of enlarged. Additionally, a mere movement of the box can be achieved by giving a Box-value such as “5 5 5 0 0 0 5 5 5 0 0 0”.

Values:

Title Name Description
Scalar Scalar The input box is enlarged by the given amount in x-, y- and z-dimension.
Vector Vector The specified vector is subtracted from the first of the vectors defining the box, and added to the second (still only in x-, y- and z-dimension).
Box Box The specified box will be added component by component to the input box.

Fill regions outside of input image with gray value

name: fillValue, type: Float, default: 0

self-explanatory?

Clamp with Secondary Image Region (if Available)

name: useClampRegion, type: Bool, default: TRUE, deprecated name: useClampBox

If enabled, the input1 image region (if available) is used to restrict the modified region.

Hidden Fields

outWorldBox

name: outWorldBox, type: String, persistent: no, deprecated name: outBox

The output region in world coordinates. Should not be used since a world box without an image is ambiguous.