Skip to content

(part 2) Step 3: Rescaling shapes

Eugene Katrukha edited this page Mar 18, 2025 · 2 revisions

At this step, we are going to adjust BBs shapes (homogenize them)
and normalize dimensions to some (taken from electron microscopy) reference.

Open in FIJI script editor a3_rescaling.ijm macro and run it.

The parameters dialog will appear:

parameters dialog

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 (the same as in the previous steps).

input

As the input, this macro takes averaged volumes of all cells with all channels,
and the ZScale1, ZScale2, XScale, YScale values from summary_XYZ_scales.csv file
generated during previous step.

what happens

In our data "total protein stain" is always the last channel.
The macro will rearrange channels for it to become the first
and the order of the remaining channels remains the same.
For 4 channel images, channel #3 is removed.
For 2 channel images, one extra empty channel is added.
This is done in preparation for the next step,
since the averaging/registration plugin works only with images containing the same number of channels.

Next, the macro splits the image volume into two parts (along the Z-axis)
at the position where BB transition zone begins.
They are rescaled (compressed/stretched) using
previously calculated rescaling factors ZScale1 (top, for BB) and
ZScale2 (bottom, for the transition zone and axoneme).
After that, the whole volume is rescaled again along the X and Y axes
using calculated XScale and YScale values.

At this point, all BB volumes should have the same diameter.
For the "expected" XY pixel size assignment, we use a reference
measurement of the BB diameter from electron microscopy,
specified as "Reference BB diameter (nm)" parameter.

The Z-step between slices for these volumes is recalculated
using Z anisotropy factor parameter. It is equal to
the ratio of the Z-step to the XY pixel size at part 2, step 1
output (can be found in a1_measure/summary_fit_params.csv).
Please pay attention, it is not the ratio of the initial
volumes and it depends on the rescaling.

output

The macro will create an a3_rescaling subfolder in the output folder.

Inside it, there is rescaled subfolder with rescaled volumes and rearranged channels.

There is also an extra not_rescaled folder with volumes,
where only channels were rearranged (used as a control).

The last step of this part is (part 2) Step 4: Registration

Clone this wiki locally