Purpose

The MultiFileVolumeListIteratorOutput allows traversing all indexes of imported volumes, either from a cache file or directly from a connected DirectDicomImport module.

This can be used to control other modules to operate on a selected amount of imported volumes. An example can be to save an amount of volumes withe ImageSave or MLImageFormatSave module by feeding file names from the Str Output field and by triggering save-buttons from the Trigger Output field.

The volumes to be traversed can be selected either with an expression or by a flag selecting all volumes.

For each traversed index an index field is updated as well as a string field which can be composed from different placeholders. These placeholder can be values from DICOM tags, image extent values and other specifications.

Windows

Default Panel

../../../Projects/MultiFileVolume/MLMultiFileVolumeListOutputs/Modules/mhelp/Images/Screenshots/MultiFileVolumeListIteratorOutput._default.png

Input Fields

inputAccessConnector

name: inputAccessConnector, type: MLBase

The connector to connect MultiFileVolumeListIteratorOutput with a DirectDicomImport module. If not connected the volume list can be read from a cache file alternatively. This can be switched with Use Base Input.

Parameter Fields

Field Index

annotate: Bool Iterate: Trigger String Output Expression: String
Auto Load Result Cache: Bool Iterate All: Bool tagDump: String
Cache File Path: String Iterate only on valid images: Bool tagDumpSize: Integer
Default Tag Value: String Load Result Cache: Trigger Trigger Output: Trigger
dumpPrivateTagValues: Bool Num Volumes: Integer Use Base Input: Bool
Idx Output: Integer numShownBinaryEntries: Integer Volume Indexes: String
Info: String outVolIdx: Integer volumeInfoDump: String
instanceName: String regExLineFilter: String  
issues: String Str Output: String  

Visible Fields

Use Base Input

name: useBaseInput, type: Bool, default: TRUE

If enabled then the volume is read from the DirectDicomImport module connected to the base input; otherwise the specified cache file is read.

Load Result Cache

name: loadResultCache, type: Trigger

Loads a volume list from cached result volume specified in Cache File Path.

Auto Load Result Cache

name: autoLoadResultCache, type: Bool, default: FALSE

If enabled then the cache file is loaded automatically from file.

Cache File Path

name: cacheFilePath, type: String

The path to a file containing a list of cached image volumes. It can be opened with Load Result Cache to read the volume list to be traversed.

Num Volumes

name: numVolumes, type: Integer, default: 0

Shows the number of volumes in the selected volume list. Indexes in the index list must not exceed values [0, Num Volumes-1] to avoid that traversal of indexes failes due to index errors.

Info

name: info, type: String, persistent: no

Shows information about the traversed indexes, errors, or the generated string values passed through the Str Output.

Iterate

name: iterate, type: Trigger

If notified then all indexes described with the fields Volume Indexes Iterate All, and Iterate only on valid images are traversed.

Iterate All

name: iterateAll, type: Bool, default: TRUE

If enabled then iteration is done on all indexes, otherwise indexes are determined from Volume Indexes.

Iterate only on valid images

name: iterateOnlyOnValidImgs, type: Bool, default: TRUE

If enabled then iteration is done on all indexes, otherwise indexes are determined from Volume Indexes. If disabled all described indexes are traversed.

Volume Indexes

name: volumeIndexes, type: String, default: 0-

This is the specification of indexes to be traversed when the Iterate button is notified. Note that indexes out of range are handled as error.

Separators between numbers can be spaces, commas, or semicolons, recommended are only spaces.

Examples:

  • 1-3 traverses indexes 1, 2, and 3.
  • 3-1 traverses indexes 3, 2, and 1.
  • 1- traverses indexes all available indexes starting with 1.
  • -3 traverses indexes 0, 1, 2, and 3.
  • 1 7 2 4 9- traverses indexes 1, 7, 2, 4, and all indexes starting with 9 and higher.

Note that indexes of volumes with invalid image information may not be suppressed if the check box Iterate only on valid images is enabled.

String Output Expression

name: stringOutputExpression, type: String, default: $(IDX)

Describes how Str Output is updated for each triggered index.

Examples:

  • $(IDX) inserts the current index.
  • $(IMGEXTX) inserts the x-extend of the connected image or 0 if volume has no valid image.
  • $(IMGEXTU) inserts the u-extend of the connected image or 0 if volume has no valid image.
  • $(IMGEXT) inserts the extend of the connected image in format ‘XxYxZxCxTxU’ or ‘0x0x0x0x0x0’ if volume has no valid image.
  • $(0IDX), $(0IMGEXTX), …, $(0IMGEXTU), $(0IMGEXT) do the same as their corresponding placeholders without ‘0’, however, all digits are padded with leading 0’s to have at least 5 digits.
  • $(TAGID(HIJK,LMNO)) inserts the value of the DICOM tag with the id (HIJK,LMNO) if available. (HIJK,LMNO) must be two hexadecimal numbers with each exactly 4 digits.
  • $(VOXTYPE) inserts the voxel data type of the volume.
  • $(FILETYPE) inserts a description of the imported file type such as DM-TIFF, MLIMAGE, DCM or so.

If the string values determined from DICOM tags, voxel or file types or so contain values normally not desired in file paths then they are replaced by ‘-’, or ‘.’ characters.

If any value cannot be determined then it is replaced with an empty string.

Default Tag Value

name: defaultTagValue, type: String

Value to be used for all tags whose values could not be determined.

Str Output

name: strOutput, type: String, persistent: no

When Iterate is notified then this field is updated on each traversed index with values described in String Output Expression before the Trigger Output field is notified. This field typically can be used to compose a file name and to pass this file name to a save module whose save operation is then triggered by the Trigger Output field.

Idx Output

name: idxOutput, type: Integer, persistent: no

When Iterate is notified then this field is updated on each traversed index to the value of the traversed index before the Trigger Output field is notified.

Trigger Output

name: triggerOutput, type: Trigger

This field is triggered for each traversed index when Iterate is notified. This is done after updating Str Output and Idx Output according to the current index value. This field typically can be used to start operations on inother modules with field connectins, for example to trigger save operations in save modules.

Hidden Fields

instanceName

name: instanceName, type: String, default: MultiFileVolumeListIteratorOutput

A unique name for the current module instance.

outVolIdx

name: outVolIdx, type: Integer, default: 0

Internal field which should not be used.

issues

name: issues, type: String

Internal field which should not be used.

tagDumpSize

name: tagDumpSize, type: Integer, default: 10000

Internal field which should not be used.

dumpPrivateTagValues

name: dumpPrivateTagValues, type: Bool, default: FALSE

numShownBinaryEntries

name: numShownBinaryEntries, type: Integer, default: 8

annotate

name: annotate, type: Bool, default: FALSE

regExLineFilter

name: regExLineFilter, type: String

tagDump

name: tagDump, type: String, persistent: no

Internal field which should not be used.

volumeInfoDump

name: volumeInfoDump, type: String, persistent: no

Internal field which should not be used.