Package sc.fiji.snt.analysis
Class NodeColorMapper
java.lang.Object
sc.fiji.snt.analysis.ColorMapper
sc.fiji.snt.analysis.NodeColorMapper
Class for color coding of
NodeStatistics results.- Author:
- Tiago Ferreira
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringFlag for "Branch length" analysis.static final StringFlag for "Branch order" statistics.static final StringFlag for "Nearest neighbor distance" statistics.static final StringFlag for "Node radius" statistics.static final StringFlag for statistics on node "Node intensity values"static final StringFlag for "X coordinates" statistics.static final StringFlag for "Y coordinates" statistics.static final StringFlag for "Z coordinates" statistics.Fields inherited from class sc.fiji.snt.analysis.ColorMapper
colorTable, integerScale, luts, lutService, max, min -
Constructor Summary
ConstructorsConstructorDescriptionNodeColorMapper(NodeStatistics<?> nodeStatistics) Instantiates the mapper.NodeColorMapper(NodeStatistics<?> nodeStatistics, org.scijava.Context context) Instantiates the mapper. -
Method Summary
Modifier and TypeMethodDescriptionGets the available LUTs.net.imglib2.display.ColorTableGets the current color table used for mapping.net.imglib2.display.ColorTablegetColorTable(String lut) Gets the color table for the specified lookup table name.Gets the list of supported mapping metrics.double[]Returns the mapping boundsCollection<? extends SNTPoint> getNodes()Gets the collection of nodes being mapped.static voidvoidMaps nodes after the specified measurement.voidMaps nodes after the specified measurement.voidsetMinMax(double min, double max) Sets the LUT mapping bounds.Methods inherited from class sc.fiji.snt.analysis.ColorMapper
getColor, getColorRGB, getNaNColor, initLuts, isIntegerScale, setNaNColor, unMap, unMap
-
Field Details
-
BRANCH_LENGTH
Flag for "Branch length" analysis.- See Also:
-
BRANCH_ORDER
Flag for "Branch order" statistics.- See Also:
-
RADIUS
Flag for "Node radius" statistics.- See Also:
-
X_COORDINATES
Flag for "X coordinates" statistics.- See Also:
-
Y_COORDINATES
Flag for "Y coordinates" statistics.- See Also:
-
Z_COORDINATES
Flag for "Z coordinates" statistics.- See Also:
-
VALUES
Flag for statistics on node "Node intensity values"- See Also:
-
NEAREST_NEIGHBOR_DISTANCE
Flag for "Nearest neighbor distance" statistics.- See Also:
-
-
Constructor Details
-
NodeColorMapper
Instantiates the mapper.- Parameters:
nodeStatistics- the NodeStatistics instance holding the nodes to be mappedcontext- the SciJava application context providing the services required by the class
-
NodeColorMapper
Instantiates the mapper. Note that because the instance is not aware of any context, script-friendly methods that use string as arguments may fail to retrieve referenced Scijava objects.- Parameters:
nodeStatistics- the NodeStatistics instance holding the nodes to be mapped
-
-
Method Details
-
getMetrics
Gets the list of supported mapping metrics.- Returns:
- the list of mapping metrics.
-
map
Maps nodes after the specified measurement. Mapping bounds are automatically determined.- Overrides:
mapin classColorMapper- Parameters:
measurement- the measurement (X_COORDINATES,Y_COORDINATES, etc.)colorTable- the color table specifying the color mapping. Null not allowed.
-
map
Maps nodes after the specified measurement. Mapping bounds are automatically determined.- Parameters:
measurement- the measurement (X_COORDINATES,Y_COORDINATES, etc.)lut- the lookup table specifying the color mapping. Null not allowed.
-
getNodes
Gets the collection of nodes being mapped.- Returns:
- the collection of SNTPoint nodes
-
getColorTable
Gets the color table for the specified lookup table name.- Parameters:
lut- the lookup table name- Returns:
- the ColorTable instance
-
getAvailableLuts
Gets the available LUTs.- Returns:
- the set of keys, corresponding to the set of LUTs available
-
setMinMax
public void setMinMax(double min, double max) Description copied from class:ColorMapperSets the LUT mapping bounds.- Overrides:
setMinMaxin classColorMapper- Parameters:
min- the mapping lower bound (i.e., the highest measurement value for the LUT scale). It is automatically calculated (the default) when set to Double.NaNmax- the mapping upper bound (i.e., the highest measurement value for the LUT scale).It is automatically calculated (the default) when set to Double.NaN.
-
getMinMax
public double[] getMinMax()Description copied from class:ColorMapperReturns the mapping bounds- Overrides:
getMinMaxin classColorMapper- Returns:
- a two-element array with current {minimum, maximum} mapping bounds
-
getColorTable
public net.imglib2.display.ColorTable getColorTable()Description copied from class:ColorMapperGets the current color table used for mapping.Returns the ColorTable instance that defines the color mapping from values to colors.
- Overrides:
getColorTablein classColorMapper- Returns:
- the current color table
-
getNodesByColor
-
main
-