Purpose

The module ImageLoad opens an image file stored in one of the following formats:

  • DICOM
  • TIFF
  • DICOM/TIFF
  • RAW
  • LUMISYS
  • PNM
  • Analyze
  • PNG
  • JPEG
  • MLImageFileFormat.

Usage

The image file is opened by entering its path and name in the Filename field or by clicking the Browse button and selecting a file in the file open dialog. The Status field indicates, whether a file could be successfully opened. In case of an error, a more detailed error message is printed to the MeVisLab console.

When an image file could be opened, the Main tab view contains information about its content (file format, image size, data type and range and image comment).

The Close button closes the current file, the Load button can be used to re-open it.

Details

The following file formats are recognized.

Format Description
DICOM Supports uncompressed 2D and 3D (single file multiframe) DICOM files. Some variants of compressed files are also supported. For accessing lookup tables and/or color palettes stored in the DICOM file, use the DicomLUT and DicomPaletteLUT modules.
TIFF Supports tile and strip organization, compression, 2D and 3D.
DICOM/TIFF See explanation below (Notes on the DICOM/TIFF format).
RAW Supports raw binary data files representing images of arbitrary size, dimension and type (see explanation in the Parameter Fields section).
LUMISYS Supports some variants of image files created by Lumisys scanners (experimental).
PNM Supports raw binary and ASCII variants of 2D PNM, PGM or PPM files.
Analyze Supports the Analyze 7.5 format, consisting of a header file (*.hdr) and a raw binary data file (*.img). The format supports 2D, 3D and 4D images.
PNG The Portable Network Graphics (PNG) format supports 2D gray and RGB images up to 16 bit per sample, with or without alpha channel, with or without lossless compression.
JPEG The wide-spread JPEG standard supports 8-bit 2D gray and RGB images with lossy compression. Lossless compression, 12-bit and JPEG-2000 are not supported.
BMP The wide-spread Windows bitmap format supports 8-bit 2D RGB and palette images. Compressed BMP images are not supported.
MLImageFileFormat The ML specific file format written by MLImageFormatSave and MLImageFormatFileCache.

Notes on the DICOM/TIFF format

In order to store 3D and 4D images efficiently, MeVisLab uses pairs of TIFF and DICOM image files. Both parts of a DICOM/TIFF pair must have the same path and file name with different extensions of .dcm and .tif, resp. The TIFF file contains the image data, while the DICOM file contains all related information (e.g. patient, modality, acquisition details, image position and orientation, etc.). A DICOM/TIFF pair is automatically recognized when either of the two files is selected as input file.

If the TIFF file contains data of a datatype that is not supported by the DICOM standard (i.e. int32, uint32 and float), the datatype specified in the DICOM file is ignored. This allows to read (u)int32 or float images stored as DICOM/TIFF by the ImageSave module.

Windows

Default Panel

../../../Modules/ML/MLImageFile/mhelp/Images/Screenshots/ImageLoad._default.png

Output Fields

The module has one output containing the image loaded from the disk.

output0

name: output0, type: Image

Contains the image loaded from the disk.

Parameter Fields

Field Index

Auto Load: Bool filenameInfo: String sizeX: Integer
Byte Order: Enum format: String sizeY: Integer
C: Integer Load File: Trigger sizeZ: Integer
Calculate check sum: Bool maxValue: Double Status: String
Close File: Trigger minValue: Double suppressErrorLog: Bool
colorSpace: String Page Size: IntVector6 T: Integer
comment: String Page Size Hint: IntVector6 U: Integer
Data Offset: Integer Planar Config: Enum X: Integer
Data Type: Enum readRaw: Bool Y: Integer
dataType: String sizeC: Integer Z: Integer
dicomIgnoreHalfVoxelShift: Bool sizeT: Integer  
Filename: String sizeU: Integer  

By Category

Main

The Main tab view contains information about the content of the file (file format, image size, data type and range, color space and image comment).

Read Raw

A RAW image file contains uncompressed binary pixel or voxel values, without any header information. In order to open a raw image file, it is necessary to specify, how the binary data contained in the file should be interpreted. This can be done using the fields in the Read Raw tab view. After changing any of the Read Raw settings, the image must be re-opened by clicking the Load button.

Page Size

In some cases it may be desirable to open an image using a specific page size. Usually, the page size is dependent on the image file format and the properties stored within the file. Some file formats, however, allow opening an image in several or even arbitrary page sizes (e.g. the RAW format), in which case the output page size may be controlled using the Page Size Hint field. When loading MLImageFormat files this hint will be ignored.

