Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_RADIUS
The default max radius constraining the fit.
|
static int |
MIDPOINTS
Flag specifying that the computed path should only inherit midpoint
refinement of node coordinates
|
static int |
RADII
Flag specifying that the computed path should only inherit fitted radii
attributes
|
static int |
RADII_AND_MIDPOINTS
Flag specifying that the computed path should inherit both midpoint
refinement of node coordinates and radii
|
Constructor and Description |
---|
PathFitter(ij.ImagePlus imp,
Path path)
Instantiates a new PathFitter.
|
PathFitter(SNT plugin,
Path path)
Instantiates a new PathFitter.
|
Modifier and Type | Method and Description |
---|---|
Path |
call()
Takes the signal from the image specified in the constructor to fit
cross-section circles around the nodes of input path.
|
int |
getMaxRadius()
Gets the current max radius
|
Path |
getPath() |
boolean |
getSucceeded()
Checks whether the fit succeeded.
|
void |
setImp(ij.ImagePlus imp)
Sets the target image
|
void |
setMaxRadius(int maxRadius)
Sets the max radius (side search) for constraining the fit.
|
void |
setProgressCallback(int fitterIndex,
sc.fiji.snt.MultiTaskProgress progress) |
void |
setReplaceNodes(boolean replaceNodes)
Sets whether fitting should occur "in place".
|
void |
setScope(int scope)
Sets the fitting scope.
|
void |
setShowAnnotatedView(boolean showAnnotatedView)
Sets whether an interactive image of the result should be displayed.
|
public static int DEFAULT_MAX_RADIUS
public static final int RADII
public static final int MIDPOINTS
public static final int RADII_AND_MIDPOINTS
public PathFitter(ij.ImagePlus imp, Path path)
imp
- the Image containing the signal to which the fit will be
performedpath
- the Path
to be fittedpublic void setShowAnnotatedView(boolean showAnnotatedView)
showAnnotatedView
- If true, an interactive stack (cross-section view)
of the fit is displayed. Note that this is probably
only useful if SNT's UI is visible and functional.public void setProgressCallback(int fitterIndex, sc.fiji.snt.MultiTaskProgress progress)
public Path call() throws IllegalArgumentException
setMaxRadius(int)
.
Note that connectivity of path may need to be rebuild upon fit.call
in interface Callable<Path>
IllegalArgumentException
- If path already has been fitted, and its
fitted version not nullifiedsetScope(int)
public Path getPath()
public boolean getSucceeded()
public int getMaxRadius()
DEFAULT_MAX_RADIUS
if setMaxRadius(int)
has not
been calledpublic void setMaxRadius(int maxRadius)
maxRadius
- the new maximum radiuspublic void setScope(int scope)
scope
- Either RADII
, MIDPOINTS
, or
RADII_AND_MIDPOINTS
public void setReplaceNodes(boolean replaceNodes)
replaceNodes
- If true, the nodes of the input Path will be replaced by
those of the fitted result. If false, the fitted result
is kept as a separated Path linked to the input as per
Path.getFitted()
. Note that in the latter case,
some topological operations (e.g., forking) performed on
the fitted result may not percolate to the unfitted Path.public void setImp(ij.ImagePlus imp)
imp
- the Image containing the signal to which the fit will be
performedCopyright © 2015–2021 Fiji. All rights reserved.