Package sc.fiji.snt.plugin
Class StrahlerCmd
java.lang.Object
org.scijava.AbstractContextual
org.scijava.command.ContextCommand
sc.fiji.snt.plugin.StrahlerCmd
- All Implemented Interfaces:
Runnable,org.scijava.Cancelable,org.scijava.command.Command,org.scijava.Contextual,org.scijava.plugin.SciJavaPlugin
public class StrahlerCmd
extends org.scijava.command.ContextCommand
Command to perform Horton-Strahler analysis on a collection of
Trees- Author:
- Tiago Ferreira
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new StrahlerCmd.StrahlerCmd(Collection<Tree> trees) Instantiates a new StrahlerCmd.StrahlerCmd(Tree tree) Instantiates a new StrahlerCmd for a single Tree -
Method Summary
Modifier and TypeMethodDescriptiongetBoxPlot(String metric) Returns a boxplot for the specified metric, in which data is grouped by order.getChart()Returns the 'complete Strahler plot' (e.g., all metrics in a single plot).Returns a 'Strahler plot' for the specified metric.Gets the detailed table listing individual branch properties aggregated by Strahler order.getHistogram(String metric) Returns a histogram for the specified metric, in which data is grouped by order.Returns the Tree(s) that could not be parsed (i.e., topologically invalid)Gets the summary table containing the tabular results of the analysis.getTable()Deprecated.Returns the Tree(s) successfully parsed (i.e., topologically valid)static voidvoidrun()voidsetDetailedAnalysis(boolean detailedAnalysis) Whether run calls should output detailed tables and plotsbooleanAssesses if all trees being analyzed can be parsed (A tree won't be parsed, if topologically invalid, e.g., by containing a loop, or disconnected Paths).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
-
Constructor Details
-
StrahlerCmd
public StrahlerCmd()Instantiates a new StrahlerCmd. Trees to be analyzed expected as input@parameter -
StrahlerCmd
Instantiates a new StrahlerCmd.- Parameters:
trees- the collection of Trees to be analyzed
-
StrahlerCmd
Instantiates a new StrahlerCmd for a single Tree- Parameters:
tree- the single Tree to be analyzed
-
-
Method Details
-
run
public void run() -
getChart
Returns the 'complete Strahler plot' (e.g., all metrics in a single plot). If multiple trees are being analyzed, returns a multi-panel montage, in which each panel corresponding to each individual plot.- Returns:
- the Strahler plot
-
getChart
Returns a 'Strahler plot' for the specified metric.- Parameters:
metric- either "avg contraction", "avg fragmentation", "bifurcation ratio", "branch count", "extension angle", or "length" (default)- Returns:
- the Strahler plot
-
getHistogram
Returns a histogram for the specified metric, in which data is grouped by order.- Parameters:
metric- either "branch contraction", "branch fragmentation", "branch relative extension angle", or "branch length" (default)- Returns:
- the Strahler histogram if only a single Tree is being analyzed, or a montage of histograms if multiple trees are being parsed.
-
getBoxPlot
Returns a boxplot for the specified metric, in which data is grouped by order.- Parameters:
metric- either "branch contraction", "branch fragmentation", "branch relative extension angle", or "branch length" (default)- Returns:
- the Strahler boxplot if only a single Tree is being analyzed, or a montage of plots if multiple trees are being parses.
-
getDetailedTable
Gets the detailed table listing individual branch properties aggregated by Strahler order.- Returns:
- the detailed table
-
getSummaryTable
Gets the summary table containing the tabular results of the analysis.- Returns:
- the summary table
-
getTable
Deprecated.UsegetSummaryTable()instead -
validInput
public boolean validInput()Assesses if all trees being analyzed can be parsed (A tree won't be parsed, if topologically invalid, e.g., by containing a loop, or disconnected Paths).- Returns:
- true, if successful
-
getValidTrees
Returns the Tree(s) successfully parsed (i.e., topologically valid)- Returns:
- the list of parsed trees
-
getInvalidTrees
Returns the Tree(s) that could not be parsed (i.e., topologically invalid)- Returns:
- the list of non-parsable trees
-
setDetailedAnalysis
public void setDetailedAnalysis(boolean detailedAnalysis) Whether run calls should output detailed tables and plots- Parameters:
detailedAnalysis- if true, subsequent run() calls will include extra outputs
-
main
-
getSummaryTable()instead