TestPattern

MLModule
genre Generators
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLBasicModules
definition mlBasicModules.def
see also ImageSave
inherits from ConstantImage
keywords image, ramp, gradient, example

Purpose

The module TestPattern creates a test image with a certain size, page size, data type, and a special pattern.

Usage

Define your parameters for the new image, press the Apply button. Then you can either view the image in a viewer or save it with the ImageSave operator.

Details

This module does not support integer vector types as output data type for any pattern that generates a ramp.

Windows

Default Panel

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

Output Fields

output0

name: output0, type: Image

The generated pattern image.

Parameter Fields

Field Index

Apply: Trigger Gradient: Vector3 X (sizeX): Integer
Auto: Bool Off Diagonal: Vector3 X (pageSizeX): Integer
C (sizeC): Integer Pattern: Enum Y (sizeY): Integer
C (pageSizeC): Integer T (sizeT): Integer Y (pageSizeY): Integer
Data Type: Enum T (pageSizeT): Integer Z (sizeZ): Integer
Eigenvalues: Vector3 U (sizeU): Integer Z (pageSizeZ): Integer
Fill Value 1: String U (pageSizeU): Integer  
Fill Value 2: String Voxel Size: Vector3  

Visible Fields

X (sizeX)

name: sizeX, type: Integer, default: 256, minimum: 1, maximum: 1.07374e+09, deprecated name: XSize

Sets the x-extent of the output image.

see also ConstantImage.sizeX

Y (sizeY)

name: sizeY, type: Integer, default: 256, minimum: 1, maximum: 1.07374e+09, deprecated name: YSize

Sets the y-extent of the output image.

see also ConstantImage.sizeY

Z (sizeZ)

name: sizeZ, type: Integer, default: 1, minimum: 1, maximum: 1.07374e+09, deprecated name: ZSize

Sets the z-extent of the output image.

see also ConstantImage.sizeZ

C (sizeC)

name: sizeC, type: Integer, default: 1, minimum: 1, maximum: 1.07374e+09, deprecated name: CSize

Sets the c-extent of the output image.

see also ConstantImage.sizeC

T (sizeT)

name: sizeT, type: Integer, default: 1, minimum: 1, maximum: 1.07374e+09, deprecated name: TSize

Sets the t-extent of the output image.

see also ConstantImage.sizeT

U (sizeU)

name: sizeU, type: Integer, default: 1, minimum: 1, maximum: 1.07374e+09, deprecated name: USize

Sets the u-extent of the output image.

see also ConstantImage.sizeU

Data Type

name: dataType, type: Enum, default: unsigned int8, deprecated name: Datatype

Defines the data type of the output image.

The two fill values Fill Value 1 and Fill Value 2 need to be in the data type’s range.

see also ConstantImage.dataType

Fill Value 1

name: fillValue, type: String, default: 0, deprecated name: FillExtValue

Sets the first value used for pattern calculation.

Normally used as minimum value of the output image.

see also ConstantImage.fillValue

Apply

name: apply, type: Trigger, deprecated name: Apply

If pressed, the output of the module is being updated.

see also ConstantImage.apply

Auto

name: autoApply, type: Bool, default: FALSE, deprecated name: AutoApply

If checked, the module updates its output on any field change.

see also ConstantImage.autoApply

Pattern

name: pattern, type: Enum, default: XStripes, deprecated name: Mode

Defines the pattern that is being generated by the module.

Values:

Title Name Deprecated Name Description
XStripes XStripes x stripes Fine stripes in x direction.
YStripes YStripes y stripes Fine stripes in y direction.
XYStripes XYStripes xy stripes Fine stripes in x and y direction.
Page Checkers PageCheckers pagecheckers The pages are colored like a chess board.
Page Border PageBorder pageborder

The resulting image will have Fill Value 1 at the high and low page border in x, y and z dimension, but only if the page size in that dimension is higher than 2, otherwise borders are omitted for that dimension.

Incomplete pages will have their high border drawn at the image border.

Image Border ImageBorder imageborder The resulting image will have Fill Value 1 at its high and low image borders in the x and y dimension, Fill Value 2 everywhere else.
XRamp XRamp x ramp A simple linear ramp from Fill Value 1 to Fill Value 2 along the x dimension.
YRamp YRamp y ramp A simple linear ramp from Fill Value 1 to Fill Value 2 along the y dimension.
ZRamp ZRamp   A simple linear ramp from Fill Value 1 to Fill Value 2 along the z dimension.
CRamp CRamp   A simple linear ramp from Fill Value 1 to Fill Value 2 along the c dimension.
TRamp TRamp   A simple linear ramp from Fill Value 1 to Fill Value 2 along the t dimension.
URamp URamp   A simple linear ramp from Fill Value 1 to Fill Value 2 along the u dimension.
XYBorder Center XYBorderCenter xy border and center Same as ImageBorder, with an additional dot in the middle of the (3D) image.
Corners Midpoints CornersMidpoints corners and midpoints The corner voxels and all middle voxels on the surface of the 3D cube have Fill Value 1, all others have Fill Value 2.
Filled Max Ellipsoid FilledMaxEllipsoid filled max. ellipsoid

