Mosaic: Difference between revisions

From Advanced Labs Wiki
Jump to navigation Jump to search
(Created page with 'TBD.')
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
TBD.
Back to [[2014]].
 
Mosaic is a program that finds spherical particles in images and tracks their trajectories, which can be used in our analysis for Brownian Motion.
 
You will need Steps 1 & 9 for the calibration, the other steps are used for extracting the trajectories.
 
----
 
Instructions for using Mosaic:
 
Step 1. Download Fiji
 
In order to use Mosaic, you will need to use a software package called ImageJ. It is a package from the NIH built for image processing and analysis using Java. The easiest implementation I can find is called Fiji, (Fiji Is Just) ImageJ, that allows for easy updates to the ImageJ package and any additional plugins.
 
You can find Fiji for your system at http://fiji.sc/Fiji
 
Step 2. Register Mosaic in your copy of Fiji
 
Mosaic may not be included by default in your copy of Fiji (at time of writing, it was not). Fiji takes care of version tracking when Mosaic needs to be updated, so if it isn’t included, you should add Mosaic to the list of update sites.
 
To do this, go to the Fiji Updater, then Advanced>Manage update sites. Click Add, then paste this URL: http://mosaic.mpi-cbg.de/Downloads/update/Fiji/MosaicToolsuite. Run an update, then restart. Mosaic should now appear in the Plugins menu.
 
Step 3. Import your image sequence.
 
Go to File>Import>Image Sequence. Choose the folder where your images are stored. By default, the options that come up will set the number of images to the number of files in the folder. Because of this, it may be easiest to store each run in a different folder.
 
Step 4. Convert to 8-bit greyscale
 
This is needed to make the particle detection easier. Go to Image>Type>8-bit.
 
Step 5. Set threshold to remove white noise
 
Image>Adjust>Threshold. The default should be good. When done, you should get a series of images with only a few blacks dots on a white background.
 
Step 6. Use Mosaic to find the particles
 
Plugins>Mosaic>Particle Tracker 2D/3D. This is 2D data - for other purposes, slices can be taken simultaneously at different Z levels, but this is not what you did so it is not 3D data.
 
You will need to change the particle detection parameters. This will define the cutoff for what Mosaic will look for as a particle. There are three parameters you need to be concerned with at this stage: Radius, Cutoff, and Per/Abs. Radius is obvious, the other two deal with how stringently the analyzer will eliminate possible particles. The higher value of cutoff, the harder mosaic will eliminate possible fake particles. Per/Abs is the percentage of the high intensity particles that will be used for analysis, as this value increases, more particles (and also more non-particles) will be detected.
 
Unfortunately, there is no strict setting for this analysis. You will have to modify these values until you get particles that seem reasonable. I would HIGHLY suggest using Preview Detected - the full particle tracker takes some time and will take much longer as the radius increases.
 
Suggested ranges should be 5-15 for the radius, 1-5 for cutoff, 0.1-0.5 for per/abs. Zoom in to see how well your preview detections work. When you’ve found what you think will be a good fit, press OK.
 
Step 7. Make adequate trajectories
 
When step 6 is done, click Visualize All Trajectories and you will see a lot of colored lines on your sequence. These are the trajectories that were found using your definitions for particles. Each red line is an instance where the algorithm lost track of the particle. This is because it likely jumped outside of the default bounds. To change these, when in the Results window, go to Relink Particles.
 
Now, you must set the link range and displacement. Link range details the number of subsequent frames to determine optimal matching. We would think this should be high, but it appears to average out a lot of the brownian motion, so keep this as low as possible (2 should work). Displacement is the maximum number of pixels a particle is allowed to move.
 
This step should be fast. You will have a good trajectory when you see one that has no red jumps. Double click on one such trajectory and move through the frames to see that the particle is matched on each frame.
 
Step 8. Export the steps
 
After you find a good trajectory, click “Selected Trajectory to Table”. You will see x and y values for each frame. Save them by going to File>Save As. It will likely be easiest to use a .txt format (default is .xls, you must add the .txt extension in the save dialog if it is not present). The values stored will be in absolute pixel locations, you will have to get the deltas and deltay from consecutive frames.
 
Step 9. Get conversion from pixels to µm
 
Lastly, after you have enough steps, you need to have the conversion from pixels to µm. Open your scale image using the File>Open dialog. Next, use the straight line tool to draw a level line across as much of the scale as you have, terminating in the centers of a hash mark at either end.
 
Then, go to Analyze>Set Scale. Enter the known distance and it will tell you the number of pixels per unit of length. Unfortunately, the Mosaic package will still make all measurement in pixels even after applying this step, so it makes sense to do at the end.
 
Repeat 3-8 for each run you are interested in. Step 9 is only needed once so long as the magnification is constant for all images.
 
