SubImage¶
-
MLModule
¶ genre Subimage
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLBasicModules
definition mlBasicModules.def see also Magnify
,VecBoxConvert
,DecomposeVector3
,GetVoxelValue
keywords crop
,box
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’:
- 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).
- Every voxel overlapping this box by an area greater than a small epsilon will be included in the output image. Thus, a world box is most robustly defined by providing voxel centers.
- A special case is the one where for the given world start/end positions w1 and w2, w1[i] == w2[i] for any spatial dimension i. The extent of that dimension is zero, which - following rule 2 strictly - would result in an invalid output image. However, by convention, such a box results in a valid image of extent 1 for each such dimension with w1[i] == w2[i].
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.
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¶
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.
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 | Deprecated Name | Description |
---|---|---|---|
Voxel Start & Size | VoxelStartSize | voxel origin+size | A starting point and a size in voxel coordinates need to be specified. |
Voxel Start & End | VoxelStartEnd | voxel start+end | A starting and an ending point in voxel coordinates need to be specified. |
World Start & End (Image Axis Aligned) | WorldStartEndImageAxisAligned | WorldStartEnd | 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. | |
Voxel Start & End Offset | VoxelStartEndOffset | Interprets the given start and end values as offsets relative to the input image extents. Thus this mode allows to extend or crop an existing volume by a given offset, e.g. start 2 2 2 0 0 0 and end -2 -2 -2 0 0 0 will crop the volume by 2 voxels in x,y and z. |