This is an old revision of the document!


BacTrack User Manual

BacTrack GUI

Image below shows the BacTrack GUI.

GUI consists of three main parts:

  • R/G/B channel images, scrollable image panes showing every second frame of the experiment
  • Frame/cell tree on the right showing all frames and cells/ROIs
  • Status window showing messages from the program (can be minified)

If you chose (click) on a frame(on the tree or on the R/G/B channel image) a new image stack will appear showing that frame's images in all combinations: R, G, B, R+G, R+B, B+G, RGB, with annotated ROIs (you can turn off annotations using Roi Manager):

One can scroll to any of these and use it (typically) to assign ROIs using ImageJ polygon selection tool.

Every GUI command/option is described in detail below (also, note the table of contents on the upper right side).

Experiment

Setup new experiment

You must prepare, beforehand, three folders: red, green and blue (each containing image sequence of the appropriate channel).
Images must be 8-bit PNGs, and must be named unanimously (having the same name, and increasing number at the end), e.g.:

  • prpdesGFPmCherryWag05prop01_32_white0000.png
  • prpdesGFPmCherryWag05prop01_32_white0001.png
  • prpdesGFPmCherryWag05prop01_32_white0002.png

Don't worry, ImageJ will do this for you (by deafault), if you say File→Save As→Image sequence. Also, note that once you've processed the movie (i.e. performed cell segmentations) you can measure on a whole different set of images (typically original TIFFs), as long as the ROIs (cell selections) hit the same spot. These folders should not be moved afterwards (in this version) - the program will expect images to be at the same place when you (later) load the experiment. Should you move them, you'll have to edit the experiment properties and set the new file locations. In other words, images WILL NOT be saved to database, only the calculated/defined ROIs, measurements etc.

Load experiment

Use Alt+2 or Experiment→Load experiment. Pick an existing experiment and wait for the experiment to load. If you don't see the images on the R/G/B channels, that probably means that you haven't set up the folders right (see above), or you received a database from someone else and need to point the R/G/B folders to new locations. Either way:

Edit experiment (settings)

Once you've loaded the experiment you can change it's settings via Experiment→Edit current experiment or Alt+4.
You'll get a dialog like this one:

The most common use case for changing the experiment settings is when someone sends you his or hers database and adjoining image files.
Since they've probably stored the in the different folder (than you), you'll have to change this folder paths in order for the images to load.

Delete experiment

To delete the experiment chose Alt+3 or Experiment→delete.
This will not delete the image files on your disk, just the records in the database pertaining to that experiment.

Segmentation

Once you've set up your experiment, given it a name, and set the images folders, you may proceed to actual cell segmentation.

Detecting translations (registering)

