public class BinarySegmentation extends Object
This class mainly join subsequent outlines to chains that contain outlines related by origin ( when next outline originates from previous - it means that next object overlap previous one) The segmentation itself - generation of outlines for one slice is done in TrackOutline class
The ROIs are grouped according to their origin and they have assigned frame number where they appeared. The algorithm is as follows: The frames from input stack from first to before last are processed. For every i-th frame the outlines are obtained and compared with i+1 frame. If any of k-th outline from i+1 frame overlap l-th outline on i-th frame, the k-th outline gets the same id as l-th but only if k-th does not have any ID yet. There for if there is outline that does not have source on i-th frame, it will skipped now but it will be found in next iteration and because it does not have ID, the new will be assigned to it.
If there is break in chain (missing object), the object on the next frame will begin the new
chain.
After creation of object user has to call trackObjects() to run tracking. Segmentation is run on
object creation. Finally, getChains() should be called to get results - chains of outlines.
For grayscale input algorithm compares stroke color of ROIs that can be set to color of
pixels, the roi was taken from by TrackOutline.setColors()
. This assume that color does
not change for particular cell within frame.
TrackOutline
Constructor and Description |
---|
BinarySegmentation(ij.ImagePlus ip)
Constructor for segmentation of stack.
|
Modifier and Type | Method and Description |
---|---|
ArrayList<ArrayList<SegmentedShapeRoi>> |
getChains()
Compose chains of object related to each others along frames.
|
void |
trackObjects()
Main runner for tracking.
|
public BinarySegmentation(ij.ImagePlus ip) throws QuimpPluginException
ip
- stack of images to segmentQuimpPluginException
- when image is null or wrong typepublic void trackObjects()
In result of this method the ROIs kept in TrackOutline objects will be modified by giving them IDs of their parent.
public ArrayList<ArrayList<SegmentedShapeRoi>> getChains()
Relation means that previous object and next one overlap, thus their segmentations will be assigned to the same group and they will be in correct order as they appeared in stack
Copyright © 2002–2019 Department of Computer Science, Warwick University. All rights reserved.