Analyze_Cardiomyocytes - MontpellierRessourcesImagerie/imagej_macros_and_scripts GitHub Wiki

Analyze images from second harmonics microscopy of cardiac muscle cells (cardiomyocytes). The tool measures the length of the sarcomeres using the FFT of the image and the degree of organization of the sarcomeres by using the dispersion provided by the Directonality command of FIJI. Although the input images can be stacks only the middle slice is used for the analysis. Here are two example images: image1.tif and image2.tif.

You can find the source code here.

Getting started

To install the tool, drag the two links Analyze_Cardiomyocytes.ijm and directionality_batch.py to the FIJI launcher window, save it under macros/toolsets in the FIJI installation and restart FIJI.

Select the "Analyze_Cardiomyocytes" toolset from the >> button of the ImageJ launcher.

cardiomyocytes-toolset.png

  • the first button (the one with the image) opens this help page
  • the r-button runs the analysis on the active image
  • the b-button runs the analysis in batch mode on a folder of input images

Options

Open the options-dialog by right-clicking on the r-button.

Cardiomyocytes-Options.png

  • file extension: when in batch-mode the analysis will only be run on files with the given extension.
  • number of width measurements: this defines at how many places the width of the cardiomyocyte is measured

Method

The tool uses the Directionality command of FIJI to get a measure of the dispersion. The smaller the dispersion the more ordered are the sarcomeres. In order for this to work correctly there should only be one cell in the image. To measure the length of the sarcomeres the FFT of the image is computed and the local maxima are found. The reported R1 and R2 values correspond to the length of the sarcomeres. The cell is then segmented using a Mean-Threshold after the minimum intensity value in the image has been subtracted from the image. The angle of the cell is measured and the image is rotated so that the longer axis of the cell is parallel to the horizontal. The cell is segmented again using the Li-autothreshold. The image is transformed into a binary mask and the holes in the mask are filled. The bounding box of the cell is measured and the given number of width measurements is calculated at evenly distributed distances by finding the first and the last change from one color to the other in the mask at a horizontal line at each given x-position.

Results

For each input image a control image showing the segmented cell and the places at which the width measurements have been calculated is created.

result-image.png

measurements.png

The results include the dispersion as a measure of how unstructured the sarcomeres are, the lengths of the sarcomeres (R1 and R2) and the width of the cell at multiple places.