The image is filled with Fill Value 1 within the maximum ellipsoid fitting in the volume of the image, and with Fill Value 2 in the remaining area.

This works in 2D and 3D.

Page Checkers Gray PageCheckersGray   The pages are colored like a chess board with different values starting in the upper left corner with Fill Value 1.
Volume Ramp VolumeRamp  

The relative position of a component of a voxel position in the interval [1, Image Extent D] where D is the dimension of the component is scaled to [0,1].

All values for all components are multiplied and scaled to the range [Fill Value 1, Fill Value 2] and written into the image.

The appearance is a continuous ramp through the entire volume, dark at the origin and bright at the maximum extent of the image.

Index Ramp IndexRamp  

All voxels of the image are labeled with increasing indices linearly from position (0,0,0,0,0,0) up to the image extent.

The indices are scaled to the range [Fill Value 1, Fill Value 2] and written into the image.

The appearance is a continuous ramp through the entire volume, dark at the origin and bright at the maximum extent of the image.

Empty Empty   The entire image is filled with Fill Value 1 and [Fill Value 1, Fill Value 2] are defined as minimum and maximum voxel value of the image.
Page Ids PageIds   The voxel values in the pages are set to the id of the corresponding pages and the minimum/maximum values of the image are set to [0, NumPageIds].
XYRadial Ramp XYRadialRamp  

The voxel values increase with an increasing angle between the first dimension and the vector that points from the voxel to the image center.

The appearance is a continuous radial ramp centered at the image center.

XZRadial Ramp XZRadialRamp  

The voxel values increase with an increasing angle between the first dimension and the vector that points from the voxel to the image center.

The appearance is a continuous radial ramp centered at the image center.

YZRadial Ramp YZRadialRamp  

The voxel values increase with an increasing angle between the first dimension and the vector that points from the voxel to the image center.

The appearance is a continuous radial ramp centered at the image center.

Diag Quadratic Form DiagQuadraticForm  

The voxel values in the pages are computed employing parameters of a quadratic form (Gradient and Eigenvalues):

f(x,y,z) = Fill Value 1 + < Gradient | (x,y,z)> + < Eigenvalues | (x^2,y^2,z^2)> for visualization and test of Hesse matrix analysis

Note that the quadratic forms do not set proper min and max values as these are hard to determine in advance for general parameter settings.

Please use a MinMaxScan after a TestPattern generating quadratic forms. Quadratic forms make more sense with signed int or floating point data types. There is a special example for this mode.

Full Quadratic Form FullQuadraticForm  

The voxel values in the pages are computed employing parameters of a quadratic form (Gradient, Eigenvalues and Off Diagonal):

f(x,y,z) = Fill Value 1 + < Gradient | (x,y,z)> + < Eigenvalues | (x^2,y^2,z^2)> + 2*(offDiag_x * x*y + offDiag_y * y*z + offDiag_z * x*z)

Note that the quadratic forms do not set proper min and max values, as these are hard to determine in advance for general parameter settings.

Please use a MinMaxScan after a TestPattern generating quadratic forms. Quadratic forms make more sense with signed int or floating point data types. There is a special example for this mode.

Voxel Size

name: voxelSize, type: Vector3, default: 1 1 1

Sets the distance between voxel centers.

Gradient

name: gradient, type: Vector3, default: 0 0 0

Sets a gradient value used in DiagQuadraticForm and FullQuadraticForm patterns.

Eigenvalues

name: eigenValues, type: Vector3, default: 1 0 -1

Sets eigen values used in DiagQuadraticForm and FullQuadraticForm patterns.

Off Diagonal

name: offDiagonalElements, type: Vector3, default: 0 0 0

Sets off diagonal elements used in FullQuadraticForm pattern.

Fill Value 2

name: fillValue2, type: String, default: 255, deprecated name: FillExtValue2

Sets the second value used for pattern calculation.

Normally used as maximum value of the output image.

X (pageSizeX)

name: pageSizeX, type: Integer, default: 32, minimum: 1, maximum: 32768, deprecated name: XPageSize

Sets the x-extent of the page size of the output image.

Y (pageSizeY)

name: pageSizeY, type: Integer, default: 32, minimum: 1, maximum: 32768, deprecated name: YPageSize

Sets the y-extent of the page size of the output image.

Z (pageSizeZ)

name: pageSizeZ, type: Integer, default: 1, minimum: 1, maximum: 32768, deprecated name: ZPageSize

Sets the z-extent of the page size of the output image.

C (pageSizeC)

name: pageSizeC, type: Integer, default: 1, minimum: 1, maximum: 32768, deprecated name: CPageSize

Sets the c-extent of the page size of the output image.

T (pageSizeT)

name: pageSizeT, type: Integer, default: 1, minimum: 1, maximum: 32768, deprecated name: TPageSize

Sets the t-extent of the page size of the output image.

U (pageSizeU)

name: pageSizeU, type: Integer, default: 1, minimum: 1, maximum: 32768, deprecated name: UPageSize

Sets the u-extent of the page size of the output image.