SimpleResample

MacroModule

genre

Resample

author

Christian Schumann

package

FMEstable/ReleaseMeVis

definition

SimpleResample.def

see also

ImageResample, Scale3D, Resample3D

keywords

Rescale, Resample, voxel, size

Purpose

Fast anisotropic image resampling driven by voxel-size boundaries.

Usage

Connect an image to inImage, enable applyResampling, define min and max voxel size per dimension, and choose force behavior for each dimension.

Details

The module computes integer scaling factors per dimension and applies up to two passes (down-sampling then up-sampling). If min and max boundaries cannot both be met exactly due to integer factors, the selected force enum value defines which boundary has priority.

Input Fields

Input image to be resampled.

inImage

name: inImage, type: Image

Image data including voxel size metadata.

Output Fields

Resampled image or bypassed input image.

outImage

name: outImage, type: Image

Resampling result. If applyResampling is FALSE, this is the unchanged input image.

Parameter Fields

Field Index

Adapt Internally: Bool

Down Scale Factor Z: Integer

minImageSize: Integer

Adapt Output: Bool

Force (forceMinMaxX): Enum

Target Size X: Integer

Apply Resampling: Bool

Force (forceMinMaxY): Enum

Target Size Y: Integer

Border Fill Value: Double

Force (forceMinMaxZ): Enum

Target Size Z: Integer

Border Handling: Enum

Max (maxVoxelSizeX): Float

Up Sample Mode: Enum

Change Datatype: Bool

Max (maxVoxelSizeY): Float

Up Scale Factor X: Integer

Datatype: Enum

Max (maxVoxelSizeZ): Float

Up Scale Factor Y: Integer

Down Sample Mode: Enum

Min (minVoxelSizeX): Float

Up Scale Factor Z: Integer

Down Scale Factor X: Integer

Min (minVoxelSizeY): Float

Down Scale Factor Y: Integer

Min (minVoxelSizeZ): Float

Voxel-size constraints, interpolation settings, datatype conversion, and page-size controls.

Visible Fields

Apply Resampling

name: applyResampling, type: Bool, default: TRUE

Master switch. If FALSE, no resampling is performed.

Min (minVoxelSizeX)

name: minVoxelSizeX, type: Float, default: 1, minimum: 0.1

Lower voxel-size boundary for X.

Max (maxVoxelSizeX)

name: maxVoxelSizeX, type: Float, default: 2, minimum: 0.1

Upper voxel-size boundary for X.

Force (forceMinMaxX)

name: forceMinMaxX, type: Enum, default: forceMin

Priority mode in X when both boundaries cannot be met exactly with integer factors.

Values:

Title

Name

Description

Min

forceMin

Prefer meeting minVoxelSizeX.

Max

forceMax

Prefer meeting maxVoxelSizeX.

None

forceNone

Disable resampling in X.

Min (minVoxelSizeY)

name: minVoxelSizeY, type: Float, default: 1, minimum: 0.1

Lower voxel-size boundary for Y.

Max (maxVoxelSizeY)

name: maxVoxelSizeY, type: Float, default: 2, minimum: 0.1

Upper voxel-size boundary for Y.

Force (forceMinMaxY)

name: forceMinMaxY, type: Enum, default: forceMin

Priority mode in Y when both boundaries cannot be met exactly with integer factors.

Values:

Title

Name

Description

Min

forceMin

Prefer meeting minVoxelSizeY.

Max

forceMax

Prefer meeting maxVoxelSizeY.

None

forceNone

Disable resampling in Y.

Min (minVoxelSizeZ)

name: minVoxelSizeZ, type: Float, default: 1, minimum: 0.1

Lower voxel-size boundary for Z.

Max (maxVoxelSizeZ)

name: maxVoxelSizeZ, type: Float, default: 2, minimum: 0.1

Upper voxel-size boundary for Z.

Force (forceMinMaxZ)

name: forceMinMaxZ, type: Enum, default: forceMin

Priority mode in Z when both boundaries cannot be met exactly with integer factors.

Values:

Title

Name

Description

Min

forceMin

Prefer meeting minVoxelSizeZ.

Max

forceMax

Prefer meeting maxVoxelSizeZ.

None

forceNone

Disable resampling in Z.

Down Sample Mode

name: downSampleMode, type: Enum, default: Nearest neighbor

Interpolation filter for down-sampling.

Values:

Title

Name

Nearest neighbor

Nearest neighbor

Linear

Linear

Cubic B-Spline

Cubic B-Spline

Lanczos 2

Lanczos 2

Lanczos 3

Lanczos 3

Up Sample Mode

name: upSampleMode, type: Enum, default: Nearest neighbor

Interpolation filter for up-sampling.

Values:

Title

Name

Nearest neighbor

Nearest neighbor

Linear

Linear

Cubic B-Spline

Cubic B-Spline

Lanczos 2

Lanczos 2

Lanczos 3

Lanczos 3

