Module: SaveImages

Save Images saves image or movie files.
Because CellProfiler usually performs many image analysis steps on many groups of images, it does not save any of the resulting images to the hard drive unless you specifically choose to do so with the SaveImages module. You can save any of the processed images created by CellProfiler during the analysis using this module.

You can choose from many different image formats for saving your files. This allows you to use the module as a file format converter, by loading files in their original format and then saving them in an alternate format.

Note that saving images in 12-bit format is not supported, and 16-bit format is supported for TIFF only.

See also NamesAndTypes, ConserveMemory.

Settings:

Select the type of image to save

The following types of images can be saved as a file on the hard drive:

Select the image to save

(Used only if "Image", "Mask" or "Cropping" are selected to save)
Select the image you want to save.

Select the objects to save

(Used only if saving "Objects")
Select the objects that you want to save.

Select the module display window to save

(Used only if saving "Module window")
Enter the module number/name for which you want to save the module display window.

Select method for constructing file names

(Used only if saving non-movie files)
Several choices are available for constructing the image file name:

Select image name for file prefix

(Used only when "From image filename" is selected for contructing the filename)
Select an image loaded using NamesAndTypes. The original filename will be used as the prefix for the output filename.

Enter single file name

(Used only when "Sequential numbers" or "Single name" are selected for contructing the filename)
Specify the filename text here. If you have metadata associated with your images, enter the filename text with the metadata tags. You can insert a previously defined metadata tag by either using: The inserted metadata tag will appear in green. To change a previously inserted metadata tag, navigate the cursor to just before the tag and either:
Do not enter the file extension in this setting; it will be appended automatically.

Number of digits

(Used only when "Sequential numbers" is selected for contructing the filename)
Specify the number of digits to be used for the sequential numbering. Zeros will be used to left-pad the digits. If the number specified here is less than that needed to contain the number of image sets, the latter will override the value entered.

Append a suffix to the image file name?

Select Yes to add a suffix to the image's file name. Select No to use the image name as-is.

Text to append to the image name

(Used only when constructing the filename from the image filename)
Enter the text that should be appended to the filename specified above.

Saved file format

(Used only when saving non-movie files)
Select the image or movie format to save the image(s). Most common image formats are available; MAT-files are readable by MATLAB.

Output file location

(Used only when saving non-movie files)
This setting lets you choose the folder for the output files. You can choose among the following options which are common to all file input/output modules:

Elsewhere and the two sub-folder options all require you to enter an additional path name. You can use an absolute path (such as "C:\imagedir\image.tif" on a PC) or a relative path to specify the file location relative to a directory):

An additional option is the following:

For Elsewhere..., Default Input Folder sub-folder and Default Output Folder sub-folder, if you have metadata associated with your images via Metadata module, you can name the folder using metadata tags. You can insert a previously defined metadata tag by either using:

The inserted metadata tag will appear in green. To change a previously inserted metadata tag, navigate the cursor to just before the tag and either: . For instance, if you have a metadata tag named "Plate", you can create a per-plate folder by selecting one the subfolder options and then specifying the subfolder name as "\g<Plate>". The module will substitute the metadata values for the current image set for any metadata tags in the folder name.Please see the Metadata module for more details on metadata collection and usage.

If the subfolder does not exist when the pipeline is run, CellProfiler will create it.

If you are creating nested subfolders using the sub-folder options, you can specify the additional folders separated with slashes. For example, "Outlines/Plate1" will create a "Plate1" folder in the "Outlines" folder, which in turn is under the Default Input/Output Folder. The use of a forward slash ("/") as a folder separator will avoid ambiguity between the various operating systems.

Image bit depth

(Used only when saving files in a non-MAT format)
Select the bit-depth at which you want to save the images. 16-bit images are supported only for TIF formats. Currently, saving images in 12-bit is not supported.

Overwrite existing files without warning?

Select Yes to automatically overwrite a file if it already exists. Select No to be prompted for confirmation first.

If you are running the pipeline on a computing cluster, select Yes since you will not be able to intervene and answer the confirmation prompt.

When to save

(Used only when saving non-movie files)
Specify at what point during pipeline execution to save file(s).

Rescale the images?

(Used only when saving non-MAT file images)
Select Yes if you want the image to occupy the full dynamic range of the bit depth you have chosen. For example, if you save an image to an 8-bit file, the smallest grayscale value will be mapped to 0 and the largest value will be mapped to 28-1 = 255.

This will increase the contrast of the output image but will also effectively stretch the image data, which may not be desirable in some circumstances. See RescaleIntensity for other rescaling options.

Save as grayscale or color image?

(Used only when saving "Objects")
You can save objects as a grayscale image or as a color image.

Select colormap

(Used only when saving non-MAT file images)
This affects how images color intensities are displayed. All available colormaps can be seen here.

Record the file and path information to the saved image?

Select Yesto store filename and pathname data for each of the new files created via this module as a per-image measurement.

Instances in which this information may be useful include:

Create subfolders in the output folder?

Select Yes to create subfolders to match the input image folder structure.

Base image folder

Used only if creating subfolders in the output folder In subfolder mode, SaveImages determines the folder for an image file by examining the path of the matching input file. The path that SaveImages uses is relative to the image folder chosen using this setting. As an example, input images might be stored in a folder structure of "images\experiment-name\ date\plate-name". If the image folder is "images", SaveImages will store images in the subfolder, "experiment-name\date\plate-name". If the image folder is "images\experiment-name", SaveImages will store images in the subfolder, date\plate-name".

Saved movie format

(Used only when saving movie files)
Select the movie format to use when saving movies. AVI and MOV store images from successive image sets as movie frames. TIF stores each image as an image plane in a TIF stack.