Image transformations

Processing the open image

  1. To crop an image, draw a rectangle around the region of the image to be preserved, and select Crop from the Image menu. Then click on the rectangle containing the region to be cropped.

    It is possible to crop an image using any type of polyline: the bounding box of the polyline will be used if the polyline is not rectangular.

  2. To make a substack, select Substack from the Image menu and indicate the first and last slices to include.

  3. To rescale an image, select Rescale image … from the Image menu, and select the scaling factor for the rows (Y-axis) and columns (X-axis).

  4. To create a kymograph, draw a rectangle around the region of the image to be included, and select Kymograph from the Image menu. Then click on the rectangle containing the region to include in the kymograph.

    It is possible to generate a kymograph using any type of polyline: the bounding box of the polyline will be used if the polyline is not rectangular.

  5. To register the slices (Z planes or consecutive time points) that form an image sequence, add a constant number of fiducials to the slices to be registered, making sure that the fiducial ids of corresponding structures match. Move to the slice that will be the reference for image registration and select the Register option from the Image menu.

    To speed up the generation of fiducials for image registration, add fiducials to image features on the first image (manually or using Find seeds …). Project the fiducials onto subsequent time points using the Propagate seeds … option in the Image menu.

    The registration algorithm in PyJAMAS will shift images by the mean x and y displacements of the fiducials with respect to the corresponding fiducials in the reference image.

    If fiducial ids do not match, PyJAMAS provides a tool to automatically track fiducials and match their ids. Select Track fiducials … under the Annotations menu. For each fiducial in the source slice, the algorithm will determine the closest fiducial in the target (next) slice. If two fiducials from the source slice are mapped on to the same fiducial in the target slice, PyJAMAS will produce an error indicating the ids of the overlapping fiducials. The same number of fiducials should be present on each slice for this simple tracking algorithm to work.

  6. To apply Gaussian smoothing to an image, select Gaussian smoothing … from the Image menu and choose the standard deviation value for the Gaussian kernel.

  7. To calculate the magnitude of the image gradient, select Gradient from the Image menu.

Batch correct and crop

  1. Select the Correct images … option from the Batch menu. In the dialog, specify the parameters to correct the images in the selected folder. The different options in the Correct images … dialog are:

    1. input folder: path to the folder containing all the images to be resized; can contain subfolders.

    2. darkfield image: path to the image to be used for dark field correction; this image will be subtracted from the original during the correction procedure, and it is supposed to represent the image of an empty field with no illumination.

    3. flatfield image: path to the image to be used for flat field correction; this image will be divided from the dark-field-corrected image and should therefore also be darkfield corrected; it is supposed to represent the image of an empty field with the same illumination used for sample acquisition (typically it is an average of many of these images).

    4. crop dimensions: images will be cropped to this number of rows and this number of columns before the correction procedure; cropping is also applied to the dark field and flat field images if using; dimensions that are too small will be left intact.

    5. background: select none for no additional background subtraction, or mode to subtract the image mode–calculated for each image, including all its slices–after dark and flat field corrections.

    6. input substring: a substring to select which images should be corrected.

    7. output file suffix: a suffix added to the file name containing the corrected image; the file name will be the same as for the original image except for this suffix.

  2. The corrected image files are saved in the folder containing the corresponding original image file.