ExportImageAsSlices

MacroModule
genre File
author MeVis Medical Solutions AG
package MeVisLab/Standard
definition FileHandling.def
see also ImageSave, DicomTool
keywords save, export, image, stack, png, jpg, jpeg, bmp

Purpose

This module exports a 3D (or 4D/5D) image as a stack of 2D slices with automatic indexing. It supports PNG, JPG, BMP and PNM format and input images with 1 or 3 colors and any scalar data type.

Usage

Enter a filename in Filename. The filename will automatically be augmented with the required indexing.

Windows

Default Panel

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

Input Fields

input0

name: input0, type: Image

Connect the image to export here.

Parameter Fields

Field Index

Colors: Integer Type: String
dimensionSeparator: String U: Integer
Export: Trigger Z: Integer
Filename: String  
progress: Float  
Ready: Bool  
Supported: Bool  
T: Integer  

Visible Fields

Filename

name: targetFileName, type: String

The target filename. It must end on “.png”, “.jpg”, “.bmp”, or “.pnm”. This filename will automatically augmented with the required indexing, so the actual filename will only be used if you provide a 2D image.

Colors

name: cSize, type: Integer, persistent: no

Tells the number of colors in the input image.

Z

name: zSize, type: Integer, persistent: no

Tells the number of slices in the z dimension.

T

name: tSize, type: Integer, persistent: no

Tells the number of slices in the t dimension.

U

name: uSize, type: Integer, persistent: no

Tells the number of slices in the u dimension.

Type

name: dataType, type: String, persistent: no

Tells the voxel data type of the image. Only “unsigned int8” is passed through unchanged, everything else is scaled to the range 0-255.

Ready

name: ready, type: Bool, persistent: no

Indicates if a suitable file name has been entered.

Supported

name: supported, type: Bool, persistent: no

Indicates if a compatible input image is connected to the module.

Export

name: export, type: Trigger

Pressing this does the export step.

Hidden Fields

dimensionSeparator

name: dimensionSeparator, type: String, default: -

This string will be used to separate the indexing if more than one dimension needs to be index.

progress

name: progress, type: Float, persistent: no