AutoImage

MacroModule
genre File
author MeVis Medical Solutions AG
package MeVisLab/Standard
definition FileHandling.def
see also Downsample3D
keywords downsample, preview, cache, load, save, resample, memory

Purpose

The module AutoImage automatically generates or updates a downsampled version of the input image and saves it into an image file.

It can be used to maintain preview versions of images, e.g. for selecting a region of interest in an application. Once the preview image has been generated, it is automatically used without recomputation.

The location at which the resulting image is stored can be either relative to the input image (e.g. in a subdirectory) or at an absolute path. The name of the image is derived from the input file name with an additional extension inserted.

Currently, the AutoImage module only generates downsampled images. Future versions may extend the functionality to also generate MIP previews or other renderings of the input image.

Usage

The File Location section contains fields that define the location at which the automatically generated target image is stored. The source file path from which the target file path is derived can be specified explicitly using the Source Name field. If this field is left empty, the source file path is taken from the input image’s DICOM file path. The Target Directory specifies the directory containing the target file, either as a subdirectory relative to the source path or as an absolute path. Path variables, such as $(LOCAL) or $(MODULES), can be used. The field Target Suffix contains an additional suffix inserted in the target name, and the field Target Name contains the resulting target file path.

The Downsample section contains fields that specify the method used to generate the target image (see the description of Downsample3D for details).

The Auto update setting in the Output Image section determines whether the target image is updated or generated automatically whenever a new input image is provided or the target image location changes. The Update can be used to update or generate the target image manually. After updating the target image, it is immediately opened and presented at the macro module’s outImage field. The Close button closes the output image. The Status and the Is up to date field reflect the status of the target image.

Windows

Default Panel

../../../Modules/Macros/FileHandling/mhelp/Images/Screenshots/AutoImage._default.png

Input Fields

inImage

name: inImage, type: Image, deprecated name: imageIn

The inImage input field provides the input image from which the downsampled output image is generated.

Output Fields

outImage

name: outImage, type: Image, deprecated name: imageOut

The outImage output field presents the downsampled output image.

Parameter Fields

Field Index

Allow interpolation: Bool Source Name: String
Auto update: Bool Status: String
Close: Trigger statusTab: Enum
Is up to date: Bool Target Comment: String
Limit: Float Target Directory: String
Method: Enum Target Name: String
progress: Float Target Suffix: String
Restriction: Enum Update: Trigger

Visible Fields

Source Name

name: sourceName, type: String

Sets the path of the input image file. If empty, the input image’s DICOM file path is used.

Target Directory

name: targetDir, type: String, default: autoimg

Sets the directory at which the target image is stored, either as a subdirectory relative to the source path, or as an absolute path. If the directory does not exist, it is created automatically when the target image is generated.

Target Suffix

name: targetSuffix, type: String, default: .preview1

Sets an additional file suffix identifying the target file.

Target Name

name: targetName, type: String, persistent: no

Shows the resulting file path of the target image file.

Target Comment

name: targetComment, type: String, default: MeVisLab AutoImage

Sets a string that is stored in the comment tag of the image.

Auto update

name: autoUpdate, type: Bool, default: FALSE

If checked, the target image is updated/generated whenever a new input image is provided or the target file location changes.

Update

name: update, type: Trigger

If pressed, update of the target image is forced.

Close

name: close, type: Trigger

If pressed, the output image is closed.

Is up to date

name: isUptodate, type: Bool, persistent: no

If checked, the target image is up-to-date.

Status

name: status, type: String, persistent: no

Shows the status of the target image.

Restriction

name: restriction, type: Enum, default: MaxMBytesIsotropic

Defines target image restrictions.

Compare with Downsample3D.

Values:

Title Name Deprecated Name
Max Voxels Per Dim MaxVoxelsPerDim MAX_VOXELS_PER_DIM
Max MBytes Isotropic MaxMBytesIsotropic MAX_MBYTES_ISOTROPIC
Max MBytes Cubic MaxMBytesCubic MAX_MBYTES_CUBIC
Max MBytes Uniform MaxMBytesUniform MAX_MBYTES_UNIFORM
Min Voxel Dist MinVoxelDist MIN_VOXEL_DIST

Limit

name: limit, type: Float, default: 10

Sets a restriction value.

Compare with Downsample3D.

Allow interpolation

name: interpolate, type: Bool, default: FALSE

If checked, an interpolation is allowed.

Compare with Downsample3D.

Method

name: method, type: Enum, default: Nearest_Neighbor

Defines an interpolation method.

Compare with Downsample3D.

Values:

Title Name
Nearest Neighbor Nearest_Neighbor
Triangle/Linear Triangle/Linear
Hermite Hermite
Blackman Blackman
Hamming Hamming
Hanning Hanning
Gaussian Gaussian
Bell/Quadratic Bell/Quadratic
Cubic B-Spline Cubic_B-Spline
Catrom Catrom
Mitchell et al Mitchell_et_al
Trunc Sinc 4 Trunc_Sinc_4
Lanczos 2 Lanczos_2
Lanczos 3 Lanczos_3
Lanczos 4 Lanczos_4
Box NNB Box_NNB

Hidden Fields

progress

name: progress, type: Float, persistent: no

statusTab

name: statusTab, type: Enum, default: Status

Values:

Title Name
Status Status
Progress Progress