public abstract class PropagateSeeds extends Object
This class supports two methods:
In both cases the aim is to shrink the object (which is white) to prevent overlapping foreground and background in next frame (assuming that objects are moving). The same is for background. Finally, the new seed should have set foreground pixels to area inside the object and background pixels in remaining part of image. There should be unseeded strip of pixels around the object.
Modifier and Type | Class and Description |
---|---|
static class |
PropagateSeeds.Contour
Contain methods for propagating seeds to the next frame using contour shrinking operations.
|
static class |
PropagateSeeds.Dummy
Empty propagator.
|
static class |
PropagateSeeds.Morphological
Contain methods for propagating seeds to next frame using morphological operations.
|
static class |
PropagateSeeds.Propagators
Seed propagators available in this class.
|
Modifier and Type | Field and Description |
---|---|
static double |
colorScaling
Scale color values in composite preview.
|
boolean |
darkBackground
Default setting.
|
protected List<Seeds> |
seeds
Container for FG and BG seeds pixels used for seed visualisation.
|
static int |
STEPS
Default resolution used during outlining objects.
|
protected boolean |
storeSeeds
By default seed history is not stored.
|
Constructor and Description |
---|
PropagateSeeds()
Default constructor.
|
PropagateSeeds(boolean storeSeeds,
ij.process.AutoThresholder.Method trueBackground)
Allow to store seed history that can be later presented in form of composite image.
|
Modifier and Type | Method and Description |
---|---|
ij.ImagePlus |
getCompositeSeed(ij.ImagePlus org,
int offset)
Produce composite image containing seeds generated during segmentation of particular frames.
|
static PropagateSeeds |
getPropagator(PropagateSeeds.Propagators prop,
boolean storeseeds,
ij.process.AutoThresholder.Method trueBackground)
Return demanded propagator.
|
abstract Seeds |
propagateSeed(ij.process.ImageProcessor previous,
ij.process.ImageProcessor org,
double shrinkPower,
double expandPower)
Propagate seed.
|
void |
setTrueBackgroundProcessing(ij.process.AutoThresholder.Method method)
Turn on processing background before using it as seed.
|
public boolean darkBackground
public static final int STEPS
protected boolean storeSeeds
protected List<Seeds> seeds
Every imageProcessor in pair contains important bits set to WHITE. For example BG pixels are white here as well as FG pixels.
getCompositeSeed(ImagePlus, int)
,
storeSeeds
public static final double colorScaling
1.0 stand for opaque colors.
public PropagateSeeds()
public PropagateSeeds(boolean storeSeeds, ij.process.AutoThresholder.Method trueBackground)
storeSeeds
- true to store seeds.trueBackground
- if not null, selected method will be used for estimating true background
- excluding bright objects from itgetCompositeSeed(ImagePlus, int)
public static PropagateSeeds getPropagator(PropagateSeeds.Propagators prop, boolean storeseeds, ij.process.AutoThresholder.Method trueBackground)
prop
- propagator to createstoreseeds
- true for storing seedstrueBackground
- if not null, selected method will be used for estimating true
background - excluding bright objects from itpublic ij.ImagePlus getCompositeSeed(ij.ImagePlus org, int offset) throws RandomWalkException
To have this method working, the Contour object must be created with storeSeeds==true.
org
- Original image (or stack) where composite layer will be added to.offset
- Slice number to display in composite if there is stack provided. Ignored if org
is single image. Set it to 0 to dispplay whole stack.RandomWalkException
- When seeds were not collected.public abstract Seeds propagateSeed(ij.process.ImageProcessor previous, ij.process.ImageProcessor org, double shrinkPower, double expandPower)
Each separated object found in previous is returned as separate BW map in
Seeds
under RandomWalkSegmentation.SeedTypes.FOREGROUNDS
map. previous can contain grayscale
labelled objects.
previous
- the previousorg
- original image that new seeds are computed for. Usually it is current imageshrinkPower
- the shrink powerexpandPower
- the expand powergetTrueBackground(ImageProcessor, ImageProcessor)
,
setTrueBackgroundProcessing(ij.process.AutoThresholder.Method)
public void setTrueBackgroundProcessing(ij.process.AutoThresholder.Method method)
method
- Threshold method. null for turning off processingCopyright © 2002–2019 Department of Computer Science, Warwick University. All rights reserved.