It is common for have slight translations from one frame to another (eg due to sligt camera movements).
It is very important to align or “register” such images, since the default built-in “Copy-and-Adjust” algorithm is very sensitive to such defects.
You can use an external program to align/register images beforehand, all the better (e.g. http://bigwww.epfl.ch/thevenaz/stackreg/). However, there is also a built-in algorithm for detection of translations, and if you haven't aligned the images externally, this is the first thing you must do in the segmentation process. The built-in algorithm is suitable only for translations, so if you have rotations or some other kind of transformations, you'll have to adjust such images externally.

Built-in algorith

Select the first frame and then click “Detect trans” button below the cell tree on the right. The program will ask you for a range (default = 20), this number specifies the number of pixels the program will 'slide' one image over the other (in every direction) in an attempt to align them. Start with default = 20 (bigger number = slower), you can later detect translation for just one problematic frame if you need to (with the higher value than 20). Translations will be saved to database and you will not have to do this again.

Define initial cells

The built-in C&A algorithm tracks cells with regars to their position on the previous frame.
This implies that you have to define the initial cells on the first frame, and start tracking from the second frame.
To achieve that:

  • Open the first frame, and define bacteria. You click on the frame tree (right) and issue “Add” command to generate bacteria,

and then you click on the bacterium and “Add” human ROIs (Regions Of Interest, i.e. selections) Then you repeat the following (for each bacterium):

  • define ROI with ImageJ's polygon selection tool
  • click on the appropriate Human ROI node in the frame tree and issue 'Set Roi' command.

Tracking algorithm

Before describing the tracking via built-in algorithm, a quick note on the BactTrack modular structure.
BacTrack is designed to be a “platform for the cell segmentation and tracking” and should, ideally, be able to handle any such task. We recognize that there is no single algorithm suitable for all kinds of tracking tasks and have therefore enabled for various algorithms to be included in the BacTrack Platform and used for cell segmentation. While algorithm design is more a task for the developers (please, see Devs documentation), the user, on the other hand, has the option to use any of the available algorithms. Not only can different algorithms be used for different experiments, the user can assign different algorithms for different frames of the same experiment!
Using the “Set Algorithm” command, a chosen algorithm can be assigned for any frame range. If not assigned, the default built-in “Copy And Adjust” algorithm is used. There is a “Fast Copy And Adjust” version of the algorithm available (not default) which differs from the default algorithm in the amount of information written to the log. The “Fast Copy And Adjust” writes minimal information and is therefore faster, however cell segmentation results are identical.

Track

Click on the frame (e.g. second frame) and issue 'Track' command. Enter the number of frames to process (default = 5).
Track will attempt to segment the cells on the assigned number of frames starting from the selected frame.
Each cell/frame is segmented using that cell's ROI from the previous frame.
Human ROIs always have precedence over computer ROIs, e.g. if there are both human and computer ROIs on the previous frame, the algorithm will use human ROI.

When you issue the “Track” command you'll have the option of changing certain algorithm parameters. This is useful in situations when algorithm does not perform well.

Parameters description:

  • “Ball radius” is a value in pixel that defines the size(radius) of the disk used to “draw” the cell. You may think of it as a radius of the tip of the broad ballpen used to draw the cell. In other words, this radius relates to the width of a cell - and you can measure that width W with ImageJ (or simply by zooming and counting the pixels yourself) and then assign the ball radius to just below the W/2. The default value is 4 which is appropriate for the cells of width 9, 10, 11…
  • “Channel” is simply the channel used for segmentation, or more precisely - images from the so labelled channels (folders) are used. Note that you can use e.g. blue channel for the first 10 frames, then green channel for the next five, then blue again, etc. In general, you want to use the channel on which the edge detection works best, you can try that for yourself using ImageJ or “Help decide” button below.
  • “Range” is a value in pixels relating to the possible elongation of the cells on their poles. If the algorithm doesn't catch up will cell growth on the poles, you may want to increase this number.
  • “Max ball delta perc” is given in percentages and defines the maximal additional area one disk can contribute when expanding the selection. If you find that the cells are erroneously growing to fast, “bubbling up” on the sides and poles, you may want to decrease this number.
  • “Threshold method” - the C&A algorithm relies heavily on the edge detection (and subsequent thresholding). If the algorithm performs badly, you may want to try changing the default method, you should choose the method that best outlines the cells (click 'Help decide' to see the gallery of methods).

Once you've set the parameters, the program will attempt to track the cells. You'll be able to see the segmentation as it happens and/or inspect it again using the “Reports” facilities:

Reports

There are two types of reports (and command buttons):

  • “Color report” is a report (ImageJ stack) on which every cell is drawn in a different color, while background is drawn in black.
    Cell's offsprings will be drawn in the nuance of the parent-cell color, e.g. all descendant of the red cell will be drawn in nuances of red. Example:
  • “Report” is a report (ImageJ stack) on which cells ROIs are outlined over original images. There is also a color/BW version of this report (you're asked to chose on click). BW report uses less memory as each of the stack's image is BW and, of course, BW use less memory than color images.
    • BW - human ROIs are outlined with white, and computer ROIs with black
    • Color - human ROIs are outlined with green and computer ROIs with red, e.g.:

Cell divisions

For the time being cell division recognition is not supported and cell divisions are assigned manually in the following way:

  1. Open the frame where bacteriium (e.g. bacterium 'B') is splitting
  2. Click on the bacterium 'B' on the frame tree and issue “Split” command.
  3. Program will replace this bacterium in the current frame with its two offsprings: 'BA' and 'BB'. They will both have the human ROIs defined (erroneously), you have to overwrite it:
    • Define ROIs with ImageJ's polygon selection tool for each offspring (and click “SetRoi” to save).

Split move/delete - If you made an error and defined split on the wrong frame, you can move the split up/down N frames, or even delete it all together. To move the split you have to select one of the children in the split frame, and click on the “Move/del split”.
E.g. let's say there is a split on the frame 10: A = AA + AB. QQ Click on either AA or AB and then click 'Move/del split'.
The procedure is also thoroughly explained (in the program) when you click the “Move/del split” (and you have a chance to cancel if you change you mind).

Print/export
QR Code
QR Code man (generated for current page)