Purpose

Loads a single image from a directory or file of (almost) arbitrary type.

Usage

Select an input file or a directory containing only a single dataset and press ‘Open’ to provide the image at the output.

Details

This module only opens a single dataset for reading. If you have directories containing a large number of datasets, it is not possible to specify which one is used, so in this case use DirectDicomImport instead.

Windows

Default Panel

../../../Projects/ImageFromFile/Modules/mhelp/Images/Screenshots/ImageFromFile._default.png

Output Fields

outImage

name: outImage, type: Image

Opened image.

Parameter Fields

Field Index

Auto Update Mode: Enum True File Name: String
Busy: Bool Used: Enum
Close: Trigger  
Input File Mode: Enum  
Open: Trigger  
or: String  
Output Valid: Bool  
Status: String  

Visible Fields

Input File Mode

name: inputFileMode, type: Enum, default: AutoDetect

Mode for input file loading

Values:

Title Name Description
Auto-Detect AutoDetect Auto-Detect mode, first by file type (i.e. directory or file), then by extension.
Directory (e.g. Dicom) ImageDir Import a directory with image files, typically a directory with DICOM frames, using DirectDicomImport. Make sure there is only one datasets in the directory, because otherwise the one with the largest number of voxels will be selected. If you have directories with multiple datasets, please use DirectDicomImport directly.
MeVisLab file (ImageLoad) MLABFile MeVisLab image file that will be loaded with ImageLoad, i.e. .mlimage or a .dcm/.tif combination.
CML file used in DIAG CMLFile CML file as used in DIAG. Internally uses DirectDicomImport to load the actual image data.
Other file format OtherFile Other or unknown file type, will use LoadAny to try to load the file.
File for itkImageFileReader itkFile Any file to be read by the itkImageFileReader, e.g. *.mhd or *nii files.

Used

name: usedInputFileMode, type: Enum, persistent: no

Mode actually used for input file loading. See Input File Mode for description of the modes. ‘-’ means that the mode has not yet been detected (only happens on Open.

Values:

Title Name
Directory (e.g. Dicom) ImageDir
MeVisLab file (ImageLoad) MLABFile
CML file used in DIAG CMLFile
Other file format OtherFile
File for itkImageFileReader itkFile

Open

name: openInputFile, type: Trigger

Imports/opens/loads the specified input file.

Close

name: closeInputFile, type: Trigger

Close input file.

Auto Update Mode

name: autoUpdateMode, type: Enum, default: AutoClear

Select what happens if one of the input parameters changes.

Values:

Title Name
Auto-Close AutoClear
Auto-Open AutoUpdate

or

name: inputFileName, type: String

Path to the image(s)

True File Name

name: trueInputFileName, type: String, persistent: no, deprecated name: fileNameTrueName

The value of or after expansion and normalization.

Output Valid

name: hasValidImage, type: Bool, persistent: no

Indicates if the current output image is valid.

Status

name: statusMessage, type: String, persistent: no

Status after last operation.

Busy

name: busy, type: Bool, persistent: no

Indicates if the module is currently busy importing/opening.