public class Path extends Object implements Comparable<Path>
Paths are non-branching sequences of adjacent points (including diagonals) in the image. Branches and joins are supported by attributes of paths that specify that they begin on (or end on) other paths.
In SNT, a Path can exist in two versions or flavors: itself and a fitted
version generated by PathFitter
. Because fitting may fail around
certain nodes, the fitted version may have a different number of nodes
relatively to its unfitted version
Modifier and Type | Field and Description |
---|---|
protected PointInCanvas |
canvasOffset |
protected ArrayList<Path> |
children |
protected Path |
fitted |
protected Path |
fittedVersionOf |
protected boolean |
invalid3DMesh |
protected static int |
noMoreThanOneEvery |
protected double[] |
precise_x_positions |
protected double[] |
precise_y_positions |
protected double[] |
precise_z_positions |
protected double[] |
radii |
protected ArrayList<Path> |
somehowJoins |
protected String |
spacing_units |
protected Path |
startJoins |
protected PointInImage |
startJoinsPoint |
static int |
SWC_APICAL_DENDRITE
Flag specifying the SWC type 'apical dendrite'.
|
static String |
SWC_APICAL_DENDRITE_LABEL
String representation of
SWC_APICAL_DENDRITE |
static int |
SWC_AXON
Flag specifying the SWC type 'axon'.
|
static String |
SWC_AXON_LABEL
String representation of
SWC_AXON |
static int |
SWC_CUSTOM
Flag specifying the SWC type 'custom'.
|
static String |
SWC_CUSTOM_LABEL
String representation of
SWC_CUSTOM |
static int |
SWC_DENDRITE
Flag specifying the SWC type '(basal) dendrite'.
|
static String |
SWC_DENDRITE_LABEL
String representation of
SWC_DENDRITE |
static int |
SWC_END_POINT
Deprecated.
|
static String |
SWC_END_POINT_LABEL
String representation of
SWC_END_POINT |
static int |
SWC_FORK_POINT
Deprecated.
|
static String |
SWC_FORK_POINT_LABEL
String representation of
SWC_FORK_POINT |
static int |
SWC_SOMA
Flag specifying the SWC type 'soma'.
|
static String |
SWC_SOMA_LABEL
String representation of
SWC_SOMA |
static int |
SWC_UNDEFINED
Flag specifying the SWC type 'undefined'.
|
static String |
SWC_UNDEFINED_LABEL
String representation of
SWC_UNDEFINED |
protected double[] |
tangents_x |
protected double[] |
tangents_y |
protected double[] |
tangents_z |
protected double |
x_spacing |
protected double |
y_spacing |
protected double |
z_spacing |
Constructor and Description |
---|
Path()
Instantiates a new path under default settings (isotropic 1um pixel spacing)
|
Path(double x_spacing,
double y_spacing,
double z_spacing,
String spacing_units)
Instantiates a new path.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Path other) |
protected Content |
addAsLinesTo3DViewer(Image3DUniverse univ,
Color3f c,
ij.ImagePlus colorImage)
Deprecated.
|
Content |
addAsLinesTo3DViewer(Image3DUniverse univ,
Color c,
ij.ImagePlus colorImage)
Deprecated.
|
protected void |
addChangeListener(sc.fiji.snt.PathChangeListener listener) |
Content |
addDiscsTo3DViewer(Image3DUniverse univ,
Color3f c,
ij.ImagePlus colorImage)
Deprecated.
|
Content |
addDiscsTo3DViewer(Image3DUniverse univ,
Color c,
ij.ImagePlus colorImage)
Deprecated.
|
void |
addNode(PointInImage point)
Appends a node to this Path.
|
void |
addPointDouble(double x,
double y,
double z) |
void |
addTo3DViewer(Image3DUniverse univ,
Color3f c,
ij.ImagePlus colorImage)
Deprecated.
|
void |
addTo3DViewer(Image3DUniverse univ,
Color c,
ij.ImagePlus colorImage)
Deprecated.
|
protected String |
childrenAsString() |
Path |
clone() |
Path |
clone(boolean includeImmediateChildren) |
int |
compareTo(Path o) |
boolean |
contains(PointInImage pim)
Check whether this Path contains the specified point
|
protected boolean |
containsUnscaledNodesInViewPort(TracerCanvas canvas) |
void |
createCircles() |
Path |
createPath()
Returns a new Path with this Path's attributes (e.g.
|
protected void |
discardFit() |
protected void |
disconnectFromAll() |
void |
downsample(double maximumAllowedDeviation) |
protected void |
drawPathAsPoints(Graphics2D g2,
TracerCanvas canvas,
SNT snt) |
void |
drawPathAsPoints(TracerCanvas canvas,
Graphics2D g,
Color c,
int plane,
boolean highContrast,
boolean drawDiameter) |
void |
drawPathAsPoints(TracerCanvas canvas,
Graphics2D g2,
Color c,
int plane,
boolean highContrast,
boolean drawDiameter,
int slice,
int either_side) |
protected void |
drawPathAsPoints(TracerCanvas canvas,
Graphics2D g,
Color c,
int plane,
boolean drawDiameter,
int slice,
int either_side) |
TreeSet<Integer> |
findJunctionIndices()
Returns the indices of nodes which are indicated to be a join, either in this
Path object, or any other that starts or ends on it.
|
List<PointInImage> |
findJunctions()
Returns the nodes which are indicated to be a join (junction/branch point),
either in this Path object, or any other that starts or ends on it.
|
double |
getApproximatedVolume()
Returns an estimated volume of this path.
|
ij.measure.Calibration |
getCalibration()
Gets the spatial calibration of this Path.
|
PointInCanvas |
getCanvasOffset()
Returns the translation offset used to render this Path in a
TracerCanvas . |
int |
getChannel()
Gets the hyperstack channel associated with this Path.
|
ArrayList<Path> |
getChildren() |
Color |
getColor()
Gets the color of this Path
|
ColorRGB |
getColorRGB()
Gets the color of this Path
|
double |
getContraction()
Returns the ratio between the "Euclidean distance" of this path and its
length.
|
int |
getEditableNodeIndex()
Gets the position of the node tagged as 'editable', if any.
|
Path |
getFitted()
Gets the fitted version ('flavor') of this Path.
|
int |
getFrame()
Gets the hyperstack frame position associated with this Path.
|
int |
getID()
Gets the identifier of this Path
|
Set<PointInImage> |
getJunctionNodes()
This is a version of
findJunctions() ensuring that a junction node
is only retrieved once even if multiple child paths are associated with it. |
double |
getLength()
Gets the length of this Path
|
double |
getMeanRadius()
Gets the path mean radius.
|
protected double |
getMinimumSeparation() |
String |
getName()
Gets this Path's name.
|
PointInImage |
getNode(int pos)
Gets the node at the specified position.
|
BrainAnnotation |
getNodeAnnotation(int pos)
Returns the neuropil annotation associated with this node.
|
Color |
getNodeColor(int pos)
Gets the node color.
|
Color[] |
getNodeColors()
Gets the node colors.
|
char |
getNodeHemisphereFlag(int pos)
Returns the hemisphere flag associated with this node.
|
int |
getNodeIndex(PointInImage pim)
Gets the first node index associated with the specified image coordinates.
|
double |
getNodeRadius(int pos)
Gets the radius of the specified node.
|
List<PointInImage> |
getNodes()
Gets the nodes of this path.
|
double |
getNodeValue(int pos)
Returns the "value" property of this node.
|
protected PointInImage |
getNodeWithoutChecks(int pos) |
int |
getOrder()
Gets the "bifurcation" (branching) order of this Path.
|
List<Point3f> |
getPoint3fList() |
protected void |
getPointDouble(int i,
double[] p) |
protected PointInCanvas |
getPointInCanvas(int node) |
protected PointInCanvas |
getPointInCanvas2D(int node,
TracerCanvas canvas) |
protected String |
getRealLengthString() |
Path |
getSection(int startIndex,
int endIndex)
Gets a section between two nodes of this Path.
|
int |
getSpineOrVaricosityCount() |
Path |
getStartJoins() |
PointInImage |
getStartJoinsPoint() |
static Color |
getSWCcolor(int swcType)
Gets the default SWC colors used by SNT.
|
int |
getSWCType()
Gets the SWC type.
|
static String |
getSWCtypeName(int type,
boolean capitalized)
Gets the SWC type label associated with the specified type flag.
|
static ArrayList<String> |
getSWCtypeNames()
Gets the list of string representations of non-redundant SWC types (i.e.,
excluding
SWC_FORK_POINT_LABEL , and
SWC_FORK_POINT_LABEL |
static ArrayList<Integer> |
getSWCtypes()
Gets the list of non-redundant SWC types (i.e., excluding the redundant
types
SWC_FORK_POINT_LABEL , and
SWC_FORK_POINT_LABEL |
void |
getTangent(int i,
int pointsEitherSide,
double[] result) |
int |
getTreeID()
Gets the identifier of the
Tree associated to this Path (if any). |
String |
getTreeLabel() |
protected List<PointInCanvas> |
getUnscaledNodesInViewPort(TracerCanvas canvas) |
boolean |
getUseFitted()
Gets whether the fitted 'flavor' of this Path is in use.
|
int |
getXUnscaled(int i) |
double |
getXUnscaledDouble(int i) |
int |
getYUnscaled(int i) |
double |
getYUnscaledDouble(int i) |
int |
getZUnscaled(int i) |
double |
getZUnscaledDouble(int i) |
boolean |
hasCustomColor()
Assesses whether a custom color has been assigned to this Path.
|
boolean |
hasNodeAnnotations()
Assesses whether the nodes of this path have been assigned
BrainAnnotation s. |
boolean |
hasNodeColors()
Assesses whether the nodes of this path have been assigned an array of
colors
|
boolean |
hasNodeHemisphereFlags()
Assesses whether the nodes of this path have been assigned hemisphere flags.
|
boolean |
hasNodeValues()
Assesses whether the nodes of this path have been assigned an array of
values
|
boolean |
hasRadii()
Checks whether the nodes of this path have been assigned defined thickness.
|
protected int |
indexNearestTo(double x,
double y,
double z) |
int |
indexNearestTo(double x,
double y,
double z,
double within)
Gets the index of the closest node associated with the specified world
coordinates.
|
protected int |
indexNearestToCanvasPosition2D(double xInCanvas,
double yInCanvas,
double withinPixels) |
void |
insertNode(int index,
PointInImage point)
Inserts a node at a specified position.
|
protected boolean |
isBeingEdited() |
boolean |
isConnectedTo(Path other) |
protected boolean |
isEditableNodeLocked() |
boolean |
isFittedVersionOfAnotherPath()
Checks if this Path is a fitted version of another path.
|
boolean |
isPrimary()
Checks if this Path is root.
|
boolean |
isSelected() |
protected PointInImage |
lastPoint() |
void |
moveNode(int index,
PointInImage destination)
Assigns a new location to the specified node.
|
PointInImage |
nearestNodeTo(PointInImage node,
double within)
Gets the closest node associated with the specified node.
|
protected static String |
pathsToIDListString(ArrayList<Path> a) |
protected void |
rebuildConnectionsOfFittedVersion() |
protected boolean |
removeChangeListener(sc.fiji.snt.PathChangeListener listener) |
void |
removeFrom3DViewer(Image3DUniverse univ) |
void |
removeNode(int index)
Removes the specified node if this path has at least two nodes.
|
protected void |
replaceNodesWithFittedVersion() |
void |
resetColor()
Resets this path color, forcing SNT to render it under default settings.
|
Path |
reversed() |
void |
setCanvasOffset(PointInCanvas canvasOffset)
Specifies a translation offset when rendering this Path in a
TracerCanvas . |
protected void |
setChildren(Set<Path> pathsLeft) |
void |
setColor(Color color)
Sets this path color.
|
void |
setColor(ColorRGB color)
Sets this path color.
|
void |
setCTposition(int channel,
int frame)
Sets the hyperstack position of this Path
|
void |
setEditableNode(int index)
Tags the specified point position as 'editable'.
|
protected void |
setEditableNodeLocked(boolean editableNodeLocked) |
protected void |
setFitted(Path p) |
protected void |
setFittedCircles(int nPoints,
double[] tangents_x,
double[] tangents_y,
double[] tangents_z,
double[] radii,
double[] optimized_x,
double[] optimized_y,
double[] optimized_z) |
void |
setGuessedTangents(int pointsEitherSide) |
protected void |
setIDs(int pathID,
int treeID) |
protected void |
setIsPrimary(boolean primary) |
void |
setName(String newName)
Sets this Path's name.
|
void |
setNodeAnnotation(BrainAnnotation annotation,
int pos)
Assigns an annotation to an existing node.
|
void |
setNodeColor(Color color,
int pos)
Sets the node color.
|
void |
setNodeColor(ColorRGB color,
int pos)
Sets the node color.
|
void |
setNodeColors(Color[] colors)
Sets the node colors.
|
void |
setNodeHemisphere(char hemisphereFlag,
int pos)
Assigns an hemisphere to an existing node.
|
void |
setNodeValue(double value,
int pos)
Assigns the "value" property to this node.
|
void |
setNodeValues(double[] values)
Sets the path "values", the array containing the numeric property assigned
to path nodes, typically voxel intensities.
|
void |
setOrder(int order) |
void |
setRadii(double[] radii)
Assigns radii to this Path
|
void |
setRadius(double r)
Assigns a fixed radius to all the nodes of this Path
|
void |
setRadius(double r,
int index) |
void |
setSelected(boolean newSelectedStatus) |
protected void |
setSpacing(ij.measure.Calibration cal) |
void |
setSpineOrVaricosityCount(int newCount) |
void |
setStartJoin(Path other,
PointInImage joinPoint) |
void |
setSWCType(int newSWCType)
Sets the SWC type.
|
protected void |
setSWCType(int newSWCType,
boolean alsoSetInFittedVersion) |
protected void |
setTreeLabel(String treeLabel) |
void |
setUseFitted(boolean useFitted)
Sets whether the fitted flavor of this Path should be used.
|
int |
size()
Returns the number of nodes of this path
|
protected String |
somehowJoinsAsString() |
protected void |
stopBeingEdited() |
String |
toString()
This toString() method shows details of the path which is actually being
displayed, not necessarily this path object.
|
Path |
transform(PathTransformer transformation,
ij.ImagePlus template,
ij.ImagePlus model) |
protected void |
unsetPrimaryForConnected(HashSet<Path> pathsExplored) |
void |
unsetStartJoin() |
boolean |
versionInUse() |
public static final int SWC_UNDEFINED
public static final int SWC_SOMA
public static final int SWC_AXON
public static final int SWC_DENDRITE
public static final int SWC_APICAL_DENDRITE
@Deprecated public static final int SWC_FORK_POINT
@Deprecated public static final int SWC_END_POINT
public static final int SWC_CUSTOM
public static final String SWC_UNDEFINED_LABEL
SWC_UNDEFINED
public static final String SWC_SOMA_LABEL
SWC_SOMA
public static final String SWC_AXON_LABEL
SWC_AXON
public static final String SWC_DENDRITE_LABEL
SWC_DENDRITE
public static final String SWC_APICAL_DENDRITE_LABEL
SWC_APICAL_DENDRITE
public static final String SWC_FORK_POINT_LABEL
SWC_FORK_POINT
public static final String SWC_END_POINT_LABEL
SWC_END_POINT
public static final String SWC_CUSTOM_LABEL
SWC_CUSTOM
protected static final int noMoreThanOneEvery
protected double[] precise_x_positions
protected double[] precise_y_positions
protected double[] precise_z_positions
protected double[] radii
protected double[] tangents_x
protected double[] tangents_y
protected double[] tangents_z
protected PointInCanvas canvasOffset
protected double x_spacing
protected double y_spacing
protected double z_spacing
protected String spacing_units
protected Path startJoins
protected PointInImage startJoinsPoint
protected Path fitted
protected Path fittedVersionOf
protected boolean invalid3DMesh
public Path()
public Path(double x_spacing, double y_spacing, double z_spacing, String spacing_units)
x_spacing
- Pixel width in spacing_unitsy_spacing
- Pixel height in spacing_unitsz_spacing
- Pixel depth in spacing_unitsspacing_units
- the length unit in physical world units (typically
"um").public int compareTo(Path o)
compareTo
in interface Comparable<Path>
public int getID()
public int getTreeID()
Tree
associated to this Path (if any).protected void setIDs(int pathID, int treeID)
protected void setTreeLabel(String treeLabel)
public String getTreeLabel()
public void setCanvasOffset(PointInCanvas canvasOffset)
TracerCanvas
. Path coordinates remain unaltered.canvasOffset
- the x,y,z coordinates (pixel-based) specifying the
translation offsetpublic PointInCanvas getCanvasOffset()
TracerCanvas
.public Path getStartJoins()
public PointInImage getStartJoinsPoint()
public void setName(String newName)
""
, to reset it to the
default.newName
- the new name.getName()
public String getName()
setName(String)
protected String somehowJoinsAsString()
protected String childrenAsString()
public double getContraction()
NaN
if this Path has no lengthpublic double getLength()
protected String getRealLengthString()
public void createCircles()
protected void setIsPrimary(boolean primary)
public boolean isPrimary()
protected void disconnectFromAll()
public void setStartJoin(Path other, PointInImage joinPoint)
protected void replaceNodesWithFittedVersion()
protected void rebuildConnectionsOfFittedVersion()
public void unsetStartJoin()
protected double getMinimumSeparation()
public int size()
protected void getPointDouble(int i, double[] p)
public PointInImage getNode(int pos) throws IndexOutOfBoundsException
pos
- the position index (0-based). NB: You can use -1 to retrieve the
last node in the PathIndexOutOfBoundsException
- if position is out-of-rangepublic List<PointInImage> getNodes()
protected PointInImage getNodeWithoutChecks(int pos)
protected PointInCanvas getPointInCanvas(int node)
protected PointInCanvas getPointInCanvas2D(int node, TracerCanvas canvas)
protected List<PointInCanvas> getUnscaledNodesInViewPort(TracerCanvas canvas)
protected boolean containsUnscaledNodesInViewPort(TracerCanvas canvas)
public boolean contains(PointInImage pim)
pim
- the PointInImage
nodepublic void insertNode(int index, PointInImage point)
index
- the (zero-based) index of the position of the new nodepoint
- the node to be insertedIllegalArgumentException
- if index is out-of-rangepublic void removeNode(int index)
index
- the zero-based index of the node to be removedIllegalArgumentException
- if index is out-of-rangepublic void moveNode(int index, PointInImage destination)
index
- the zero-based index of the node to be modifieddestination
- the new node locationIllegalArgumentException
- if index is out-of-rangepublic int getNodeIndex(PointInImage pim)
pim
- the image position (calibrated coordinates)public PointInImage nearestNodeTo(PointInImage node, double within)
node
- location to be searched forwithin
- sets the search sensitivity. E.g., Setting it to
Double.MAX_VALUE (or the image's largest dimension) will always
return a valid node.public int indexNearestTo(double x, double y, double z, double within)
x
- the x-coordinates (spatially calibrated image units)y
- the y-coordinates (spatially calibrated image units)z
- the z-coordinates (spatially calibrated image units)within
- sets the search sensitivity. E.g., Setting it to
Double.MAX_VALUE (or the image's largest dimension) will always
return a valid index.protected int indexNearestToCanvasPosition2D(double xInCanvas, double yInCanvas, double withinPixels)
protected int indexNearestTo(double x, double y, double z)
public int getEditableNodeIndex()
public void setEditableNode(int index)
index
- the index of the point to be tagged. Set it to -1 to for no
taggingprotected boolean isBeingEdited()
protected void stopBeingEdited()
protected boolean isEditableNodeLocked()
protected void setEditableNodeLocked(boolean editableNodeLocked)
public int getXUnscaled(int i)
public int getYUnscaled(int i)
public int getZUnscaled(int i)
public double getXUnscaledDouble(int i)
public double getYUnscaledDouble(int i)
public double getZUnscaledDouble(int i)
public Path getSection(int startIndex, int endIndex)
startIndex
- the node index defining the first node of the sectionendIndex
- the node index defining the last node of the sectionpublic Path createPath()
protected void setSpacing(ij.measure.Calibration cal)
public Path clone(boolean includeImmediateChildren)
public ij.measure.Calibration getCalibration()
protected PointInImage lastPoint()
public void add(Path other)
public Path reversed()
public void addNode(PointInImage point)
point
- the node to be insertedpublic void addPointDouble(double x, double y, double z)
public void drawPathAsPoints(TracerCanvas canvas, Graphics2D g, Color c, int plane, boolean highContrast, boolean drawDiameter)
protected void drawPathAsPoints(TracerCanvas canvas, Graphics2D g, Color c, int plane, boolean drawDiameter, int slice, int either_side)
protected void drawPathAsPoints(Graphics2D g2, TracerCanvas canvas, SNT snt)
public void drawPathAsPoints(TracerCanvas canvas, Graphics2D g2, Color c, int plane, boolean highContrast, boolean drawDiameter, int slice, int either_side)
public void setNodeColors(Color[] colors)
colors
- the colors used to render the nodes of this. If null (the
default) all nodes are rendered using the Path color.public Color[] getNodeColors()
public Color getNodeColor(int pos)
pos
- the node positionpublic void setNodeColor(Color color, int pos)
color
- the node colorpos
- the node positionpublic void setNodeColor(ColorRGB color, int pos)
color
- the node colorpos
- the node positionpublic void setNodeValue(double value, int pos)
value
- the node valuepos
- the node positionPathProfiler.assignValues()
public void setNodeAnnotation(BrainAnnotation annotation, int pos)
annotation
- the node annotationpos
- the node positionpublic void setNodeHemisphere(char hemisphereFlag, int pos)
hemisphereFlag
- the node hemisphere flag.pos
- the node positionpublic double getNodeValue(int pos)
pos
- the node positionPathProfiler.assignValues()
,
PointInImage.v
public BrainAnnotation getNodeAnnotation(int pos)
pos
- the node positionSNTPoint.getAnnotation()
public char getNodeHemisphereFlag(int pos)
pos
- the node positionBrainAnnotation.LEFT_HEMISPHERE
,
BrainAnnotation.RIGHT_HEMISPHERE
, or
BrainAnnotation.ANY_HEMISPHERE
SNTPoint.getAnnotation()
public void setNodeValues(double[] values)
values
- the new node valuesPointInImage.v
,
PathProfiler.assignValues()
public boolean hasNodeValues()
PointInImage.v
,
PathProfiler.assignValues()
public boolean hasNodeAnnotations()
BrainAnnotation
s.SNTPoint.getAnnotation()
public boolean hasNodeHemisphereFlags()
SNTPoint.getHemisphere()
public Color getColor()
hasCustomColor
,
hasNodeColors()
public ColorRGB getColorRGB()
hasCustomColor
,
hasNodeColors()
public void setColor(Color color)
color
- the path color. Set it to null, to have SNT render this Path
using default settings. You may need to cast the null reference
to Color
to avoid ambiguous method overloadpublic void setColor(ColorRGB color)
color
- the path color. Set it to null, to have SNT render this Path
using default settings. You may need to cast the null reference
to ColorRGB
to avoid ambiguous method overloadpublic void resetColor()
public boolean hasCustomColor()
hasNodeColors()
public boolean hasNodeColors()
getNodeColors()
public static Color getSWCcolor(int swcType)
swcType
- the SEC type (e.g., SWC_AXON
,
SWC_DENDRITE
, etc.)public boolean isFittedVersionOfAnotherPath()
protected void setFitted(Path p)
public void setUseFitted(boolean useFitted) throws IllegalArgumentException
useFitted
- the new use fittedIllegalArgumentException
- if this Path has not been fittedprotected void discardFit()
public boolean getUseFitted()
public int getSpineOrVaricosityCount()
public void setSpineOrVaricosityCount(int newCount)
public int getChannel()
public int getFrame()
public void setCTposition(int channel, int frame)
channel
- the channel (one-based index)frame
- the frame (one-based index)public Path getFitted()
public void setGuessedTangents(int pointsEitherSide)
public void getTangent(int i, int pointsEitherSide, double[] result)
public static ArrayList<String> getSWCtypeNames()
SWC_FORK_POINT_LABEL
, and
SWC_FORK_POINT_LABEL
public static ArrayList<Integer> getSWCtypes()
SWC_FORK_POINT_LABEL
, and
SWC_FORK_POINT_LABEL
public static String getSWCtypeName(int type, boolean capitalized)
type
- the SWC type flagcapitalized
- whether output String should be capitalizedSWC_UNDEFINED_LABEL
if flag
was not recognizedpublic double getMeanRadius()
hasRadii()
public double getNodeRadius(int pos)
pos
- the node positionpublic boolean hasRadii()
protected void setFittedCircles(int nPoints, double[] tangents_x, double[] tangents_y, double[] tangents_z, double[] radii, double[] optimized_x, double[] optimized_y, double[] optimized_z)
public String toString()
public void setSWCType(int newSWCType)
newSWCType
- the new SWC typeprotected void setSWCType(int newSWCType, boolean alsoSetInFittedVersion)
public int getSWCType()
public int getOrder()
PathManagerUI
's JTree: E.g., a Path connected to a primary Path
(order 1) will be assigned order 2, etc.. N.B.: Albeit related to reverse
Horton-Strahler classification, Path ordering is formally distinct, as it
classifies Paths instead of branches.StrahlerAnalyzer
public void setOrder(int order)
public void removeFrom3DViewer(Image3DUniverse univ)
@Deprecated public Content addAsLinesTo3DViewer(Image3DUniverse univ, Color c, ij.ImagePlus colorImage)
@Deprecated protected Content addAsLinesTo3DViewer(Image3DUniverse univ, Color3f c, ij.ImagePlus colorImage)
@Deprecated public Content addDiscsTo3DViewer(Image3DUniverse univ, Color c, ij.ImagePlus colorImage)
@Deprecated public Content addDiscsTo3DViewer(Image3DUniverse univ, Color3f c, ij.ImagePlus colorImage)
@Deprecated public void addTo3DViewer(Image3DUniverse univ, Color c, ij.ImagePlus colorImage)
@Deprecated public void addTo3DViewer(Image3DUniverse univ, Color3f c, ij.ImagePlus colorImage)
public void setSelected(boolean newSelectedStatus)
public boolean isSelected()
public boolean versionInUse()
public double getApproximatedVolume()
The most accurate volume of each path segment would be the volume of a convex hull of two arbitrarily oriented and sized circles in space. This is tough to work out analytically, and this precision isn't really warranted given the errors introduced in the fitting process, the tracing in the first place, etc. So, this method produces an approximate volume assuming that the volume of each of these parts is that of a truncated cone (Frustum) , with circles of the same size (i.e., as if the circles had simply been reoriented to be parallel and have a common normal vector)
For more accurate measurements of the volumes of a neuron, you should use the filling interface.
hasRadii()
public Path transform(PathTransformer transformation, ij.ImagePlus template, ij.ImagePlus model)
public List<PointInImage> findJunctions()
PointInImage
objectsfindJunctionIndices()
,
getJunctionNodes()
public Set<PointInImage> getJunctionNodes()
findJunctions()
ensuring that a junction node
is only retrieved once even if multiple child paths are associated with it.findJunctionIndices()
public TreeSet<Integer> findJunctionIndices()
findJunctions()
,
getJunctionNodes()
public void downsample(double maximumAllowedDeviation)
public void setRadius(double r)
r
- the radius to be assigned. Setting it to 0 or Double.NaN removes
the radius attribute from the Pathpublic void setRadius(double r, int index)
public void setRadii(double[] radii)
radii
- the radii array. Setting it null removes the radius attribute
from the PathsetRadius(double)
public boolean isConnectedTo(Path other)
protected void addChangeListener(sc.fiji.snt.PathChangeListener listener)
protected boolean removeChangeListener(sc.fiji.snt.PathChangeListener listener)
Copyright © 2015–2021 Fiji. All rights reserved.