Package de.gsi.dataset.spi
Class DimReductionDataSet
- java.lang.Object
-
- de.gsi.dataset.spi.AbstractStylable<D>
-
- de.gsi.dataset.spi.AbstractDataSet<DoubleDataSet>
-
- de.gsi.dataset.spi.DoubleDataSet
-
- de.gsi.dataset.spi.DimReductionDataSet
-
- All Implemented Interfaces:
DataSet,DataSet2D,DataSetMetaData,EditableDataSet,EventListener,EventSource,java.io.Serializable
public class DimReductionDataSet extends DoubleDataSet implements EventListener
Reduces 3D data to 2D DataSet either via slicing, min, mean, max or integration- Author:
- rstein
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDimReductionDataSet.OptionThe possible reduction options if integrated over a value range
-
Field Summary
-
Fields inherited from class de.gsi.dataset.spi.DoubleDataSet
xValues, yValues
-
Fields inherited from interface de.gsi.dataset.DataSetMetaData
TAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT
-
-
Constructor Summary
Constructors Constructor Description DimReductionDataSet(DataSet source, int dimIndex, DimReductionDataSet.Option reductionOption)Reduces 3D data to 2D DataSet either via slicing, min, mean, max or integration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMaxIndex()doublegetMaxValue()intgetMinIndex()doublegetMinValue()DimReductionDataSet.OptiongetReductionOption()DataSetgetSourceDataSet()voidhandle(UpdateEvent event)This method needs to be provided by an implementation ofUpdateListener.voidsetMaxValue(double val)voidsetMinValue(double val)voidsetRange(double min, double max)protected voidupdateMeanIntegral(boolean isMean)protected voidupdateMinMax(boolean isMin)protected voidupdateSlice()-
Methods inherited from class de.gsi.dataset.spi.DoubleDataSet
add, add, add, add, add, add, add, clearData, get, getCapacity, getDataCount, getValues, increaseCapacity, remove, remove, resize, set, set, set, set, set, set, set, trim
-
Methods inherited from class de.gsi.dataset.spi.AbstractDataSet
addDataLabel, addDataStyle, autoNotification, binarySearch, clearMetaInfo, equalDataLabels, equalEditConstraints, equalErrorValues, equalMetaData, equals, equals, equalValues, fireInvalidated, getAxisDescriptions, getDataLabel, getDataLabelMap, getDataStyleMap, getDimension, getEditConstraints, getErrorList, getIndex, getInfoList, getMetaInfo, getName, getStyle, getThis, getWarningList, hashCode, lock, minNeigbourSearchX, recomputeLimits, removeDataLabel, removeStyle, setEditConstraints, setName, toString, updateEventListener
-
Methods inherited from class de.gsi.dataset.spi.AbstractStylable
getStyle, setStyle
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.gsi.dataset.DataSet
getAxisDescription, getAxisDescriptions, getDataCount, getDataLabel, getIndex, getName, getStyle, getStyle, lock, recomputeLimits, setStyle
-
Methods inherited from interface de.gsi.dataset.DataSet2D
getDimension, getValue, getValue, getX, getXIndex, getXValues, getY, getYIndex, getYValues
-
Methods inherited from interface de.gsi.dataset.EditableDataSet
getEditConstraints, setEditConstraints, setName
-
Methods inherited from interface de.gsi.dataset.event.EventSource
addListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListener
-
-
-
-
Constructor Detail
-
DimReductionDataSet
public DimReductionDataSet(DataSet source, int dimIndex, DimReductionDataSet.Option reductionOption)
Reduces 3D data to 2D DataSet either via slicing, min, mean, max or integration- Parameters:
source- 3D DataSet to take projections fromdimIndex- the axis index onto which the projection should be performed (ie. DIM_X <-> integrate over the Y axis within given value ranges and vice versa)reductionOption- one of the reduction options given inDimReductionDataSet.Option
-
-
Method Detail
-
getMaxIndex
public int getMaxIndex()
-
getMaxValue
public double getMaxValue()
-
getMinIndex
public int getMinIndex()
-
getMinValue
public double getMinValue()
-
getReductionOption
public DimReductionDataSet.Option getReductionOption()
-
getSourceDataSet
public DataSet getSourceDataSet()
- Returns:
- source data set
-
handle
public void handle(UpdateEvent event)
Description copied from interface:EventListenerThis method needs to be provided by an implementation ofUpdateListener. It is called if anEventSourcehas been modified/updated.In general is is considered bad practice to modify the observed value in this method.
- Specified by:
handlein interfaceEventListener- Parameters:
event- TheUpdateEventissued by the modifiedUpdateSource
-
setMaxValue
public void setMaxValue(double val)
-
setMinValue
public void setMinValue(double val)
-
setRange
public void setRange(double min, double max)
-
updateMeanIntegral
protected void updateMeanIntegral(boolean isMean)
-
updateMinMax
protected void updateMinMax(boolean isMin)
-
updateSlice
protected void updateSlice()
-
-