Purpose

The module SubImage extracts subimages from its input image.

A SubImage module can also create a region larger than the input image.

Details

Some details on the Mode 'WorldStartEndImageAxisAligned':

  1. Note that this mode does NOT interpret the world positions as corners of a box that is world-axis aligned (e.g. like a CSO bounding box), but image-axis aligned (thus the long title).
  2. Every voxel touched by more than epsilon for any epsilon>0 by the so-defined box will be included in the output image. Thus, a world box is most robustly defined by providing voxel centers.
  3. A special case is the one where for the given world start/end positions w1 and w2, w1[i] == w2[i] for any dimension i. In this case, the extent of that dimension will be zero rather than 1 despite condition 2 (by convention, such a box is not empty but of extent 1).

Tips

The update of the output image of this module depends on the Apply/Apply Box buttons and the Auto Apply/ Auto Apply Box checkboxes.

If no auto apply is set, the SubImage module still does an explicit apply on each input image change. This means that the output image of the module is recalculated from the module's coordinate fields whenever the input image changes.

Windows

Default Panel

../../../Modules/ML/MLBasicModules/mhelp/Images/Screenshots/SubImage._default.png

Input Fields

input0

name: input0, type: Image

Output Fields

output0

name: output0, type: Image

Parameter Fields

Field Index

Always clamp to input image region: Bool Full Size: Trigger U (u): Double
Apply: Trigger Mode: Enum U (modifyU): Bool
Apply Box: Trigger Sc: Double X (x): Double
Auto Apply: Bool St: Double X (modifyX): Bool
Auto Apply Box: Bool Su: Double Y (y): Double
Auto-correct for negative subimage extents: Bool Sx: Double Y (modifyY): Bool
Box Input: String Sy: Double Z (z): Double
C (c): Double Sz: Double Z (modifyZ): Bool
C (modifyC): Bool T (t): Double  
Fill Value: Double T (modifyT): Bool  

Visible Fields

Box Input

name: boxInput, type: String, default: 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1

Sets a box string whose first 6 components represent one corner point and are used to fill the 'start' fields, and the second 6 the other corner point or the boxes extent (depending on Mode), filling the 'size/end' fields.

Apply Box

name: applyBox, type: Trigger, deprecated name: updateFromBoxInput

If pressed, the currently specified box is used.

Auto Apply Box

name: autoApplyBox, type: Bool, default: FALSE, deprecated name: autoUpdateFromBoxInput

If checked, the currently specified is used on any field change.

Auto-correct for negative subimage extents

name: correctForNegativeSubImageExtents, type: Bool, default: FALSE

If disabled (default), any input that results in an output box with negative extents (v1[i] > v2[i] for any component i) will result in an invalidated output image. If enabled, the components of the output subimage box are sorted so that v1 <= v2 in all components.

Note that empty boxes can still occur for the voxel modes if the size is exactly 0, or if Always clamp to input image region is enabled and the box lies entirely outside of the input image.

Always clamp to input image region

name: enableBoxClamping, type: Bool, default: FALSE

If enabled, the input image can only be cropped, but never extended. Thus, the Fill Value has no effect in this case. Default: disabled.

X (x)

name: x, type: Double, default: 0

Sets the start x-coordinate of the subimage.

Sx

name: sx, type: Double, default: 32

Sets the size or end x-coordinate of the subimage.

X (modifyX)

name: modifyX, type: Bool, default: TRUE

If checked, the x-extent can be modified.

Y (y)

name: y, type: Double, default: 0

Sets the start y-coordinate of the subimage.

Sy

name: sy, type: Double, default: 32

Sets the size or end y-coordinate of the subimage.

Y (modifyY)

name: modifyY, type: Bool, default: TRUE

If checked, the y-extent can be modified.

Z (z)

name: z, type: Double, default: 0

Sets the start z-coordinate of the subimage.

Sz

name: sz, type: Double, default: 32

Sets the size or end z-coordinate of the subimage.

Z (modifyZ)

name: modifyZ, type: Bool, default: TRUE

If checked, the z-extent can be modified.

C (c)

name: c, type: Double, default: 0

Sets the start c-coordinate of the subimage.

Sc

name: sc, type: Double, default: 1

Sets the size or end c-coordinate of the subimage.

C (modifyC)

name: modifyC, type: Bool, default: FALSE

If checked, the c-extent can be modified.

T (t)

name: t, type: Double, default: 0

Sets the start t-coordinate of the subimage.

St

name: st, type: Double, default: 1

Sets the size or end t-coordinate of the subimage.

T (modifyT)

name: modifyT, type: Bool, default: TRUE

If checked, the t-extent can be modified.

U (u)

name: u, type: Double, default: 0

Sets the start u-coordinate of the subimage.

Su

name: su, type: Double, default: 1

Sets the size or end u-coordinate of the subimage.

U (modifyU)

name: modifyU, type: Bool, default: FALSE

If checked, the u-extent can be modified.

Fill Value

name: fillValue, type: Double, default: 0

Sets a fill value that is used for all empty regions in case the output image extends to regions not covered by the input image.

Mode

name: mode, type: Enum, default: VoxelStartSize

Defines the mode in that the size of the subimage is specified.

Values:

Title Name Description
Voxel Start & Size VoxelStartSize A starting point and a size in voxel coordinates need to be specified.
Voxel Start & End VoxelStartEnd A starting and an ending point in voxel coordinates need to be specified.
World Start & End (Image Axis Aligned) WorldStartEndImageAxisAligned Like VoxelStartEnd mode, but the start and end coordinate are to be given in world coordinates. Note that this mode does NOT interpret the world positions as corners of a box that is world-axis aligned (e.g. like a CSO bounding box), but image-axis aligned (thus the long title). Also, every voxel touched by more than epsilon for any epsilon>0 by the so-defined box will be included in the output image, so such a world box is most robustly defined by providing voxel centers.
Voxel Center & Width VoxelCenterWidth A middle point and size in voxel coordinates.

Auto Apply

name: autoApply, type: Bool, default: FALSE

If checked, the module computes anew on any field change.

Apply

name: apply, type: Trigger

If pressed, the module computes anew.

Full Size

name: fullSize, type: Trigger, deprecated name: getProperties

If pressed, all fields are set to the full values of the input image.