Border Handling

name: borderHandling, type: Enum, default: Extend border

Border handling for interpolation filters.

Values:

Title

Name

Fill

Fill

Extend border

Extend border

Border Fill Value

name: borderFillValue, type: Double, default: 0

Constant border value used when borderHandling is Fill.

Change Datatype

name: changeDatatype, type: Bool, default: FALSE

Enable output datatype conversion.

Datatype

name: datatype, type: Enum, default: unsigned int8

Target datatype used when changeDatatype is enabled.

Values:

Title

Name

int8

int8

unsigned int8

unsigned int8

int16

int16

unsigned int16

unsigned int16

int32

int32

unsigned int32

unsigned int32

float

float

double

double

int64

int64

unsigned int64

unsigned int64

complexf

complexf

complexd

complexd

quaternionf

quaternionf

quaterniond

quaterniond

vecf2

vecf2

vec2

vec2

vecf3

vecf3

vec3

vec3

vecf4

vecf4

vec4

vec4

vecf5

vecf5

vec5

vec5

vecf6

vecf6

vec6

vec6

vecf7

vecf7

vec7

vec7

vecf8

vecf8

vec8

vec8

vecf9

vecf9

vec9

vec9

vecf10

vecf10

vec10

vec10

vecf16

vecf16

vec16

vec16

vecf32

vecf32

vec32

vec32

vecf64

vecf64

vec64

vec64

matf2

matf2

mat2

mat2

matf3

matf3

mat3

mat3

matf4

matf4

mat4

mat4

matf5

matf5

mat5

mat5

matf6

matf6

mat6

mat6

Vector2i8

Vector2i8

Vector2i16

Vector2i16

Vector2i32

Vector2i32

Vector2i64

Vector2i64

Vector3i8

Vector3i8

Vector3i16

Vector3i16

Vector3i32

Vector3i32

Vector3i64

Vector3i64

Vector4i8

Vector4i8

Vector4i16

Vector4i16

Vector4i32

Vector4i32

Vector4i64

Vector4i64

Vector5i8

Vector5i8

Vector5i16

Vector5i16

Vector5i32

Vector5i32

Vector5i64

Vector5i64

Vector6i8

Vector6i8

Vector6i16

Vector6i16

Vector6i32

Vector6i32

Vector6i64

Vector6i64

Vector7i8

Vector7i8

Vector7i16

Vector7i16

Vector7i32

Vector7i32

Vector7i64

Vector7i64

Vector8i8

Vector8i8

Vector8i16

Vector8i16

Vector8i32

Vector8i32

Vector8i64

Vector8i64

Vector9i8

Vector9i8

Vector9i16

Vector9i16

Vector9i32

Vector9i32

Vector9i64

Vector9i64

Vector10i8

Vector10i8

Vector10i16

Vector10i16

Vector10i32

Vector10i32

Vector10i64

Vector10i64

Vector16i8

Vector16i8

Vector16i16

Vector16i16

Vector16i32

Vector16i32

Vector16i64

Vector16i64

Vector32i8

Vector32i8

Vector32i16

Vector32i16

Vector32i32

Vector32i32

Vector32i64

Vector32i64

Vector64i8

Vector64i8

Vector64i16

Vector64i16

Vector64i32

Vector64i32

Vector64i64

Vector64i64

Adapt Internally

name: modifyPageSizesInternal, type: Bool, default: TRUE, deprecated name: modifyPageSizes

If true, the page size used for internal computation is changed.

Adapt Output

name: modifyPageSizesOutput, type: Bool, default: FALSE

If true, the page size of the output is changed.

Target Size X

name: maxPageSizeX, type: Integer, default: 256

Target maximum page size in X when page-size adaptation is enabled.

Target Size Y

name: maxPageSizeY, type: Integer, default: 256

Target maximum page size in Y when page-size adaptation is enabled.

Target Size Z

name: maxPageSizeZ, type: Integer, default: 64

Target maximum page size in Z when page-size adaptation is enabled.

Up Scale Factor X

name: upScaleFactorX, type: Integer, persistent: no

Computed up-sampling factor for X (read-only).

Up Scale Factor Y

name: upScaleFactorY, type: Integer, persistent: no

Computed up-sampling factor for Y (read-only).

Up Scale Factor Z

name: upScaleFactorZ, type: Integer, persistent: no

Computed up-sampling factor for Z (read-only).

Down Scale Factor X

name: downScaleFactorX, type: Integer, persistent: no

Computed down-sampling factor for X (read-only).

Down Scale Factor Y

name: downScaleFactorY, type: Integer, persistent: no

Computed down-sampling factor for Y (read-only).

Down Scale Factor Z

name: downScaleFactorZ, type: Integer, persistent: no

Computed down-sampling factor for Z (read-only).

Hidden Fields

minImageSize

name: minImageSize, type: Integer, default: 10

Dimensions with voxel count less than or equal to this threshold are not resampled.