Interface Outliner

All Known Implementing Classes:
PixOutliner, PolygonOutliner, SizeForm.SizeOutliner, SizeXyForm.SizeXyOutliner

@Equality public interface Outliner
Paints the shape of per-point markers. When painting, this object will not manipulate the colours; any colouring is done externally.

This interface provides two ways of drawing the same thing: with a ShapePainter, which does it a point at a time, and with a BinPlan, which accumulates all the pixel values for the whole grid ready to paint in one go. They should represent the same data, it's up to the caller which it uses.

Since:
18 Feb 2013
Author:
Mark Taylor
  • Method Details

    • getLegendIcon

      Icon getLegendIcon()
      Returns an icon suitable for identifying points painted by this object in a plot legend. The returned icon does not manipulate the colour of the graphics context it operates on.
      Returns:
      legend icon for this outliner
    • getAuxRangers

      Map<AuxScale,AuxReader> getAuxRangers(DataGeom geom)
      Defines what non-axis ranging information is required by this outliner. The return value is a map in which the keys define the ranges that must be supplied to the painting methods, and the values are reader objects that can acquire these ranges from a dataset.
      Parameters:
      geom - data geometry
      Returns:
      map of required scale keys to scale reader objects
    • canPaint

      boolean canPaint(DataSpec dataSpec)
      Indicates whether this outliner is willing to provide painters for a given DataSpec. The return value may be unconditionally true, but this method provides a hook for outliners to reject plotting based only on characteristics of the DataSpec.
      Parameters:
      dataSpec - data specification for plot
      Returns:
      true if dataSpec can be used to obtain a non-null painter
    • create2DPainter

      ShapePainter create2DPainter(Surface surface, DataGeom geom, DataSpec dataSpec, Map<AuxScale,Span> auxSpans, PaperType2D paperType)
      Creates a ShapePainter object for plotting onto 2-dimensional surfaces. This method should only be called if canPaint(uk.ac.starlink.ttools.plot2.data.DataSpec) returns true for the supplied DataSpec.
      Parameters:
      surface - plot surface
      geom - coordinate geometry
      dataSpec - data specification
      auxSpans - map of scale information required for plot
      paperType - 2-d paper type
      Returns:
      new 2-d painter
    • create3DPainter

      ShapePainter create3DPainter(CubeSurface surface, DataGeom geom, DataSpec dataSpec, Map<AuxScale,Span> auxSpans, PaperType3D paperType)
      Creates a ShapePainter object for plotting onto 3-dimensional surfaces. This method should only be called if canPaint(uk.ac.starlink.ttools.plot2.data.DataSpec) returns true for the supplied DataSpec.
      Parameters:
      surface - 3-d plot surface
      geom - coordinate geometry
      dataSpec - data specification
      auxSpans - map of scale information required for plot
      paperType - 3-d paper type
      Returns:
      new 3-d painter
    • calculateBinPlan

      Object calculateBinPlan(Surface surface, DataGeom geom, Map<AuxScale,Span> auxSpans, DataStore dataStore, DataSpec dataSpec, Object[] knownPlans)
      Calculates an opaque object which contains the drawing of this outliner represented as an array of bins, one per pixel. To make sense of the returned object, use the getBinCounts(java.lang.Object) and getPointCount(java.lang.Object) methods.

      If one of the supplied knowPlans fits the bill, it will be returned without further calculation.

      Parameters:
      surface - plot surface
      geom - coordinate geometry
      auxSpans - map of scale information required for plot
      dataStore - data storage
      dataSpec - coordinate specification
      knownPlans - list of existing plans
      Returns:
      bin plan, either newly calculated or taken from knownPlans
    • getBinCounts

      int[] getBinCounts(Object binPlan)
      Returns the bin contents for a given bin plan produced by this object.
      Parameters:
      binPlan - bin plan returned from calculateBinPlan
      Returns:
      array of counts, one element per bin
    • getPointCount

      long getPointCount(Object binPlan)
      Returns the number of data positions which contributed to a BinPlan generated by this object. This may or may not be the same as the sum of the pixel counts in the binCounts array; if each data position might contribute multiple pixel hits, the numbers will not be the same.
      Parameters:
      binPlan - bin plan returned from calculateBinPlan
      Returns:
      number of data positions in plan
    • getReport

      ReportMap getReport(Object binPlan)
      Obtains information associated with the plot.
      Parameters:
      binPlan - bin plan returned from calculateBinPlan
      Returns:
      report map, or null for no reports
      See Also: