Load Single Image loads a single image for use in all image cycles.
This module tells CellProfiler where to retrieve a single image and gives the image a meaningful name by which the other modules can access it. The module executes only the first time through the pipeline; thereafter the image is accessible to all subsequent processing cycles. This is particularly useful for loading an image like an illumination correction image for use by the CorrectIlluminationApply module, when that single image will be used to correct all images in the analysis run.
Disclaimer: Please note that the Input modues (i.e., Images, Metadata, NamesAndTypes and Groups) largely supercedes this module. However, old pipelines loaded into CellProfiler that contain this module will provide the option of preserving them; these pipelines will operate exactly as before.
Available measurements
- Pathname, Filename: The full path and the filename of each image.
- Metadata: The metadata information extracted from the path and/or filename, if requested.
- Scaling: The maximum possible intensity value for the image format.
- Height, Width: The height and width of the current image.
Technical notes
For most purposes, you will probably want to use the LoadImages module, not LoadSingleImage. The reason is that LoadSingleImage does not actually create image sets (or even a single image set). Instead, it adds the single image to every image cycle for an already existing image set. Hence LoadSingleImage should never be used as the only image-loading module in a pipeline; attempting to do so will display a warning message in the module settings.
If you have a single file to load in the pipeline (and only that file), you will want to use LoadImages or LoadData with a single, hardcoded file name.
See also the Input modules, LoadImages,LoadData.
Settings:
Input image file location
Select the folder containing the image(s) to be loaded. Generally,
it is best to store the image you want to load in either the Default Input or
Output Folder, so that the correct image is loaded into the pipeline
and typos are avoided.
You can choose among the following options which are common to all file input/output
modules:
- Default Input Folder: Use the default input folder.
- Default Output Folder: Use from the default output folder.
- Elsewhere...: Use a particular folder you specify.
- Default input directory sub-folder: Enter the name of a subfolder of
the default input folder or a path that starts from the default input folder.
- Default output directory sub-folder: Enter the name of a subfolder of
the default output folder or a path that starts from the default output folder.
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):
- Use one period to represent the current directory. For example, if you choose
Default Input Folder sub-folder, you can enter "./MyFiles" to look in a
folder called "MyFiles" that is contained within the Default Input Folder.
- Use two periods ".." to move up one folder level. For example, if you choose
Default Input Folder sub-folder, you can enter "../MyFolder" to look in a
folder called "MyFolder" at the same level as the Default Input Folder.
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 insert key
- A right mouse button click inside the control
- In Windows, the Context menu key, which is between the Windows key and Ctrl key
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:
- Use the up and down arrows to cycle through possible values.
- Right-click on the tag to display and select the available values.
For instance,
if you have a "Plate" metadata tag, and your single files are
organized in subfolders named with the "Plate" tag, you can select one of the
subfolder options and then specify a subfolder name of "\g<Plate>"
to get the files from the subfolder associated with that image's 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.
Filename of the image to load (Include the extension, e.g., .tif)
The filename can be constructed in one of two ways:
- As a fixed filename (e.g., Exp1_D03f00d0.tif).
- Using the metadata associated with an image set in
LoadImages or LoadData. This is especially useful
if you want your output given a unique label according to the
metadata corresponding to an image group. The name of the metadata
to substitute is included in a special tag format embedded
in your file specification.
You can insert a previously defined metadata tag by either using:
- The insert key
- A right mouse button click inside the control
- In Windows, the Context menu key, which is between the Windows key and Ctrl key
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:
- Use the up and down arrows to cycle through possible values.
- Right-click on the tag to display and select the available values.
Please see the Metadata module for more details on metadata collection and usage.
Keep in mind that in either case, the image file extension, if any, must be included.
Load as images or objects?
This setting determines whether you load an image as image data
or as segmentation results (i.e., objects):
- Images: The input image will be given a user-specified name by
which it will be refered downstream. This is the most common usage for this
module.
- Objects: Use this option if the input image is a label matrix
and you want to obtain the objects that it defines. A label matrix
is a grayscale or color image in which the connected regions share the
same label, and defines how objects are represented in CellProfiler.
The labels are integer values greater than or equal to 0.
The elements equal to 0 are the background, whereas the elements equal to 1
make up one object, the elements equal to 2 make up a second object, and so on.
This option allows you to use the objects without needing to insert an
Identify module to extract them first. See IdentifyPrimaryObjects
for more details.
Name the image that will be loaded
(Used only if an image is output)
Enter the name of the image that will be loaded.
You can use this name to select the image in downstream modules.
Rescale intensities?
(Used only if an image is output)
This option determines whether image metadata should be
used to rescale the image's intensities. Some image formats
save the maximum possible intensity value along with the pixel data.
For instance, a microscope might acquire images using a 12-bit
A/D converter which outputs intensity values between zero and 4095,
but stores the values in a field that can take values up to 65535.
Select Yes to rescale the image intensity so that
saturated values are rescaled to 1.0 by dividing all pixels
in the image by the maximum possible intensity value.
Select No to ignore the image metadata and rescale the image
to 0 – 1.0 by dividing by 255 or 65535, depending on the number
of bits used to store the image.
Name this loaded object
(Used only if objects are output)
This is the name for the objects loaded from your image
Retain outlines of loaded objects?
(Used only if objects are output)
Select Yes if you want to save an image of the outlines
of the loaded objects.
Name the outlines
(Used only if objects are output)
Enter a name that will allow the outlines to be selected later in the pipeline.