Skip to content

Latest commit

 

History

History
72 lines (54 loc) · 4.43 KB

File metadata and controls

72 lines (54 loc) · 4.43 KB

How to determine the angle and distance of your features

The best way to approach this is by first loading your CSV into ThunderSTORM. If your file works with this plugin, it should also work with ThunderSTORM.

Once the visualisation is done you have a single image with all your localisations.

Run Process > FFT > FFT
This will apply a Fast-Fourier Transform to your image which should have concentric circles, with some lines running through at an angle. To determine this angle we use the Directionality Plugin.

First we need to resize and crop the image. Some artifacts around the side will distort the results.
Select Image > Scale and rescale the image to 1024x1024. Disable averaging and set Interpolation to None.
Select a region that surrounds the centre circles and select Image > Crop.

Open Analyze > Directionality
Set the following values:

  • Nbins: 180
  • Histogram start: 0
  • Histogram end: 180

You can select Orientation Map to see if the shown lines show what you would expect. And click OK. This could take a little while.

This will display an histogram and table with results.
From this you can read the angle of the lines and how accurate the detection was.
This angle is off by 90 degrees to what you enter in the plugin.

  • First subtract 90 degrees and then convert to rad.
  • Then add a small deviation, usually a few standard deviations (or dispersions)

If your result was 45 degrees, with a dispersion of 1 degree, you would end up with a centre angle of -45 deg (=0.79 rad).
The values you would enter in the plugin would be:

  • angle_start = 0.74
  • angle_end = 0.84

If the resulting value would go above pi or below -pi, either add or subtract 2 pi to get back in range For example:

  • -180 degrees would result in an angle_start of ~-1.05 * pi, the value one would then enter would be 0.95 * pi (= 2.984)

To obtain the distances:
Select the cropped, scaled image and do another FFT on this (Process > FFT > FFT).
Take another crop of the centre of the image and some region to the left or right, making sure the centre is included.
Example of what region to select
Open up the Thresholder (Image > Adjust > Threshold).
Set the Red to B&W (Black and White). Adjust the lower bounds until you only have a few features visible. The centre should have one feature, and then one for as many distinct feature colors you have.
In the Example there are two different colors present, and thus two different peaks.
Example of correct thresholds
Press apply and close the Thresholder window.

The distance between the features can be determined using the line tool, where you can drag a line from the center to the features: the length will be displayed on the ImageJ main widow, with units based on the scale of the image (if it is in micrometer, the length will also be).

Another method uses the Analyze Particles plugin.
Go to Analyze > Set Measurements and make sure 'Center of Mass' is ticked.
Other Settings do not matter.

Make sure the Thresholded image is seleced and go to Analyze > Analyze Particles. Make sure 'Display Results' is ticked and select OK.

This will produce a table containing the X and Y positions of all found features. One of these will be the Center feature (generally the one with the largest area) and the others will be distances.
You calculate the distances from each feature to the center with pythagoras (d = sqrt(delta_x^2 + delta_y^2)). If delta_y is small, one can take d = delta_x.
The units provided in this table are either pixel positions if you do not have a scale (in say um or nm) set. Otherwise they will be in that unit!

An image generated by ThunderSTORM will have units added. My example has micrometers, giving distances of ~4um and ~3.5um.
The original values were in nanometers, so to get to the final values we multiply by 1000 and divide by 2.
The multiplication to get from micro to nanometers. The division is because the FFT resolution gets doubled by some steps.

The final resulting values are ~2000 nm and ~1750 nm. Adding a buffer of roughly 7.5% (~300 nm) of the maximum value(~40000 nm) to each end ensures all proper values are found.
This results in a final lower end of 1450nm to 2300nm.

This process is what is also followed by the AngleAnalyzer.java plugin to calculate the values.