An example of steps 6-8 with other data can be found here: http://mosaic.mpi-cbg.de/ParticleTracker/tutorial.html

Latest revision as of 17:24, 10 February 2014

Back to 2014.

Mosaic is a program that finds spherical particles in images and tracks their trajectories, which can be used in our analysis for Brownian Motion.

You will need Steps 1 & 9 for the calibration, the other steps are used for extracting the trajectories.


Instructions for using Mosaic:

Step 1. Download Fiji

In order to use Mosaic, you will need to use a software package called ImageJ. It is a package from the NIH built for image processing and analysis using Java. The easiest implementation I can find is called Fiji, (Fiji Is Just) ImageJ, that allows for easy updates to the ImageJ package and any additional plugins.

You can find Fiji for your system at http://fiji.sc/Fiji

Step 2. Register Mosaic in your copy of Fiji

Mosaic may not be included by default in your copy of Fiji (at time of writing, it was not). Fiji takes care of version tracking when Mosaic needs to be updated, so if it isn’t included, you should add Mosaic to the list of update sites.

To do this, go to the Fiji Updater, then Advanced>Manage update sites. Click Add, then paste this URL: http://mosaic.mpi-cbg.de/Downloads/update/Fiji/MosaicToolsuite. Run an update, then restart. Mosaic should now appear in the Plugins menu.

Step 3. Import your image sequence.

Go to File>Import>Image Sequence. Choose the folder where your images are stored. By default, the options that come up will set the number of images to the number of files in the folder. Because of this, it may be easiest to store each run in a different folder.

Step 4. Convert to 8-bit greyscale

This is needed to make the particle detection easier. Go to Image>Type>8-bit.

Step 5. Set threshold to remove white noise

Image>Adjust>Threshold. The default should be good. When done, you should get a series of images with only a few blacks dots on a white background.

Step 6. Use Mosaic to find the particles

Plugins>Mosaic>Particle Tracker 2D/3D. This is 2D data - for other purposes, slices can be taken simultaneously at different Z levels, but this is not what you did so it is not 3D data.

You will need to change the particle detection parameters. This will define the cutoff for what Mosaic will look for as a particle. There are three parameters you need to be concerned with at this stage: Radius, Cutoff, and Per/Abs. Radius is obvious, the other two deal with how stringently the analyzer will eliminate possible particles. The higher value of cutoff, the harder mosaic will eliminate possible fake particles. Per/Abs is the percentage of the high intensity particles that will be used for analysis, as this value increases, more particles (and also more non-particles) will be detected.

Unfortunately, there is no strict setting for this analysis. You will have to modify these values until you get particles that seem reasonable. I would HIGHLY suggest using Preview Detected - the full particle tracker takes some time and will take much longer as the radius increases.

Suggested ranges should be 5-15 for the radius, 1-5 for cutoff, 0.1-0.5 for per/abs. Zoom in to see how well your preview detections work. When you’ve found what you think will be a good fit, press OK.

Step 7. Make adequate trajectories

When step 6 is done, click Visualize All Trajectories and you will see a lot of colored lines on your sequence. These are the trajectories that were found using your definitions for particles. Each red line is an instance where the algorithm lost track of the particle. This is because it likely jumped outside of the default bounds. To change these, when in the Results window, go to Relink Particles.

Now, you must set the link range and displacement. Link range details the number of subsequent frames to determine optimal matching. We would think this should be high, but it appears to average out a lot of the brownian motion, so keep this as low as possible (2 should work). Displacement is the maximum number of pixels a particle is allowed to move.

This step should be fast. You will have a good trajectory when you see one that has no red jumps. Double click on one such trajectory and move through the frames to see that the particle is matched on each frame.

Step 8. Export the steps

After you find a good trajectory, click “Selected Trajectory to Table”. You will see x and y values for each frame. Save them by going to File>Save As. It will likely be easiest to use a .txt format (default is .xls, you must add the .txt extension in the save dialog if it is not present). The values stored will be in absolute pixel locations, you will have to get the deltas and deltay from consecutive frames.

Step 9. Get conversion from pixels to µm

Lastly, after you have enough steps, you need to have the conversion from pixels to µm. Open your scale image using the File>Open dialog. Next, use the straight line tool to draw a level line across as much of the scale as you have, terminating in the centers of a hash mark at either end.

Then, go to Analyze>Set Scale. Enter the known distance and it will tell you the number of pixels per unit of length. Unfortunately, the Mosaic package will still make all measurement in pixels even after applying this step, so it makes sense to do at the end.

Repeat 3-8 for each run you are interested in. Step 9 is only needed once so long as the magnification is constant for all images.

An example of steps 6-8 with other data can be found here: http://mosaic.mpi-cbg.de/ParticleTracker/tutorial.html