Skip to content

Q&A: How and when could I use a manual threshold in CiliaQ Preparator?

Jan Hansen edited this page Jun 2, 2022 · 2 revisions

How and when could I use a manual threshold in CiliaQ Preparator?

Answer provided by Lilian Fu, in July 2021. Updated by Jan N. Hansen.


There are several reasons why you might want to go for a fixed threshold for your whole data set. Most importantly, you should only process images with a fixed threshold if you are sure that the experimental procedures and acquisition were identical for all images.

Here is one example, where a fixed threshold for an entire data set makes sense: Imagine that you would like to segment a second channel with CiliaQ Preparator (not labeling all cilia as a marker, but labeling a protein of interest), since you would like to measure its colocalization with cilia later in CiliaQ. If you would then have images, where there is no signal at all in that second channel (e.g., a control image), segmentation methods based on intensity thresholds may reveal arbitrary, "false-positive" signals, since these methods always try to find two populations (fore- and background) in the image and since the approach always sees only the individual image not all the analyzed images it will consider some background regions as foreground. Thus, in such empty images, you will still detect signals with an automated threshold method. To circumvent this, a stable fixed threshold for all images of the data set may be the better choice (if your setup and image acquisiton method is stable).

You can choose to apply a threshold determined by you for manual segmentation in CiliaQ Preparator.

For the example above, we recommend that you determine the threshold based on a few images in the data set as follows:

  1. Import a raw image into Fiji.

  2. Select the appropriate channel depending on which signal you want to measure. Make sure you are viewing the correct channel! Note, that the intensities you measure are also dependent on which slice you choose, so selecting a middle slice as opposed to the first or last one might be more representative of your data.

  3. Draw an ROI that specifically does not contain any areas where you would expect a high/positive signal (e.g. inside cilia) and analyze the intensity by selecting Analyze > Measure (or press M on the key board)

  4. Repeat this for multiple or even all images. Fiji will automatically save all the measurements in a table in a new pop-up window. If that table does not provide a Mean, go in that table window to Results > Set Measurements... and activate mean gray value and standard deviation in the upcoming dialog, then repeat the measurement (it will not update old measurements)).

  5. Copy this table into Excel and use the mean (and, eventually, also standard deviation) values to calculate your threshold (e.g., you could calculate the threshold as mean of all means + 3 * mean of all standard deviation.

To apply the custom threshold:

  1. Open CiliaQ Preparator and select “CUSTOM threshold” under Segmentation method. Specify the threshold you calculated for your data set in the field below.