CamachoDejay / SStenberg_3Dyeast_tools

ImageJ macro tools for Simon Stenberg to assist him in his yeast segmentation and quatification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License: GPL v3

Simon Stenberg 3D yeast tools

ImageJ macro tools for Simon Stenberg to assist him in his yeast segmentation and quantification

General logic of the image processing workflow

Segmentation of yeast cells

The images are loaded and a difference of Gaussians (DoG) filter is used to enhance the structures of interest. In this case sigma_1 = [4, 4, 2] pixels in x,y,z, and sigma_2 = [5.66, 5.66, 2.8] pixels in x,y,z.

To improve on the segmentation quality, we calculate the 3D gradient of the DoG filtered images. For segmentation, we use the triangle algorithm. For post-processing, we fill holes present in the output mask.

Automated suggestion of seeds for the subsequent watershed in yeast segmentation

Segmented masks of yeast cells are post-processed to suggest seeds that can then be used during watershed to separated touching objects. This is based on morphological operations via MorphoLibJ.

The steps are (i) Erosion of a spherical element with radius [4, 4, 2], followed by (ii) morphological-opening with a spherical element of radius [7, 7, 3].

Segmentation of mithocondria

The images are loaded and a difference of Gaussians (DoG) filter is used to enhance the structures of interest. In this case sigma_1 = [2, 2, 1] pixels in x,y,z, and sigma_2 = [2.83, 2.83, 1.414] pixels in x,y,z.

To improve on the segmentation quality, we calculate the 3D median filter [2, 2, 1] of the DoG filtered images. For segmentation, we use the otsu algorithm.

IJ Macros

Dependencies

For the macros to run you need to first install the plugin: MorphoLibJ

Segmentation

  • Simon_yeast_segementation.ijm: The purpose of this macro is to segment yeast cells from 3 or 2 color images. As further post-processing, the algorithm tries to suggest good seeds that can be used later on to separate touching objects via watershed.

  • Simon_mito_segmentation.ijm: The purpose of this macro is to segment mitochondria from 3 or 2 color images. The user must select the mitochondria color channel and then segmentation takes place, taking advantage of 3D filtering.

Seed based watershed

In the imaging conditions used in this study, separating single yeast cells from their neighbors can be challenging. Thus we used a seed-based watershed algorithm to separate touching objects after segmentation. The seeds are prepared in a semi-automated fashion. The initial segmentation suggests seeds and the user then uses other macros to improve this suggestion by either adding or removing seeds. 3 macros are used together:

  • improve_seg.ijm: The purpose of this macro is to help with the seed generation done during the yeast segmentation. Once it runs on an output folder it will show the current status of the object separation via watershed. If in this step a mistake is found then you can use:

    • Add_seed.ijm: to add seeds by clicking (point selection tool) on the cell body you want to separate. After clicking, you must run add seed. At this point, you can add another seed, then click run again. Once you added a few easy seeds, then you can save the new seeds and run again improve_seg.ijm to see the current state of the watershed output.

    • Remove_seed.ijm: removes a particular seed by clicking (point selection) on the seed you want to remove. After removing one or several seeds you have to save the new seeds.

Save labels after the watershed

Once you are happy with the seeds then you can save the output after the watershed, which is a label image/volume. This will be used later on for the calculation of mitochondria properties per yeast cell. To do so run the macro:

Matlab script

External Dependencies

For the main function to run properly (due to loading of tif meta data) you need to first install bioFormats toolbox.

General description

This code goes over a directory and finds all sub-folders that were generated by the IJmacors above. Then it loads the yeast label image and the mitochondria segmentation. Each yeast cell is then treated separately:

  1. Yeast cells are tested for the presence of daughter cells, if a daughter cell is present then mother and daughter are separated. We will only focus on the mitochondria in mother cells, form now on called cell bodies.

  2. Cell bodies are smoothed.

  3. Mithocondria inside the cell body are then characterized in terms of their shape and volume.

  4. output tables are generated.

output table variables

  • data_name: name of the original image file used for analysis.

  • Cell_idx: unique identifier for the cell in the particular data set.

  • Cell_Volume(_micron): Volume of the cell body in pixels (or in microns).

  • Daughter_Volume(_micron): if a daughter cell was detected then we print its volume in pixels (or in microns).

  • Mito_number: number of isolated mitochondrial bodies detected. Note that due to the optical resolution limits this is not the same as the actual number of mitochondria present inside the cell, as we can only separate objects that are farther away than the diffraction limit.

  • Mito_volume(_micron): volume of the isolated mitochondrial bodies in pixels (or in microns).

  • Mito_diamater(_micron): quick and fast calculation of the diameter of a tubular object by first skeletonizing the body and then measuring the median distance from the skeleton to the object's boundary. The diameter is given in pixels (or in microns).

  • Mito_SkelPix_Micron: quick measurement of the length of the skeleton in units of microns. Due to the pixelation of the skeleton, this measurement is prone to small rounding errors.

  • Mito_Vol_Ratio: the volumetric ratio between the isolated mitochondrial body and the total volume of the mother cell.

About

ImageJ macro tools for Simon Stenberg to assist him in his yeast segmentation and quatification

License:GNU General Public License v3.0


Languages

Language:ImageJ Macro 59.2%Language:MATLAB 40.8%