(part 2) Step 1: Segmenting basal body - UU-cellbiology/averageBasalBodies GitHub Wiki
First, for this step, make sure that the FeatureJ plugin version >= 2.0.0 is installed on your FIJI.
Open in FIJI script editor a1_measure_BB_shape.ijm macro and run it.
The parameters dialog will appear:
A description of the parameters is provided below.
The next dialog will prompt the selection of all_data_folder
and the next dialog will allow you to select an output folder.
input
The macro will go through all folders in all_data_folder
and look for a subfolder with an avg suffix.
In that subfolder, it will look for a tif file (averaged volume)
and a csv file with fitted BB shape parameters (centerline coordinates, diameter).
what happens
The macro will take the reference "total protein stain" channel
and find the z-slice with maximum intensity.
From the earlier measurements it will pick its center XY coordinates (X_cent, Y_cent).
Then the macro will build maximum intensity projection along YZ axis (top left panel)
and apply "Edges" filter with to it (top middle panel).
Basically, it will calculate the gradient-magnitude image with the smoothing scale
specified by the previously indicated Gradient scale (px) parameter.
On the gradient image, it will plot a vertical line ROI at Y_cent location
of width equal to Middle line width (px) parameter (top right panel).
The intensity profile along this line will be used to detect maxima
with the tolerance specified by Maximum tolerance (bottom panel).
output
The macro will create an a1_measure subfolder in the output folder.
It will store tif files containing only reference the 'total protein stain' channel
in the new BB_channel subfolder.
In the plots_intProf subfolder the plots of intensity profile along Z axis are stored.
The macro will generate summary_fit_params.csv file, containing the corresponding averaged tif filename,
X_cent, Y_cent coordinates, number of Z-slices and voxel sizes.
The most important output is located in the new BB_marks subfolder.
It contains YZ maximum intensity projections (_YZ_max suffix) and
their gradient images (_YZ_edge suffix).
On the gradient image the detected intensity maximum positions
along the Z-axis are marked with horizontal lines (see below, right panel).
cleaning BB Z-marks
For each tif stack there would be an extra csv file with a _marks suffix.
In this file there are two columns, a sequential number of the gradient image intensity maximum
(shown on the image above) and its position along Z-axis in pixels.
For the example above, it looks like:
| # | Z-position |
|---|---|
| 1 | 54 |
| 2 | 126 |
| 3 | 168 |
| 4 | 199 |
| 5 | 235 |
| 6 | 290 |
| 7 | 357 |
| 8 | 374 |
For the following step, it is required to edit this csv file
and leave only the positions corresponding to the top (in the shown orientation),
and the beginning and the end of the transition zone.
For the example shown below those are marks #2, #5 and #6.
So the edited _marks.csv should look like:
| 2 | 126 |
| 5 | 235 |
| 6 | 290 |
This needs to be done for all csv files before proceeding
to the (part 2) Step 2: Segmentation verification.