Purpose

The itkImageFileReader module modules permits access to the file formats supported in itk.

Usage

Set Dimension field with the dimension of the file to be loaded, the voxel type for the output image to be created in Voxel Type field and then then use the Browse button to select the file to be loaded.

Tips

  • Use itkImageFileReader for itk example data.
  • Use ImageLoad for MeVisLab example data.
  • File loading maps the entire image in memory. For large images this can lead to out of memory problems.
  • Color images can only be read correctly if color channels are stored in separate image planes (r,r,r,....g,g,g,...b,b,b). If color channels are stored interleaved (r,g,b,....r,g,b,...r,g,b)the images can be read into 3d vector voxels and then converted to a color image with the module TypeToScalars using Output Dimension C.
  • The itkImageFileReader reads tiff file written with MeVisLab only as 2d and in 8 bit without paging which leads to limited data quality and dimension when loading MeVisLab example data which are stored in that format. Use the ImageLoad module for full 3D paged tiff files of any data type.

Windows

Default Panel

../../../Modules/ML/MLITKManualBinding/mhelp/Images/Screenshots/itkImageFileReader._default.png

Output Fields

The loaded file is available at output 0. On load failures the output normally will be deactivated. Check the status message in the Info field or in the image output tool tip for additional information.

Parameter Fields

Field Index

Close: Trigger Num Dimensions: Integer
Component Type: String Open: Trigger
Correct Sub Voxel Shift: Bool Pixel Type: String
Dimension: Enum True File Name: String
File Name: String Voxel Type: Enum
File Type: String  
Info: String  
Loader Type: String  

The following parameters are available in the module panel:

Visible Fields

True File Name

name: fileName, type: String, persistent: no

This read-only field shows the real file name used to save the file. It a a resolved version of the File Name field which might contains variables.

Default is "".

Voxel Type

name: fileDataType, type: Enum, default: int16

This is the voxel type to be used for the loaded file. Note that files could be stored in another voxel type - then the voxel type is automatically cast to the selected one. If a file cannot be loaded because the the voxel components cannot be converted then try other voxel types which may fit better to the stored voxel type.

Values:

Title Name
int8 int8
unsigned int8 unsigned int8
int16 int16
unsigned int16 unsigned int16
int32 int32
unsigned int32 unsigned int32
float float
double double
int64 int64
unsigned int64 unsigned int64
complexf complexf
complexd complexd
quaternionf quaternionf
quaterniond quaterniond
vecf2 vecf2
vec2 vec2
vecf3 vecf3
vec3 vec3
vecf4 vecf4
vec4 vec4
vecf5 vecf5
vec5 vec5
vecf6 vecf6
vec6 vec6
vecf7 vecf7
vec7 vec7
vecf8 vecf8
vec8 vec8
vecf9 vecf9
vec9 vec9
vecf10 vecf10
vec10 vec10
vecf16 vecf16
vec16 vec16
vecf32 vecf32
vec32 vec32
vecf64 vecf64
vec64 vec64
matf2 matf2
mat2 mat2
matf3 matf3
mat3 mat3
matf4 matf4
mat4 mat4
matf5 matf5
mat5 mat5
matf6 matf6
mat6 mat6
Vector2i8 Vector2i8
Vector2i16 Vector2i16
Vector2i32 Vector2i32
Vector2i64 Vector2i64
Vector3i8 Vector3i8
Vector3i16 Vector3i16
Vector3i32 Vector3i32
Vector3i64 Vector3i64
Vector4i8 Vector4i8
Vector4i16 Vector4i16
Vector4i32 Vector4i32
Vector4i64 Vector4i64
Vector5i8 Vector5i8
Vector5i16 Vector5i16
Vector5i32 Vector5i32
Vector5i64 Vector5i64
Vector6i8 Vector6i8
Vector6i16 Vector6i16
Vector6i32 Vector6i32
Vector6i64 Vector6i64
Vector7i8 Vector7i8
Vector7i16 Vector7i16
Vector7i32 Vector7i32
Vector7i64 Vector7i64
Vector8i8 Vector8i8
Vector8i16 Vector8i16
Vector8i32 Vector8i32
Vector8i64 Vector8i64
Vector9i8 Vector9i8
Vector9i16 Vector9i16
Vector9i32 Vector9i32
Vector9i64 Vector9i64
Vector10i8 Vector10i8
Vector10i16 Vector10i16
Vector10i32 Vector10i32
Vector10i64 Vector10i64
Vector16i8 Vector16i8
Vector16i16 Vector16i16
Vector16i32 Vector16i32
Vector16i64 Vector16i64
Vector32i8 Vector32i8
Vector32i16 Vector32i16
Vector32i32 Vector32i32
Vector32i64 Vector32i64
Vector64i8 Vector64i8
Vector64i16 Vector64i16
Vector64i32 Vector64i32
Vector64i64 Vector64i64

Correct Sub Voxel Shift

name: correctSubVoxelShift, type: Bool, default: FALSE

ITK and ML use different origins for voxel coordinates (at center or atorigin of the pixel). This is usually corrected on transfers of image data between itk and ML algorithms, however, when loading images this is sometimes not expected, because e.g. an image origin at (0,0,0) is desired. Therefore this correction is disabled by default when loading images. If the correction is wanted then this flag shall can be activated.

Dimension

name: fileDimension, type: Enum, default: 3

When loading data the created output file will have this dimension. If the stored file has a higher dimension, only an image of the specified dimension will be generated. If a file cannot be loaded because the image dimension cannot be converted then try other dimensions.

Values:

Title Name
2 2
3 3
4 4
6 6

Info

name: info, type: String, default: Invalid path

This is a read-only status field showing information and error information, normally about the recent load operation.

Close

name: close, type: Trigger

Closes a file if it is open. This can be useful to remove file locks, when a file is overwritten by another file.

Open

name: open, type: Trigger

This opens or reopens a file. Normally this is done automatically when specifying any load parameter, however, changes of the file on disk do not lead to a file reopen. This can be done manually using this button.

Num Dimensions

name: numDims, type: Integer, default: 0

Dimensionality as it was found in the file by itk::ImageIOBase.

File Type

name: fileType, type: String, default: TypeNotApplicable

File type as it was found in the file by itk::ImageIOBase (normally ASCII or Binary).

Component Type

name: componentType, type: String

Scalar component type as it was found in the file by itk::ImageIOBase.

Pixel Type

name: pixelType, type: String, default: UNKNOWNPIXELTYPE

The way pixels are composed as it was found in the file by the itk::ImageIOBase.

Loader Type

name: loaderType, type: String

The itk plugin used to load the file.

File Name

name: unresolvedFileName, type: String, deprecated name: path

This is the file name parameter which normally should contain the full absolute path to the file to be loaded. Note that also variables can be used such as $(NETWORK), $(HOME), and $(DemoDataPath)to specify paths into the current network directory, the user's homedirecory and to the installed example data directory of MeVisLab.

Default is "".