Visible Fields

Filename

name: filename, type: String

Sets the file name of the image file to open it.

The file name can also be browsed by pressing the Browse button.

Load File

name: load, type: Trigger

If pressed, the current file is being re-opened.

Auto Load

name: autoLoad, type: Bool, default: TRUE

If checked, the image is loaded on all field changes and on loading a network.

Close File

name: close, type: Trigger

If pressed, the current file is being closed.

Status

name: status, type: String, persistent: no

Shows the status of the module.

X

name: rawX, type: Integer, default: 1, deprecated name: XRaw

Sets the image size in x-dimension.

Y

name: rawY, type: Integer, default: 1, deprecated name: YRaw

Sets the image size in y-dimension.

Z

name: rawZ, type: Integer, default: 1, deprecated name: ZRaw

Sets the image size in z-dimension.

C

name: rawC, type: Integer, default: 1, deprecated name: CRaw

Sets the image size in c-dimension.

T

name: rawT, type: Integer, default: 1, deprecated name: TRaw

Sets the image size in t-dimension.

U

name: rawU, type: Integer, default: 1, deprecated name: URaw

Sets the image size in u-dimension.

Data Type

name: dataTypeRaw, type: Enum, default: unsigned int8

Defines the data type.

Values:

Title Name Deprecated Name
unsigned int8 unsigned int8 UInt8
int8 int8 Int8
unsigned int16 unsigned int16 UInt16
int16 int16 Int16
unsigned int32 unsigned int32 UInt32
int32 int32 Int32
unsigned int64 unsigned int64  
int64 int64  
float float Float
double double  

Planar Config

name: planarConfig, type: Enum, default: Contiguous

Defines the color plane configuration.

Values:

Title Name Description
Contiguous Contiguous The color components are expected to be arranged like RGBRGBRGB….
Separate Separate The color components are expected to be arranged like RRRR… GGGG… BBBB…….

Byte Order

name: byteOrder, type: Enum, default: LittleEndian

Defines the byte order.

Values:

Title Name Deprecated Name Description
Little Endian LittleEndian Little endian Values are stored in the order low-byte - high-byte.
Big Endian BigEndian Big endian Values are stored in the order high-byte - low-byte.
Native Native   The byte order used by the CPU (little endian for Intel CPUs, big endian for 68K and PPC CPUs).

Data Offset

name: dataOffset, type: Integer, default: 0

Sets the number of leading bytes before the actual image data start.

Page Size Hint

name: pageSizeHint, type: IntVector6, default: 0 0 0 0 0 0

Sets a hint for a page to be used.

This size can be modified internally if set to an inappropriate value.

Page Size

name: pageSize, type: IntVector6, persistent: no

Shows the actual page size.

Calculate check sum

name: enableCheckSumTests, type: Bool, default: FALSE

If this field is enabled then time consuming checksum calculations and -tests are enabled while reading page data from files of type .mlimage.

Hidden Fields

format

name: format, type: String, persistent: no

dataType

name: dataType, type: String, persistent: no

sizeX

name: sizeX, type: Integer, persistent: no, deprecated name: X

sizeY

name: sizeY, type: Integer, persistent: no, deprecated name: Y

sizeZ

name: sizeZ, type: Integer, persistent: no, deprecated name: Z

sizeC

name: sizeC, type: Integer, persistent: no, deprecated name: C

sizeT

name: sizeT, type: Integer, persistent: no, deprecated name: T

sizeU

name: sizeU, type: Integer, persistent: no, deprecated name: U

minValue

name: minValue, type: Double, persistent: no

maxValue

name: maxValue, type: Double, persistent: no

colorSpace

name: colorSpace, type: String, persistent: no

comment

name: comment, type: String, persistent: no

readRaw

name: readRaw, type: Bool, default: FALSE

If checked, the loading of raw files is enabled.

Since raw image files can not be recognized automatically, the settings in the Read Raw tab view are only enabled if this option is checked.

This also disables the recognition of all other image file formats, so make sure to uncheck this checkbox before opening an image stored in one of the other file formats.

suppressErrorLog

name: suppressErrorLog, type: Bool, default: FALSE

dicomIgnoreHalfVoxelShift

name: dicomIgnoreHalfVoxelShift, type: Bool, default: FALSE

filenameInfo

name: filenameInfo, type: String, persistent: no