Package sc.fiji.snt.analysis
Class TreeStatistics
java.lang.Object
org.scijava.AbstractContextual
org.scijava.command.ContextCommand
sc.fiji.snt.analysis.TreeStatistics
- All Implemented Interfaces:
Runnable,org.scijava.Cancelable,org.scijava.command.Command,org.scijava.Contextual,org.scijava.plugin.SciJavaPlugin
- Direct Known Subclasses:
MultiTreeStatistics,PathOrderAnalysisCmd,PathStatistics,TreeAnalyzer
public class TreeStatistics
extends org.scijava.command.ContextCommand
Computes summary and descriptive statistics from properties of Paths and Nodes in a
Tree, including
convenience methods to plot distributions of such data. For analysis of groups of Trees have a look at
MultiTreeStatistics and GroupedTreeStatistics.- Author:
- Tiago Ferreira, Cameron Arshadi
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.static final StringFlag specifying "Branch contraction"static final StringFlag specifying "Branch extension angle"static final StringFlag specifying "Branch extension angle (Rel.)"static final StringFlag specifying Branch extension angle XYstatic final StringFlag specifying Branch extension angle XZstatic final StringFlag specifying Branch extension angle ZYstatic final StringFlag specifying "Branch fractal dimension"static final StringFlag specifying "Branch length"static final StringFlag specifying "Branch mean radius"static final StringFlag specifying Branch surface area statistics.static final StringFlag specifying Branch volume statistics.static final StringFlag specifying "Complexity index: ACI"static final StringFlag specifying "Complexity index: DCI"static final StringDeprecated.UseBRANCH_CONTRACTIONorPATH_CONTRACTIONinsteadstatic final StringFlag specifying "Convex hull: Boundary size" statisticsstatic final StringFlag specifying "Convex hull: Boxivity" statisticsstatic final StringFlag specifying "Convex hull: Centroid-root distance" statisticsstatic final StringFlag specifying "Convex hull: Compactness" statisticsstatic final StringFlag specifying "Convex hull: Eccentricity" statisticsstatic final StringFlag specifying "Convex hull: Elongation" statisticsstatic final StringFlag specifying "Convex hull: Roundness" statisticsstatic final StringFlag specifying "Convex hull: Size" statisticsstatic final StringFlag specifying "Depth"static final StringDeprecated.UseBRANCH_FRACTAL_DIMENSIONorPATH_FRACTAL_DIMENSIONinsteadstatic final StringFlag specifying "Longest shortest path: Length" statistics.static final StringFlag specifying "Longest shortest path: Extension angle" statistics.static final StringFlag specifying "Longest shortest path: Extension angle XY" statistics.static final StringFlag specifying "Longest shortest path: Extension angle XZ" statistics.static final StringFlag specifying "Longest shortest path: Extension angle ZY" statistics.static final StringFlag specifying "Height"static final StringFlag specifying Inner branches: Extension anglestatic final StringFlag specifying Inner branches: Extension angle (Rel.)static final StringFlag specifying "Inner branches: Extension angle XY"static final StringFlag specifying "Inner branches: Extension angle XZ"static final StringFlag specifying "Inner branches: Extension angle ZY"static final StringFlag specifying "Inner branches: Length"static final StringFlag specifying "Internode angle"static final StringFlag specifying "Internode distance"static final StringFlag specifying "Internode distance (squared)"protected sc.fiji.snt.analysis.TreeStatistics.LastDstatsstatic final StringFlag specifying "Cable length"static final StringDeprecated.UseBRANCH_MEAN_RADIUSorPATH_MEAN_RADIUSinsteadstatic final StringFlag specifying "No. of branch nodes (branch fragmentation)"static final StringFlag specifying "No. of branch points"static final StringFlag specifying "No. of branches"static final StringFlag specifying "No. of fitted paths"static final StringFlag specifying "No. of inner branches"static final StringFlag specifying "No. of nodes"static final StringFlag specifying "No. of path nodes (path fragmentation)"static final StringFlag specifying "No. of paths"static final StringFlag specifying "No. of primary branches"static final StringFlag specifying "No. of spines/varicosities"static final StringFlag specifying "No. of terminal branches"static final StringFlag specifying "No. of tips"static final StringFlag specifying "Node radius"static final StringFlag specifying "Partition asymmetry"static final StringFlag specifying "Path channel"static final StringFlag specifying "Path contraction"static final StringFlag specifying "Path extension angle"static final StringFlag specifying "Path extension angle (Rel.)"static final StringFlag specifying "Path extension angle XY"static final StringFlag specifying "Path extension angle XZ"static final StringFlag specifying "Path extension angle ZY"static final StringFlag specifying "Path fractal dimension"static final StringFlag specifying "Path frame"static final StringFlag specifying "Path length"static final StringFlag specifying "Path mean radius"static final StringFlag specifying "No. of spines/varicosities per path"static final StringFlag specifying "Path order"static final StringFlag specifying "Path spine/varicosity density"static final StringFlag specifying Path surface area statistics.static final StringFlag specifying Path volume statistics.static final StringFlag specifying "Primary branches: Extension angle"static final StringFlag specifying "Primary branches: Extension angle XY"static final StringFlag specifying "Primary branches: Extension angle XZ"static final StringFlag specifying "Primary branches: Extension angle ZY"static final StringFlag specifying "Primary branches: Length"static final StringFlag specifying "Remote bifurcation angles"static final StringFlag specifying "Root angles: Balancing factorstatic final StringFlag specifying "Root angles: Centripetal biasstatic final StringFlag specifying "Root angles: Mean directionstatic final StringFlag specifying "Sholl: Decay" statisticsstatic final StringFlag specifying "Sholl: Kurtosis" statisticsstatic final StringFlag specifying "Sholl: Max (fitted)" statisticsstatic final StringFlag specifying "Sholl: Max (fitted) radius" statisticsstatic final StringFlag specifyingSholl maxstatisticsstatic final StringFlag specifyingSholl meanstatisticsstatic final StringFlag specifying "Sholl: No. maxima" statisticsstatic final StringFlag specifying "Sholl: No. secondary maxima" statisticsstatic final StringFlag specifying "Sholl: Degree of Polynomial fit" statisticsstatic final StringFlag specifying "Sholl: Ramification index" statisticsstatic final StringFlag specifying "Sholl: Skewness" statisticsstatic final StringFlag specifyingSholl sumstatisticsprotected org.scijava.app.StatusServicestatic final StringFlag specifying "Horton-Strahler root number" statistics.static final StringFlag specifyingHorton-Strahler bifurcation ratiostatisticsstatic final StringFlag specifying Surface area statistics.protected SNTTablestatic final StringFlag specifying "Terminal branches: Extension angle"static final StringFlag specifying "Terminal branches: Extension angle (Rel.)"static final StringFlag specifying "Terminal branches: Extension angle XY"static final StringFlag specifying "Terminal branches: Extension angle XZ"static final StringFlag specifying "Terminal branches: Extension angle ZY"static final StringFlag specifying "Terminal branches: Length"protected Set<PointInImage> protected Treestatic final StringFlag for analysis of Node intensity values, an optional numeric property that can be assigned to Path nodes (e.g., voxel intensities), assigned viaPathProfiler.static final StringFlag specifying Volume statistics.static final StringFlag specifying "Width"static final StringFlag specifying "X coordinates"static final StringFlag specifying "Y coordinates"static final StringFlag specifying "Z coordinates" -
Constructor Summary
ConstructorsConstructorDescriptionTreeStatistics(Collection<Path> paths, String label) Instantiates Tree statistics from a collection of paths.TreeStatistics(Tree tree) Instantiates a new instance from a collection of Paths -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassembleStats(sc.fiji.snt.analysis.TreeStatistics.StatisticsInstance stat, String measurement) protected booleancontains(BrainAnnotation annot, BrainAnnotation annotToBeTested, boolean includeChildren) voiddispose()Clears internal caches and mappings to free memory.static TreeStatisticsfromCollection(Collection<Tree> trees, String metric) Creates a TreeStatistics instance from a group of Trees and a specific metric for convenient retrieval of histogramsGets the list of supported metrics.getAnnotatedLength(int level) Retrieves the amount of cable length present on each brain compartment innervated by the analyzed neuron.getAnnotatedLength(int level, String hemisphere) Retrieves the amount of cable length present on each brain compartment innervated by the analyzed neuron.getAnnotatedLength(int level, String hemisphere, boolean norm) Retrieves the amount of cable length present on each brain compartment innervated by the analyzed neuron.protected static Map<BrainAnnotation, Double> getAnnotatedLength(DirectedWeightedGraph graph, int level, char lr, boolean norm) Retrieves the of cable length frequencies across brain areas.getAnnotatedLengthHistogram(int depth) Retrieves the histogram of cable length frequencies across brain areas of the specified ontology level.getAnnotatedLengthHistogram(int depth, String hemisphere) Retrieves the histogram of cable length frequencies across brain areas of the specified ontology level across the specified hemisphere.protected SNTChartgetAnnotatedLengthHistogram(Map<BrainAnnotation, Double> map, int depth, String secondaryLabel) Map<BrainAnnotation, double[]> getAnnotatedLengthsByHemisphere(int level) Retrieves the amount of cable length present on each brain compartment innervated by the analyzed neuron in the two brain hemispheres.protected static Map<BrainAnnotation, double[]> getAnnotatedLengthsByHemisphere(DirectedWeightedGraph graph, int level, boolean norm) protected SNTChartgetAnnotatedLengthsByHemisphereHistogram(int depth) Retrieves the brain compartments (neuropil labels) associated with the Tree being measured innervated by the analyzed neuron.getAnnotations(int depth) Retrieves the brain compartments (neuropil labels) associated with the Tree being measured innervated by the analyzed neuron.doubleGets average length for all the branches of the analyzed tree.doubleGets averagecontractionfor all the branches of the analyzed tree.doubleGets the average fractal dimension of the analyzed tree.doubleGets the average no. of nodes (fragmentation) for all the branches of the analyzed tree.doubleGets the average partition asymmetry of the analyzed tree.doubleGets the average remote bifurcation angle of the analyzed tree.Gets all the branches in the analyzed tree.Gets the position of all the branch points in the analyzed tree.getBranchPoints(BrainAnnotation annot) Gets the position of all the branch points in the analyzed tree associated with the specified annotation.getBranchPoints(BrainAnnotation annot, boolean includeChildren) Gets the position of all the branch points in the analyzed tree associated with the specified annotation.doubleGets the cable length.doublegetCableLength(BrainAnnotation compartment) Gets the cable length associated with the specified compartment (neuropil label).doublegetCableLength(BrainAnnotation compartment, boolean includeChildren) Gets the cable length associated with the specified compartment (neuropil label).doublegetCableLengthNorm(BrainAnnotation compartment) Gets the cable length associated with the specified compartment (neuropil label) as a ratio of total length.doublegetCableLengthNorm(BrainAnnotation compartment, boolean includeChildren) Gets the cable length associated with the specified compartment (neuropil label) as a ratio of total length.protected intGets theConvexHullAnalyzerinstance associated with this TreeStatistics instance.doublegetConvexHullMetric(String metric) Convenience method to obtain a single-value metric fromConvexHullAnalyzerdoublegetDepth()Returns the depth of theBoundingBoxbox of the tree being measuredorg.apache.commons.math3.stat.descriptive.DescriptiveStatisticsgetDescriptiveStats(String metric) Computes theDescriptiveStatisticsfor the specified measurement.getFlowPlot(String feature, int depth) Assembles a Flow plot (aka Sankey diagram) for the specified feature using "mean" as integration statistic, no cutoff value, and all of the brain regions of the specified ontology depth.getFlowPlot(String feature, int depth, double cutoff, boolean normalize) Assembles a Flow plot (aka Sankey diagram) for the specified feature using "mean" as integration statistic, no cutoff value, and all of the brain regions of the specified ontology depthgetFlowPlot(String feature, Collection<BrainAnnotation> annotations) Assembles a Flow plot (aka Sankey diagram) for the specified feature using "mean" as integration statistic, and no cutoff value.getFlowPlot(String feature, Collection<BrainAnnotation> annotations, boolean normalize) Assembles a Flow plot (aka Sankey diagram) for the specified feature using "mean" as integration statistic, and no cutoff value.getFlowPlot(String feature, Collection<BrainAnnotation> annotations, String statistic, double cutoff, boolean normalize) Assembles a Flow plot (aka Sankey diagram) for the specified feature.Gets the fractal dimension of each branch in the analyzed tree.doubleReturns the height of theBoundingBoxbox of the tree being measuredintGets the highestpath orderof the analyzed treegetHistogram(String metric) Retrieves the histogram of relative frequencies histogram for a univariate measurement.protected SNTChartgetHistogram(String normMeasurement, sc.fiji.snt.analysis.AnalysisUtils.HistogramDatasetPlus datasetPlus) Retrieves the branches of highestStrahler orderin the Tree.doubleGets the cable length of inner branchesComputes the specified metric.Deprecated.getMetrics(String type) Gets a subset of supported metrics.intGets the number of branches in the analyzed tree.intgetNBranchPoints(BrainAnnotation annot) Gets the number of branch points in the analyzed tree associated with the specified annotation.intgetNBranchPoints(BrainAnnotation annot, boolean includeChildren) Gets the number of branch points in the analyzed tree associated with the specified annotation.doubleGets the percentage of branch points in the analyzed tree associated with the specified annotationdoublegetNBranchPointsNorm(BrainAnnotation annot, boolean includeChildren) Gets the percentage of branch points in the analyzed tree associated with the specified annotationprotected intgetNextRow(String rowHeader) protected intlongGets the number of nodes in the analyzed tree.Convenience method to initialize aNodeStatisticsfrom all the nodes of the Tree being analyzed.getNodeStatistics(String type) Convenience method to initialize aNodeStatisticsfrom a subset of the nodes of the Tree being analyzed.protected static StringgetNormalizedMeasurement(String measurement) intGets the number of spines/varicosities that have been (manually) assigned to tree being analyzed.intGets the no. of parsed paths.intgetNTips(BrainAnnotation annot) Gets the number of end points in the analyzed tree associated with the specified annotation.intgetNTips(BrainAnnotation annot, boolean includeChildren) Gets the number of end points in the analyzed tree associated with the specified annotation.doublegetNTipsNorm(BrainAnnotation annot) Gets the number of end points in the analyzed tree associated with the specified annotation.doublegetNTipsNorm(BrainAnnotation annot, boolean includeChildren) Gets the percentage of end points in the analyzed tree associated with the specified annotationReturns the set of parsed Paths.Gets the partition asymmetry at each bifurcation point in the analyzed tree.getPolarHistogram(String metric) Assembles a polar histogram for the specified metric (assumed to be an angular measurements (e.g., branch angles, path orientations).Retrieves the primary branches of the analyzed Tree.doubleGets the cable length of primary branches.Retrieves all the Paths in the analyzed Tree tagged as primary.Gets the angle between each bifurcation point and its children in the simplified graph, which comprise either branch points or terminal nodes.Gets theRootAngleAnalyzerinstance associated with this TreeStatistics instance.doublegetRootAngleMetric(String metric) Convenience method to obtain a single-value metric fromRootAngleAnalyzer.Gets theShollAnalyzerinstance associated with this TreeStatistics instance.protected NumbergetShollMetric(String metric) protected StringdoubleGets the overall density of spines/varicosities associated with this treeGets theStrahlerAnalyzerinstance associated with this TreeStatistics instancedoubleGets the averageStrahler bifurcation ratioof analyzed tree.intGets the highestStrahler numberof the analyzed tree.org.apache.commons.math3.stat.descriptive.SummaryStatisticsgetSummaryStats(String metric) Computes theSummaryStatisticsfor the specified measurement.protected Stringorg.scijava.table.DefaultGenericTablegetTable()Gets the table currently being used by this TreeStatistics instanceRetrieves the terminal branches of the analyzed Tree.doubleGets the cable length of terminal branchesgetTips()Gets the position of all the tips in the analyzed tree.getTips(double minDistance) Gets the position of all tips in the analyzed tree that are further distant than the specified distance from the root.getTips(double minDistance, double maxDistance) Gets the position of all tips in the analyzed tree that are within the specified distance range from the root.getTips(BrainAnnotation annot) Gets the position of all the tips in the analyzed tree associated with the specified annotation.getTips(BrainAnnotation annot, boolean includeChildren) Gets the position of all the tips in the analyzed tree associated with the specified annotation.Returns the physical unit associated with the specified metric.doublegetWidth()Returns the width of theBoundingBoxbox of the tree being measuredstatic booleanChecks if 'fuzzy matching' of metrics is active.booleanisValid()Checks whether this tree is topologically valid, i.e., contains only one root and no loops.protected booleanlastDstatsCanBeRecycled(String normMeasurement) static voidvoidmeasure(String rowHeader, Collection<String> metrics, boolean groupByType) Measures this Tree, outputting the result to the measurements table.voidmeasure(Collection<String> metrics, boolean groupByType) Measures this Tree, outputting the result to the measurements table using default row labels.voidRemoves any filtering restrictions that may have been set.voidrestrictToSWCType(int... types) Restricts analysis to Paths sharing the specified SWC flag(s).voidrun()Generates detailed summaries in which measurements are grouped by SWC-type flagsstatic voidsetExactMetricMatch(boolean exactMetricMatch) Sets whether approximate string matching ('fuzzy matching') should be used when retrieving metrics.voidsetTable(org.scijava.table.GenericTable table) Sets the table for this TreeStatistics instance.voidSets the measurements table.voidsummarize(boolean groupByType) Outputs a summary of the current analysis to the measurements table using the default Tree label.voidOutputs a summary of the current analysis to the measurements table.protected static StringtryReallyHardToGuessMetric(String guess) voidUpdates and displays the measurements table.Methods inherited from class org.scijava.command.ContextCommand
cancel, getCancelReason, isCanceledMethods inherited from class org.scijava.AbstractContextual
context, getContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.scijava.Contextual
setContext
-
Field Details
-
BRANCH_EXTENSION_ANGLE
Flag specifying "Branch extension angle"- See Also:
-
BRANCH_EXTENSION_ANGLE_REL
Flag specifying "Branch extension angle (Rel.)"- See Also:
-
BRANCH_EXTENSION_ANGLE_XY
Flag specifying Branch extension angle XY- See Also:
-
BRANCH_EXTENSION_ANGLE_XZ
Flag specifying Branch extension angle XZ- See Also:
-
BRANCH_EXTENSION_ANGLE_ZY
Flag specifying Branch extension angle ZY- See Also:
-
INNER_EXTENSION_ANGLE
Flag specifying Inner branches: Extension angle- See Also:
-
INNER_EXTENSION_ANGLE_REL
Flag specifying Inner branches: Extension angle (Rel.)- See Also:
-
INNER_EXTENSION_ANGLE_XY
Flag specifying "Inner branches: Extension angle XY"- See Also:
-
INNER_EXTENSION_ANGLE_XZ
Flag specifying "Inner branches: Extension angle XZ"- See Also:
-
INNER_EXTENSION_ANGLE_ZY
Flag specifying "Inner branches: Extension angle ZY"- See Also:
-
PRIMARY_EXTENSION_ANGLE
Flag specifying "Primary branches: Extension angle"- See Also:
-
PRIMARY_EXTENSION_ANGLE_XY
Flag specifying "Primary branches: Extension angle XY"- See Also:
-
PRIMARY_EXTENSION_ANGLE_XZ
Flag specifying "Primary branches: Extension angle XZ"- See Also:
-
PRIMARY_EXTENSION_ANGLE_ZY
Flag specifying "Primary branches: Extension angle ZY"- See Also:
-
TERMINAL_EXTENSION_ANGLE
Flag specifying "Terminal branches: Extension angle"- See Also:
-
TERMINAL_EXTENSION_ANGLE_REL
Flag specifying "Terminal branches: Extension angle (Rel.)"- See Also:
-
TERMINAL_EXTENSION_ANGLE_XY
Flag specifying "Terminal branches: Extension angle XY"- See Also:
-
TERMINAL_EXTENSION_ANGLE_XZ
Flag specifying "Terminal branches: Extension angle XZ"- See Also:
-
TERMINAL_EXTENSION_ANGLE_ZY
Flag specifying "Terminal branches: Extension angle ZY"- See Also:
-
REMOTE_BIF_ANGLES
Flag specifying "Remote bifurcation angles"- See Also:
-
PATH_LENGTH
Flag specifying "Path length"- See Also:
-
PATH_EXT_ANGLE
Flag specifying "Path extension angle"- See Also:
-
PATH_EXT_ANGLE_REL
Flag specifying "Path extension angle (Rel.)"- See Also:
-
PATH_EXT_ANGLE_XY
Flag specifying "Path extension angle XY"- See Also:
-
PATH_EXT_ANGLE_XZ
Flag specifying "Path extension angle XZ"- See Also:
-
PATH_EXT_ANGLE_ZY
Flag specifying "Path extension angle ZY"- See Also:
-
PATH_ORDER
Flag specifying "Path order"- See Also:
-
PATH_CHANNEL
Flag specifying "Path channel"- See Also:
-
PATH_FRAME
Flag specifying "Path frame"- See Also:
-
PATH_MEAN_RADIUS
Flag specifying "Path mean radius"- See Also:
-
PATH_SPINE_DENSITY
Flag specifying "Path spine/varicosity density"- See Also:
-
PATH_CONTRACTION
Flag specifying "Path contraction"- See Also:
-
PATH_FRACTAL_DIMENSION
Flag specifying "Path fractal dimension"- See Also:
-
BRANCH_LENGTH
Flag specifying "Branch length"- See Also:
-
BRANCH_MEAN_RADIUS
Flag specifying "Branch mean radius"- See Also:
-
TERMINAL_LENGTH
Flag specifying "Terminal branches: Length"- See Also:
-
PRIMARY_LENGTH
Flag specifying "Primary branches: Length"- See Also:
-
INNER_LENGTH
Flag specifying "Inner branches: Length"- See Also:
-
BRANCH_CONTRACTION
Flag specifying "Branch contraction"- See Also:
-
BRANCH_FRACTAL_DIMENSION
Flag specifying "Branch fractal dimension"- See Also:
-
NODE_RADIUS
Flag specifying "Node radius"- See Also:
-
INTER_NODE_ANGLE
Flag specifying "Internode angle"- See Also:
-
INTER_NODE_DISTANCE
Flag specifying "Internode distance"- See Also:
-
INTER_NODE_DISTANCE_SQUARED
Flag specifying "Internode distance (squared)"- See Also:
-
N_BRANCH_POINTS
Flag specifying "No. of branch points"- See Also:
-
N_NODES
Flag specifying "No. of nodes"- See Also:
-
N_PATH_NODES
Flag specifying "No. of path nodes (path fragmentation)"- See Also:
-
N_BRANCH_NODES
Flag specifying "No. of branch nodes (branch fragmentation)"- See Also:
-
N_PATHS
Flag specifying "No. of paths"- See Also:
-
N_SPINES
Flag specifying "No. of spines/varicosities"- See Also:
-
N_BRANCHES
Flag specifying "No. of branches"- See Also:
-
N_PRIMARY_BRANCHES
Flag specifying "No. of primary branches"- See Also:
-
N_INNER_BRANCHES
Flag specifying "No. of inner branches"- See Also:
-
N_TERMINAL_BRANCHES
Flag specifying "No. of terminal branches"- See Also:
-
N_TIPS
Flag specifying "No. of tips"- See Also:
-
N_FITTED_PATHS
Flag specifying "No. of fitted paths"- See Also:
-
PATH_N_SPINES
Flag specifying "No. of spines/varicosities per path"- See Also:
-
LENGTH
Flag specifying "Cable length"- See Also:
-
COMPLEXITY_INDEX_ACI
Flag specifying "Complexity index: ACI"- See Also:
-
COMPLEXITY_INDEX_DCI
Flag specifying "Complexity index: DCI"- See Also:
-
X_COORDINATES
Flag specifying "X coordinates"- See Also:
-
Y_COORDINATES
Flag specifying "Y coordinates"- See Also:
-
Z_COORDINATES
Flag specifying "Z coordinates"- See Also:
-
WIDTH
Flag specifying "Width"- See Also:
-
HEIGHT
Flag specifying "Height"- See Also:
-
DEPTH
Flag specifying "Depth"- See Also:
-
PARTITION_ASYMMETRY
Flag specifying "Partition asymmetry"- See Also:
-
GRAPH_DIAMETER
Flag specifying "Longest shortest path: Length" statistics.- See Also:
-
GRAPH_DIAMETER_ANGLE
Flag specifying "Longest shortest path: Extension angle" statistics.- See Also:
-
GRAPH_DIAMETER_ANGLE_XY
Flag specifying "Longest shortest path: Extension angle XY" statistics.- See Also:
-
GRAPH_DIAMETER_ANGLE_XZ
Flag specifying "Longest shortest path: Extension angle XZ" statistics.- See Also:
-
GRAPH_DIAMETER_ANGLE_ZY
Flag specifying "Longest shortest path: Extension angle ZY" statistics.- See Also:
-
VOLUME
Flag specifying Volume statistics.- See Also:
-
BRANCH_VOLUME
Flag specifying Branch volume statistics.- See Also:
-
PATH_VOLUME
Flag specifying Path volume statistics.- See Also:
-
SURFACE_AREA
Flag specifying Surface area statistics.- See Also:
-
BRANCH_SURFACE_AREA
Flag specifying Branch surface area statistics.- See Also:
-
PATH_SURFACE_AREA
Flag specifying Path surface area statistics.- See Also:
-
STRAHLER_NUMBER
Flag specifying "Horton-Strahler root number" statistics.- See Also:
-
STRAHLER_RATIO
Flag specifyingHorton-Strahler bifurcation ratiostatistics- See Also:
-
SHOLL_MEAN_VALUE
Flag specifyingSholl meanstatistics- See Also:
-
SHOLL_SUM_VALUE
Flag specifyingSholl sumstatistics- See Also:
-
SHOLL_MAX_VALUE
Flag specifyingSholl maxstatistics- See Also:
-
SHOLL_N_MAX
Flag specifying "Sholl: No. maxima" statistics- See Also:
-
SHOLL_N_SECONDARY_MAX
Flag specifying "Sholl: No. secondary maxima" statistics- See Also:
-
SHOLL_DECAY
Flag specifying "Sholl: Decay" statistics- See Also:
-
SHOLL_MAX_FITTED
Flag specifying "Sholl: Max (fitted)" statistics- See Also:
-
SHOLL_MAX_FITTED_RADIUS
Flag specifying "Sholl: Max (fitted) radius" statistics- See Also:
-
SHOLL_POLY_FIT_DEGREE
Flag specifying "Sholl: Degree of Polynomial fit" statistics- See Also:
-
SHOLL_KURTOSIS
Flag specifying "Sholl: Kurtosis" statistics- See Also:
-
SHOLL_SKEWNESS
Flag specifying "Sholl: Skewness" statistics- See Also:
-
SHOLL_RAMIFICATION_INDEX
Flag specifying "Sholl: Ramification index" statistics- See Also:
-
CONVEX_HULL_BOUNDARY_SIZE
Flag specifying "Convex hull: Boundary size" statistics- See Also:
-
CONVEX_HULL_SIZE
Flag specifying "Convex hull: Size" statistics- See Also:
-
CONVEX_HULL_BOXIVITY
Flag specifying "Convex hull: Boxivity" statistics- See Also:
-
CONVEX_HULL_ELONGATION
Flag specifying "Convex hull: Elongation" statistics- See Also:
-
CONVEX_HULL_ROUNDNESS
Flag specifying "Convex hull: Roundness" statistics- See Also:
-
CONVEX_HULL_CENTROID_ROOT_DISTANCE
Flag specifying "Convex hull: Centroid-root distance" statistics- See Also:
-
CONVEX_HULL_COMPACTNESS_3D
Flag specifying "Convex hull: Compactness" statistics- See Also:
-
CONVEX_HULL_ECCENTRICITY_2D
Flag specifying "Convex hull: Eccentricity" statistics- See Also:
-
ROOT_ANGLE_B_FACTOR
Flag specifying "Root angles: Balancing factor- See Also:
-
ROOT_ANGLE_C_BIAS
Flag specifying "Root angles: Centripetal bias- See Also:
-
ROOT_ANGLE_M_DIRECTION
Flag specifying "Root angles: Mean direction- See Also:
-
VALUES
Flag for analysis of Node intensity values, an optional numeric property that can be assigned to Path nodes (e.g., voxel intensities), assigned viaPathProfiler. Note that anIllegalArgumentExceptionis triggered if no values have been assigned to the tree being analyzed.- See Also:
-
CONTRACTION
Deprecated.UseBRANCH_CONTRACTIONorPATH_CONTRACTIONinstead- See Also:
-
MEAN_RADIUS
Deprecated.UseBRANCH_MEAN_RADIUSorPATH_MEAN_RADIUSinstead- See Also:
-
AVG_SPINE_DENSITY
Deprecated.UsePATH_SPINE_DENSITYinstead- See Also:
-
FRACTAL_DIMENSION
Deprecated.UseBRANCH_FRACTAL_DIMENSIONorPATH_FRACTAL_DIMENSIONinstead- See Also:
-
statusService
protected org.scijava.app.StatusService statusService -
tree
-
-
innerBranches
-
terminalBranches
-
tips
-
table
-
lastDstats
protected sc.fiji.snt.analysis.TreeStatistics.LastDstats lastDstats
-
-
Constructor Details
-
TreeStatistics
Instantiates a new instance from a collection of Paths- Parameters:
tree- the collection of paths to be analyzed
-
TreeStatistics
Instantiates Tree statistics from a collection of paths.- Parameters:
paths- Collection of Paths to be analyzed. Note that null Paths are discarded. Also, when a Path has been fitted andPath.getUseFitted()is true, its fitted 'flavor' is used.label- the label describing the path collection- See Also:
-
-
Method Details
-
getAllMetrics
Gets the list of supported metrics.- Returns:
- the list of available metrics
-
getMetrics
Gets a subset of supported metrics.- Parameters:
type- the type. Either 'legacy' (metrics supported up to SNTv4.0.5), "safe" (metrics that can be computed from invalid graphs), 'common' (commonly used metrics), 'quick' (used by the 'quick measure' GUI commands), or 'all' (shortcut togetAllMetrics())- Returns:
- the list metrics
-
getMetrics
Deprecated.Gets the list of most commonly used metrics.- Returns:
- the list of commonly used metrics.
- See Also:
-
getAnnotatedLength
protected static Map<BrainAnnotation,Double> getAnnotatedLength(DirectedWeightedGraph graph, int level, char lr, boolean norm) -
getAnnotatedLengthsByHemisphere
protected static Map<BrainAnnotation,double[]> getAnnotatedLengthsByHemisphere(DirectedWeightedGraph graph, int level, boolean norm) -
fromCollection
Creates a TreeStatistics instance from a group of Trees and a specific metric for convenient retrieval of histograms- Parameters:
trees- the collection of treesmetric- the measurement- Returns:
- the TreeStatistics instance
-
tryReallyHardToGuessMetric
-
getNormalizedMeasurement
-
isExactMetricMatch
public static boolean isExactMetricMatch()Checks if 'fuzzy matching' of metrics is active.- Returns:
- true if exact string matching is active, false if approximate matching is active
-
setExactMetricMatch
public static void setExactMetricMatch(boolean exactMetricMatch) Sets whether approximate string matching ('fuzzy matching') should be used when retrieving metrics.- Parameters:
exactMetricMatch- exact string matching is used if true, approximate if false
-
getMetric
Computes the specified metric.- Parameters:
metric- the single-value metric to be computed (case-insensitive). While it is expected to be an element ofgetAllMetrics(), ifisExactMetricMatch()is set,metriccan be specified in a loose manner: Ifmetricis not initially recognized, a heuristic will match it to the closest entry in the list of possible metrics. E.g., "# bps", "n junctions", will be both mapped toN_BRANCH_POINTS. Details on the matching are printed to the Console when in debug mode.- Returns:
- the computed value (average if metric is associated with multiple values)
- Throws:
UnknownMetricException- if metric is not recognized- See Also:
-
restrictToSWCType
public void restrictToSWCType(int... types) Restricts analysis to Paths sharing the specified SWC flag(s).- Parameters:
types- the allowed SWC flags (e.g.,Path.SWC_AXON, etc.)
-
resetRestrictions
public void resetRestrictions()Removes any filtering restrictions that may have been set. Once called, subsequent analysis will use all paths initially parsed by the constructor. Does nothing if no paths are currently being excluded from the analysis. -
getParsedTree
Returns the set of parsed Paths.- Returns:
- the set of paths currently being considered for analysis.
- See Also:
-
summarize
public void summarize(boolean groupByType) Outputs a summary of the current analysis to the measurements table using the default Tree label.- Parameters:
groupByType- if true measurements are grouped by SWC-type flag- See Also:
-
summarize
Outputs a summary of the current analysis to the measurements table.- Parameters:
rowHeader- the String to be used as label for the summarygroupByType- if true measurements are grouped by SWC-type flag- See Also:
-
getNextRow
-
getSWCTypesAsString
-
measure
Measures this Tree, outputting the result to the measurements table using default row labels. If a Context has been specified, the table is updated. Otherwise, table contents are printed to Console.- Parameters:
metrics- the list of metrics to be computed. When null or an empty collection is specified,getMetrics()is used.groupByType- if false, metrics are computed to all branches in the Tree. If true, measurements will be split by SWC type annotations (axon, dendrite, etc.)- See Also:
-
measure
Measures this Tree, outputting the result to the measurements table. If a Context has been specified, the table is updated. Otherwise, table contents are printed to Console.- Parameters:
rowHeader- the row header labelmetrics- the list of metrics to be computed. When null or an empty collection is specified,getMetrics()is used.groupByType- if false, metrics are computed to all branches in the Tree. If true, measurements will be split by SWC type annotations (axon, dendrite, etc.)- See Also:
-
getSummaryStats
Computes theSummaryStatisticsfor the specified measurement.- Parameters:
metric- the measurement (N_NODES,NODE_RADIUS, etc.)- Returns:
- the SummaryStatistics object.
-
getDescriptiveStats
public org.apache.commons.math3.stat.descriptive.DescriptiveStatistics getDescriptiveStats(String metric) Computes theDescriptiveStatisticsfor the specified measurement.- Parameters:
metric- the measurement (N_NODES,NODE_RADIUS, etc.)- Returns:
- the DescriptiveStatistics object.
-
setTable
Sets the measurements table.- Parameters:
table- the table to be used by this TreeStatistics instancetitle- the title of the table display window
-
getTable
public org.scijava.table.DefaultGenericTable getTable()Gets the table currently being used by this TreeStatistics instance- Returns:
- the table
-
setTable
public void setTable(org.scijava.table.GenericTable table) Sets the table for this TreeStatistics instance.- Parameters:
table- the table to be used by this TreeStatistics instance- See Also:
-
getAnnotatedLength
Retrieves the amount of cable length present on each brain compartment innervated by the analyzed neuron.- Parameters:
level- the ontological depth of the compartments to be considered- Returns:
- the map containing the brain compartments as keys, and cable lengths as values.
- See Also:
-
getAnnotatedLength
Retrieves the amount of cable length present on each brain compartment innervated by the analyzed neuron.- Parameters:
level- the ontological depth of the compartments to be consideredhemisphere- typically 'left' or 'right'. The hemisphere flag (BrainAnnotation.LEFT_HEMISPHEREorBrainAnnotation.RIGHT_HEMISPHERE) is extracted from the first character of the string (case-insensitive). Ignored if not a recognized option- Returns:
- the map containing the brain compartments as keys, and cable lengths as values.
- See Also:
-
getAnnotatedLength
Retrieves the amount of cable length present on each brain compartment innervated by the analyzed neuron.- Parameters:
level- the ontological depth of the compartments to be consideredhemisphere- typically 'left' or 'right'. The hemisphere flag (BrainAnnotation.LEFT_HEMISPHEREorBrainAnnotation.RIGHT_HEMISPHERE) is extracted from the first character of the string (case-insensitive). Ignored if not a recognized optionnorm- whether length should be normalized to the cells' cable length- Returns:
- the map containing the brain compartments as keys, and cable lengths as values.
- See Also:
-
getAnnotatedLengthsByHemisphere
Retrieves the amount of cable length present on each brain compartment innervated by the analyzed neuron in the two brain hemispheres. Lengths are absolute and not normalized to the cells' cable length.- Parameters:
level- the ontological depth of the compartments to be considered- Returns:
- the map containing the brain compartments as keys, and cable lengths per hemisphere as values.
- See Also:
-
getAnnotatedLengthHistogram
Retrieves the of cable length frequencies across brain areas.- Returns:
- the histogram of cable length frequencies.
-
getAnnotatedLengthHistogram
Retrieves the histogram of cable length frequencies across brain areas of the specified ontology level.- Parameters:
depth- the ontological depth of the compartments to be considered- Returns:
- the annotated length histogram
- See Also:
-
getAnnotatedLengthHistogram
Retrieves the histogram of cable length frequencies across brain areas of the specified ontology level across the specified hemisphere.- Parameters:
depth- the ontological depth of the compartments to be consideredhemisphere- 'left', 'right' or 'ratio' (case-insensitive). Ignored if not a recognized option- Returns:
- the annotated length histogram
- See Also:
-
getAnnotatedLengthsByHemisphereHistogram
-
getAnnotatedLengthHistogram
protected SNTChart getAnnotatedLengthHistogram(Map<BrainAnnotation, Double> map, int depth, String secondaryLabel) -
getHistogram
Retrieves the histogram of relative frequencies histogram for a univariate measurement. The number of bins is determined using the Freedman-Diaconis rule.- Parameters:
metric- the measurement (N_NODES,NODE_RADIUS, etc.)- Returns:
- the frame holding the histogram
-
getPolarHistogram
Assembles a polar histogram for the specified metric (assumed to be an angular measurements (e.g., branch angles, path orientations).- Parameters:
metric- the metric to be plotted (e.g.,BRANCH_EXTENSION_ANGLE_XY,PATH_EXT_ANGLE_XY, etc.)- Returns:
- the polar histogram chart
- Throws:
UnknownMetricException- if the metric is not recognized- See Also:
-
getFlowPlot
public SNTChart getFlowPlot(String feature, Collection<BrainAnnotation> annotations, boolean normalize) Assembles a Flow plot (aka Sankey diagram) for the specified feature using "mean" as integration statistic, and no cutoff value.- See Also:
-
getFlowPlot
Assembles a Flow plot (aka Sankey diagram) for the specified feature using "mean" as integration statistic, no cutoff value, and all of the brain regions of the specified ontology depth.- Parameters:
feature- the feature ("Cable length", "No. of branch points", "No. of tips", etc.).depth- the ontological depth of the compartments to be considered- Returns:
- the flow plot
- See Also:
-
getFlowPlot
Assembles a Flow plot (aka Sankey diagram) for the specified feature using "mean" as integration statistic, no cutoff value, and all of the brain regions of the specified ontology depth. *- Parameters:
feature- the feature ("Cable length", "No. of branch points", "No. of tips", etc.)depth- the ontological depth of the compartments to be consideredcutoff- a filtering option. If the computedfeaturefor an annotation is below this value, that annotation is excluded from the plot * @param normalize If true, values are retrieved as ratios. E.g., Iffeatureis "Cable length", andcutoff0.1, BrainAnnotations inannotationsassociated with less than 10% of cable length are ignored.- Returns:
- the flow plot
-
getFlowPlot
Assembles a Flow plot (aka Sankey diagram) for the specified feature using "mean" as integration statistic, and no cutoff value.- See Also:
-
getFlowPlot
public SNTChart getFlowPlot(String feature, Collection<BrainAnnotation> annotations, String statistic, double cutoff, boolean normalize) Assembles a Flow plot (aka Sankey diagram) for the specified feature.- Parameters:
feature- the feature ("Cable length", "No. of branch points", "No. of tips", etc.). Note that the majority ofgetAllMetrics()metrics are currently not supported.annotations- the BrainAnnotations to be queried. Null not allowed.statistic- the integration statistic (lower case). Either "mean", "sum", "min" or "max". Null not allowed.cutoff- a filtering option. If the computedfeaturefor an annotation is below this value, that annotation is excluded from the plotnormalize- If true, values are retrieved as ratios. E.g., Iffeatureis "Cable length", andcutoff0.1, BrainAnnotations inannotationsassociated with less than 10% of cable length are ignored.- Returns:
- the SNTChart holding the flow plot
-
getHistogram
-
assembleStats
protected void assembleStats(sc.fiji.snt.analysis.TreeStatistics.StatisticsInstance stat, String measurement) -
lastDstatsCanBeRecycled
-
run
public void run()Generates detailed summaries in which measurements are grouped by SWC-type flags- See Also:
-
getShollMetric
-
getNodeStatistics
Convenience method to initialize aNodeStatisticsfrom all the nodes of the Tree being analyzed.- Returns:
- the NodeStatistics instance
-
getNodeStatistics
Convenience method to initialize aNodeStatisticsfrom a subset of the nodes of the Tree being analyzed.- Parameters:
type- the vertex type (e.g., "tips"/"end-points", "junctions"/"branch points", "all")- Returns:
- the NodeStatistics instance
- See Also:
-
getConvexHullMetric
Convenience method to obtain a single-value metric fromConvexHullAnalyzer- Parameters:
metric- the metric to be retrieved, one ofConvexHullAnalyzer.supportedMetrics()- Returns:
- the convex hull metric
- See Also:
-
getConvexAnalyzer
Gets theConvexHullAnalyzerinstance associated with this TreeStatistics instance.- Returns:
- the ConvexHullAnalyzer instance
-
getRootAngleMetric
Convenience method to obtain a single-value metric fromRootAngleAnalyzer.- Parameters:
metric- the metric to be retrieved, one ofRootAngleAnalyzer.supportedMetrics()- Returns:
- the root angle metric
- See Also:
-
getRootAngleAnalyzer
Gets theRootAngleAnalyzerinstance associated with this TreeStatistics instance.- Returns:
- the RootAngleAnalyzer instance
- Throws:
IllegalArgumentException
-
getAnnotations
Retrieves the brain compartments (neuropil labels) associated with the Tree being measured innervated by the analyzed neuron.- Returns:
- the set of brain compartments (
BrainAnnotations) - See Also:
-
getAnnotations
Retrieves the brain compartments (neuropil labels) associated with the Tree being measured innervated by the analyzed neuron.- Parameters:
depth- the max. ontological depth of the compartments to be retrieved- Returns:
- the set of brain compartments (
BrainAnnotations) - See Also:
-
getPrimaryLength
public double getPrimaryLength()Gets the cable length of primary branches.- Returns:
- the length sum of all primary branches
- See Also:
-
getInnerLength
public double getInnerLength()Gets the cable length of inner branches- Returns:
- the length sum of all inner branches
- See Also:
-
getTerminalLength
public double getTerminalLength()Gets the cable length of terminal branches- Returns:
- the length sum of all terminal branches
- See Also:
-
getHighestPathOrder
public int getHighestPathOrder()Gets the highestpath orderof the analyzed tree- Returns:
- the highest Path order, or -1 if Paths in the Tree have no defined order
- See Also:
-
isValid
public boolean isValid()Checks whether this tree is topologically valid, i.e., contains only one root and no loops.- Returns:
- true, if Tree is valid, false otherwise
-
getStrahlerNumber
Gets the highestStrahler numberof the analyzed tree.- Returns:
- the highest Strahler (root) number order
- Throws:
IllegalArgumentException- if tree contains multiple roots or loops
-
getStrahlerAnalyzer
Gets theStrahlerAnalyzerinstance associated with this TreeStatistics instance- Returns:
- the StrahlerAnalyzer instance associated with this TreeStatistics instance
- Throws:
IllegalArgumentException- if tree contains multiple roots or loops
-
getShollAnalyzer
Gets theShollAnalyzerinstance associated with this TreeStatistics instance. Note that changes toShollAnalyzermust be performed before retrieving Sholl related metrics, i.e., before callingmeasure(Collection, boolean), etc.- Returns:
- the ShollAnalyzer instance associated with this TreeStatistics instance
-
getStrahlerBifurcationRatio
Gets the averageStrahler bifurcation ratioof analyzed tree.- Returns:
- the average bifurcation ratio
- Throws:
IllegalArgumentException- if tree contains multiple roots or loops
-
getNBranches
Gets the number of branches in the analyzed tree.- Returns:
- the number of branches
- Throws:
IllegalArgumentException- if tree contains multiple roots or loops
-
getNNodes
public long getNNodes()Gets the number of nodes in the analyzed tree.- Returns:
- the number of nodes
-
getBranches
Gets all the branches in the analyzed tree. A branch is defined as the Path composed of all the nodes between two branching points or between one branching point and a termination point.- Returns:
- the list of branches as Path objects.
- Throws:
IllegalArgumentException- if tree contains multiple roots or loops- See Also:
-
getAvgContraction
Gets averagecontractionfor all the branches of the analyzed tree.- Returns:
- the average branch contraction
- Throws:
IllegalArgumentException- if tree contains multiple roots or loops
-
getAvgFragmentation
public double getAvgFragmentation()Gets the average no. of nodes (fragmentation) for all the branches of the analyzed tree.- Returns:
- the average no. of branch nodes (average branch fragmentation)
- Throws:
IllegalArgumentException- if tree contains multiple roots or loops
-
getAvgBranchLength
Gets average length for all the branches of the analyzed tree.- Returns:
- the average branch length
- Throws:
IllegalArgumentException- if tree contains multiple roots or loops
-
getRemoteBifAngles
Gets the angle between each bifurcation point and its children in the simplified graph, which comprise either branch points or terminal nodes. Note that branch points with more than 2 children are ignored.- Returns:
- the list of remote bifurcation angles
- Throws:
IllegalArgumentException- if the tree contains multiple roots or loops
-
getAvgRemoteBifAngle
Gets the average remote bifurcation angle of the analyzed tree. Note that branch points with more than 2 children are ignored during the computation.- Returns:
- the average remote bifurcation angle
- Throws:
IllegalArgumentException- if the tree contains multiple roots or loops
-
getPartitionAsymmetry
Gets the partition asymmetry at each bifurcation point in the analyzed tree. Note that branch points with more than 2 children are ignored.- Returns:
- a list containing the partition asymmetry at each bifurcation point
- Throws:
IllegalArgumentException- if the tree contains multiple roots or loops
-
getAvgPartitionAsymmetry
Gets the average partition asymmetry of the analyzed tree. Note that branch points with more than 2 children are ignored during the computation.- Returns:
- the average partition asymmetry
- Throws:
IllegalArgumentException- if the tree contains multiple roots or loops
-
getFractalDimension
Gets the fractal dimension of each branch in the analyzed tree. Note that branches with less than 5 points are ignored.- Returns:
- a list containing the fractal dimension of each branch
- Throws:
IllegalArgumentException- if the tree contains multiple roots or loops- See Also:
-
getAvgFractalDimension
Gets the average fractal dimension of the analyzed tree. Note that branches with less than 5 points are ignored during the computation.- Returns:
- the average fractal dimension
- Throws:
IllegalArgumentException- if the tree contains multiple roots or loops
-
getNoSpinesOrVaricosities
public int getNoSpinesOrVaricosities()Gets the number of spines/varicosities that have been (manually) assigned to tree being analyzed.- Returns:
- the number of spines/varicosities
-
getSpineOrVaricosityDensity
public double getSpineOrVaricosityDensity()Gets the overall density of spines/varicosities associated with this tree- Returns:
- the spine/varicosity density (same as
getNoSpinesOrVaricosities()/getCableLength())
-
updateAndDisplayTable
public void updateAndDisplayTable()Updates and displays the measurements table. IfContexthas not been set (running headless!?), table is printed to Console. -
getUnit
Returns the physical unit associated with the specified metric. E.g.: returns µm³ if metric is "volume" and coordinates of tree being measured are defined in µm.- Parameters:
metric- the metric to be queried (case-insensitive)- Returns:
- physical unit
-
getSpatialUnit
-
getCol
-
getNPaths
public int getNPaths()Gets the no. of parsed paths.- Returns:
- the number of paths
-
getNFittedPaths
protected int getNFittedPaths() -
getWidth
public double getWidth()Returns the width of theBoundingBoxbox of the tree being measured- Returns:
- the bounding box width
-
getHeight
public double getHeight()Returns the height of theBoundingBoxbox of the tree being measured- Returns:
- the bounding box height
-
getDepth
public double getDepth()Returns the depth of theBoundingBoxbox of the tree being measured- Returns:
- the bounding box depth
-
getPrimaryPaths
Retrieves all the Paths in the analyzed Tree tagged as primary.- Returns:
- the list of primary paths.
- See Also:
-
getInnerBranches
Retrieves the branches of highestStrahler orderin the Tree. This typically correspond to the most 'internal' branches of the Tree in direct sequence from the root.- Returns:
- the list containing the "inner" branches. Note that these branches (Path segments) will not carry any connectivity information.
- See Also:
-
getPrimaryBranches
Retrieves the primary branches of the analyzed Tree. Primary branches (or root-associated) have origin in the Tree's root, extending to the closest branch/end-point. Note that a primary branch can also be terminal.- Returns:
- the primary branches. Note that these branches (Path segments) will not carry any connectivity information.
- See Also:
-
getTerminalBranches
Retrieves the terminal branches of the analyzed Tree. A terminal branch corresponds to the section of a terminal Path between its last branch-point and its terminal point (tip). A terminal branch can also be primary.- Returns:
- the terminal branches. Note that as per
Path.getSection(int, int), these branches will not carry any connectivity information. - See Also:
-
getTips
Gets the position of all the tips in the analyzed tree.- Returns:
- the set of terminal points
-
getTips
Gets the position of all the tips in the analyzed tree associated with the specified annotation.- Parameters:
annot- the BrainAnnotation to be queried (all of its children will be considered). Null not allowed.- Returns:
- the branch points positions, or an empty set if no tips were retrieved.
-
getTips
Gets the position of all the tips in the analyzed tree associated with the specified annotation.- Parameters:
annot- the BrainAnnotation to be queried. Null not allowed.includeChildren- whether children ofannotshould be included.- Returns:
- the branch points positions, or an empty set if no tips were retrieved.
-
getNTips
Gets the number of end points in the analyzed tree associated with the specified annotation.- Parameters:
annot- the BrainAnnotation to be queried. All of its children will be considered- Returns:
- the number of end points
-
getNTips
Gets the number of end points in the analyzed tree associated with the specified annotation.- Parameters:
annot- the BrainAnnotation to be queried.includeChildren- whether children ofannotshould be included.- Returns:
- the number of end points
-
getNTipsNorm
Gets the number of end points in the analyzed tree associated with the specified annotation.- Parameters:
annot- the BrainAnnotation to be queried. All of its children will be considered- Returns:
- the number of end points
-
getTips
Gets the position of all tips in the analyzed tree that are further distant than the specified distance from the root.- Parameters:
minDistance- the minimum distance from root (inclusive, in the same units as tree coordinates)- Returns:
- the set of terminal points distant from root by at least
minDistance, or an empty set if no tips are found or if the tree has no root
-
getTips
Gets the position of all tips in the analyzed tree that are within the specified distance range from the root. This method is useful for analyzing tree morphology within specific distance bands from the soma.- Parameters:
minDistance- the minimum distance from root (inclusive, in the same units as tree coordinates)maxDistance- the maximum distance from root (inclusive, in the same units as tree coordinates)- Returns:
- the set of terminal points within the specified distance range from root, or an empty set if no tips are found within the range or if the tree has no root
-
getNTipsNorm
Gets the percentage of end points in the analyzed tree associated with the specified annotation- Parameters:
annot- the BrainAnnotation to be queried.includeChildren- whether children ofannotshould be included- Returns:
- the ratio between the no. of branch points associated with
annotand the total number of end points in the tree.
-
getBranchPoints
Gets the position of all the branch points in the analyzed tree.- Returns:
- the branch points positions
-
getBranchPoints
Gets the position of all the branch points in the analyzed tree associated with the specified annotation.- Parameters:
annot- the BrainAnnotation to be queried. All of its children are considered.- Returns:
- the branch points positions, or an empty set if no branch points were retrieved
-
getBranchPoints
Gets the position of all the branch points in the analyzed tree associated with the specified annotation.- Parameters:
annot- the BrainAnnotation to be queried.includeChildren- whether children ofannotshould be included- Returns:
- the branch points positions, or an empty set if no branch points were retrieved
-
getNBranchPoints
Gets the number of branch points in the analyzed tree associated with the specified annotation.- Parameters:
annot- the BrainAnnotation to be queried. All of its children are considered.- Returns:
- the number of branch points
-
getNBranchPoints
Gets the number of branch points in the analyzed tree associated with the specified annotation.- Parameters:
annot- the BrainAnnotation to be queried.includeChildren- whether children ofannotshould be included- Returns:
- the number of branch points
-
getNBranchPointsNorm
Gets the percentage of branch points in the analyzed tree associated with the specified annotation- Parameters:
annot- the BrainAnnotation to be queried. All of its children are considered.- Returns:
- the ratio between the no. of branch points associated with
annotand the total number of branch points in the tree.
-
getNBranchPointsNorm
Gets the percentage of branch points in the analyzed tree associated with the specified annotation- Parameters:
annot- the BrainAnnotation to be queried.includeChildren- whether children ofannotshould be included- Returns:
- the ratio between the no. of branch points associated with
annotand the total number of branch points in the tree.
-
getCableLength
public double getCableLength()Gets the cable length.- Returns:
- the cable length of the tree
-
getCableLength
Gets the cable length associated with the specified compartment (neuropil label).- Parameters:
compartment- the query compartment (null not allowed). All of its children will be considered- Returns:
- the filtered cable length
-
getCableLengthNorm
Gets the cable length associated with the specified compartment (neuropil label) as a ratio of total length.- Parameters:
compartment- the query compartment (null not allowed). All of its children will be considered- Returns:
- the filtered cable length normalized to total cable length
-
getCableLengthNorm
Gets the cable length associated with the specified compartment (neuropil label) as a ratio of total length.- Parameters:
compartment- the query compartment (null not allowed)includeChildren- whether children ofcompartmentshould be included- Returns:
- the filtered cable length normalized to total cable length
-
getCableLength
Gets the cable length associated with the specified compartment (neuropil label).- Parameters:
compartment- the query compartment (null not allowed)includeChildren- whether children ofcompartmentshould be included- Returns:
- the filtered cable length
-
contains
protected boolean contains(BrainAnnotation annot, BrainAnnotation annotToBeTested, boolean includeChildren) -
dispose
public void dispose()Clears internal caches and mappings to free memory. -
main
-
PATH_SPINE_DENSITYinstead