uk.ac.starlink.ttools.plot2.layer
Class PixOutliner

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.layer.PixOutliner
All Implemented Interfaces:
Outliner
Direct Known Subclasses:
SizeForm.SizeOutliner, SizeXyForm.SizeXyOutliner

public abstract class PixOutliner
extends Object
implements Outliner

Partial Outliner implementation which calculates its bin plan simply by using the create2DPainter method. If no clever shortcut presents itself, this is a reasonable way to do it.

Since:
26 Feb 2013
Author:
Mark Taylor

Nested Class Summary
 
Nested classes/interfaces inherited from interface uk.ac.starlink.ttools.plot2.layer.Outliner
Outliner.ShapePainter
 
Constructor Summary
PixOutliner()
           
 
Method Summary
 Object calculateBinPlan(Surface surface, DataGeom geom, Map<AuxScale,Range> auxRanges, 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.
 int[] getBinCounts(Object binPlan)
          Returns the bin contents for a given bin plan produced by this object.
 long getPointCount(Object binPlan)
          Returns the number of data positions which contributed to a BinPlan generated by this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ac.starlink.ttools.plot2.layer.Outliner
create2DPainter, create3DPainter, getAuxRangers, getLegendIcon
 

Constructor Detail

PixOutliner

public PixOutliner()
Method Detail

calculateBinPlan

public Object calculateBinPlan(Surface surface,
                               DataGeom geom,
                               Map<AuxScale,Range> auxRanges,
                               DataStore dataStore,
                               DataSpec dataSpec,
                               Object[] knownPlans)
Description copied from interface: Outliner
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 Outliner.getBinCounts(java.lang.Object) and Outliner.getPointCount(java.lang.Object) methods.

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

Specified by:
calculateBinPlan in interface Outliner
Parameters:
surface - plot surface
geom - coordinate geometry
auxRanges - 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

public int[] getBinCounts(Object binPlan)
Description copied from interface: Outliner
Returns the bin contents for a given bin plan produced by this object.

Specified by:
getBinCounts in interface Outliner
Parameters:
binPlan - bin plan returned from calculateBinPlan
Returns:
array of counts, one element per bin

getPointCount

public long getPointCount(Object binPlan)
Description copied from interface: Outliner
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.

Specified by:
getPointCount in interface Outliner
Parameters:
binPlan - bin plan returned from calculateBinPlan
Returns:
number of data positions in plan


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.