Class NodeColorMapper

java.lang.Object
sc.fiji.snt.analysis.ColorMapper
sc.fiji.snt.analysis.NodeColorMapper

public class NodeColorMapper extends ColorMapper
Class for color coding of NodeStatistics results.
Author:
Tiago Ferreira
  • Field Details

  • Constructor Details

    • NodeColorMapper

      public NodeColorMapper(NodeStatistics<?> nodeStatistics, org.scijava.Context context)
      Instantiates the mapper.
      Parameters:
      nodeStatistics - the NodeStatistics instance holding the nodes to be mapped
      context - the SciJava application context providing the services required by the class
    • NodeColorMapper

      public NodeColorMapper(NodeStatistics<?> nodeStatistics)
      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

      public static List<String> getMetrics()
      Gets the list of supported mapping metrics.
      Returns:
      the list of mapping metrics.
    • map

      public void map(String measurement, net.imglib2.display.ColorTable colorTable)
      Maps nodes after the specified measurement. Mapping bounds are automatically determined.
      Overrides:
      map in class ColorMapper
      Parameters:
      measurement - the measurement (X_COORDINATES, Y_COORDINATES, etc.)
      colorTable - the color table specifying the color mapping. Null not allowed.
    • map

      public void map(String measurement, String lut)
      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

      public Collection<? extends SNTPoint> getNodes()
      Gets the collection of nodes being mapped.
      Returns:
      the collection of SNTPoint nodes
    • getColorTable

      public net.imglib2.display.ColorTable getColorTable(String lut)
      Gets the color table for the specified lookup table name.
      Parameters:
      lut - the lookup table name
      Returns:
      the ColorTable instance
    • getAvailableLuts

      public Set<String> 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: ColorMapper
      Sets the LUT mapping bounds.
      Overrides:
      setMinMax in class ColorMapper
      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.NaN
      max - 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: ColorMapper
      Returns the mapping bounds
      Overrides:
      getMinMax in class ColorMapper
      Returns:
      a two-element array with current {minimum, maximum} mapping bounds
    • getColorTable

      public net.imglib2.display.ColorTable getColorTable()
      Description copied from class: ColorMapper
      Gets the current color table used for mapping.

      Returns the ColorTable instance that defines the color mapping from values to colors.

      Overrides:
      getColorTable in class ColorMapper
      Returns:
      the current color table
    • getNodesByColor

      public Map<org.scijava.util.ColorRGB,List<SNTPoint>> getNodesByColor()
    • main

      public static void main(String... args)