Class ImageTrace
java.lang.Object
org.eclipse.draw2d.Figure
org.dawnsci.plotting.draw2d.swtxy.ImageTrace
- All Implemented Interfaces:
EventListener,IAxesTrace,ICoordinateSystemTrace,IDownsampledTrace,IImageTrace,IPaletteTrace,ITrace,ITraceContainer,org.eclipse.draw2d.IFigure,org.eclipse.january.dataset.IDataListener,org.eclipse.january.INameable,org.eclipse.nebula.visualization.xygraph.figures.IAxisListener
- Direct Known Subclasses:
ImageStackTrace
public class ImageTrace
extends org.eclipse.draw2d.Figure
implements IImageTrace, org.eclipse.nebula.visualization.xygraph.figures.IAxisListener, ITraceContainer, org.eclipse.january.dataset.IDataListener
A trace which draws an image to the plot.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure
org.eclipse.draw2d.Figure.FigureIterator, org.eclipse.draw2d.Figure.IdentitySearchNested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
org.eclipse.draw2d.IFigure.NoInsetsNested classes/interfaces inherited from interface org.eclipse.dawnsci.plotting.api.trace.IImageTrace
IImageTrace.DownsampleType -
Field Summary
Fields inherited from class org.eclipse.draw2d.Figure
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTipFields inherited from interface org.eclipse.draw2d.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS -
Constructor Summary
ConstructorsConstructorDescriptionImageTrace(String name, org.eclipse.nebula.visualization.widgets.figureparts.ColorMapRamp intensityScale) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd listener to be notifed if the dawnsampling changes.voidCall to add a palette listenervoidaxisAutoScaleChanged(org.eclipse.nebula.visualization.xygraph.figures.Axis axis, boolean oldAutoScale, boolean newAutoScale) voidaxisForegroundColorChanged(org.eclipse.nebula.visualization.xygraph.figures.Axis axis, org.eclipse.swt.graphics.Color oldColor, org.eclipse.swt.graphics.Color newColor) voidaxisLogScaleChanged(org.eclipse.nebula.visualization.xygraph.figures.Axis axis, boolean old, boolean logScale) voidaxisRangeChanged(org.eclipse.nebula.visualization.xygraph.figures.Axis axis, org.eclipse.nebula.visualization.xygraph.linearscale.Range oldRange, org.eclipse.nebula.visualization.xygraph.linearscale.Range newRange) voidaxisRevalidated(org.eclipse.nebula.visualization.xygraph.figures.Axis axis) We do a bit here to ensure that not too many calls to createScaledImage(...) are made.voidaxisTitleChanged(org.eclipse.nebula.visualization.xygraph.figures.Axis axis, String oldTitle, String newTitle) protected booleancreateScaledImage(org.dawnsci.plotting.draw2d.swtxy.ImageTrace.ImageScaleType rescaleType, org.eclipse.core.runtime.IProgressMonitor monitor) When this is called an SWT image is created and saved in the scaledData field.voiddataChangePerformed(org.eclipse.january.dataset.DataEvent evt) Called when the internal data of image has changed.voiddispose()Called to release system resources.protected voidintgetAlpha()Return the transparency value of the image.List<org.eclipse.january.dataset.IDataset> getAxes()The set of axes, either a list of size 2 for a 2D trace or a list of size 3 for a 3D one.Labels for the axes.intgetBin()Provides the square bin used for the downsampleorg.eclipse.january.dataset.DatasetgetData()Call this method to return a plotted data set by this trace.The name of the original data that this trace was plotted from or nullintReturns the bin for downsampling, either 1,2,4 or 8 currently.org.eclipse.january.dataset.IDatasetorg.eclipse.january.dataset.IDatasetdouble[]Get a global axis range associated with the image.return the HistoType being usedorg.eclipse.swt.graphics.ImagegetImage()Get Image object.Default is TOP_LEFT unlike normal plottingReturns the last image service bean sent to the service for getting the image.org.eclipse.january.dataset.DatasetgetMask()The masking dataset of there is one, normally null.getMax()The max intensity for generating the imageGets the max cut, a RGB and a bound.getMin()The min intensity for generating the imageGets the min cut, a RGB and a bound.getName()Gets the Nan cutorg.eclipse.swt.graphics.PaletteDataPaletteData for creating the image/surface from the DatasetPaletteName for creating the image/surface from the Datasetdouble[]getPointInAxisCoordinates(double[] point) If the axis data set has been set, this method will return a point in the coordinates of the axes labels rather than the indices.double[]getPointInImageCoordinates(double[] axisLocation) For regions over images: if the axis data set has been set, this method will return a point in the coordinates of the image indices rather than the axes.intgetRank()The rank of data plotted, 1 for XY, 2 for Image and surfaces, 3 for volumes.If the axis data set has been set, this method will return a selection region in the coordinates of the axes labels rather than the indices.org.eclipse.january.dataset.IDatasetIf the original data was RGB data, the trace may sum this and ignore the RGB values.protected org.dawnsci.plotting.draw2d.swtxy.ScaledImageDataGet the current image which can be used by the composite trace.getTrace()An object which may be set by API users to record information about the plot.getXAxis()getYAxis()booleanIf true the image is plotted against a true linear axis rather than indicies.voidinitialize(IAxis... axes) Initialize with given axesbooleanbooleanisActive()booleanbooleanIs the imagetrace set to rescale the histogram when a new image update occursbooleanTrue if user trace (normally is)protected voidpaintFigure(org.eclipse.draw2d.Graphics graphics) voidvoidvoidremask()voidremove()voidRemove listener so that it is not notified.voidCall to remove a palette listenervoidReset axes back to not keep aspect ratio and original ticks settingsvoidsetAlpha(int alpha) Set the transparency setting The alpha value must be between 0 (transparent) and 255 (opaque).voidChange the axes without changing the underlying data.booleansetData(org.eclipse.january.dataset.ILazyDataset im, List<? extends org.eclipse.january.dataset.IDataset> axes, boolean performAuto) Call to set image datavoidsetDataName(String dataName) The name of the original data that this trace was plotted from or nullvoidChange the down-sample type, will also refresh the UI.voidsetDynamicData(org.eclipse.january.dataset.IDynamicShape dynamic) Set image as a changeable onevoidsetGlobalRange(double[] globalRange) Set a global axis range associated with the image.booleanSets the histo type.voidsetImageOrigin(ImageServiceBean.ImageOrigin imageOrigin) Rotates the image so that its origin is in given cornervoidsetImageTransposed(boolean imageTransposed) voidsetImageUpdateActive(boolean active) You may set the image not to redraw images during updating a number of settings for efficiency reasons.voidsetMask(org.eclipse.january.dataset.IDataset mask) Set maskvoidThe max intensity for generating the image/surface tracevoidsetMaxCut(HistogramBound bound) Sets the min cut, a RGB and a bound.voidThe min intensity for generating the image/surface tracevoidsetMinCut(HistogramBound bound) Sets the min cut, a RGB and a bound.voidvoidsetNanBound(HistogramBound bound) Sets the Nan cutvoidsetPalette(String paletteName) Setting palette name and looks up this palette in the IPaletteService and applies the palette data for it to the trace as well.voidsetPaletteData(org.eclipse.swt.graphics.PaletteData paletteData) Setting palette data causes the image to redraw with the new palette.voidsetPaletteName(String paletteName) Setting palette namevoidsetPlottingSystem(IPlottingSystem<?> plottingSystem) voidsetRescaleHistogram(boolean rescaleHistogram) Set wheter an update to the image trace triggers a rehistogramvoidThis method may do nothing if the trace cannot be changed.voidsetUserObject(Object userObject) An object which may be set by API users to record information about the plot.voidsetUserTrace(boolean isUserTrace) True if visiblevoidsetXAxis(org.eclipse.nebula.visualization.xygraph.figures.Axis xAxis) voidsetYAxis(org.eclipse.nebula.visualization.xygraph.figures.Axis yAxis) voidsleep()Can be used to clear memory used by the image if the plotting system is no longer active.Methods inherited from class org.eclipse.draw2d.Figure
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintClientArea, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.dawnsci.plotting.api.trace.IImageTrace
repaintMethods inherited from interface org.eclipse.dawnsci.plotting.api.trace.ITrace
isVisible, setVisible
-
Constructor Details
-
ImageTrace
public ImageTrace(String name, org.eclipse.nebula.visualization.widgets.figureparts.ColorMapRamp intensityScale)
-
-
Method Details
-
initialize
Description copied from interface:ITraceInitialize with given axes- Specified by:
initializein interfaceITrace- Parameters:
axes-
-
getName
- Specified by:
getNamein interfaceorg.eclipse.january.INameable
-
setName
- Specified by:
setNamein interfaceorg.eclipse.january.INameable
-
getXAxis
-
setXAxis
public void setXAxis(org.eclipse.nebula.visualization.xygraph.figures.Axis xAxis) -
getYAxis
-
setYAxis
public void setYAxis(org.eclipse.nebula.visualization.xygraph.figures.Axis yAxis) -
getImage
public org.eclipse.swt.graphics.Image getImage()Description copied from interface:IImageTraceGet Image object.- Specified by:
getImagein interfaceIImageTrace- Returns:
- Image or null(default)
-
getPaletteData
public org.eclipse.swt.graphics.PaletteData getPaletteData()Description copied from interface:IPaletteTracePaletteData for creating the image/surface from the Dataset- Specified by:
getPaletteDatain interfaceIPaletteTrace- Returns:
-
setPaletteData
public void setPaletteData(org.eclipse.swt.graphics.PaletteData paletteData) Description copied from interface:IPaletteTraceSetting palette data causes the image to redraw with the new palette.- Specified by:
setPaletteDatain interfaceIPaletteTrace- Parameters:
paletteData-
-
getPaletteName
Description copied from interface:IPaletteTracePaletteName for creating the image/surface from the Dataset- Specified by:
getPaletteNamein interfaceIPaletteTrace- Returns:
-
setPaletteName
Description copied from interface:IPaletteTraceSetting palette name- Specified by:
setPaletteNamein interfaceIPaletteTrace- Parameters:
paletteName-
-
setPalette
Description copied from interface:IPaletteTraceSetting palette name and looks up this palette in the IPaletteService and applies the palette data for it to the trace as well.- Specified by:
setPalettein interfaceIPaletteTrace- Parameters:
paletteName-
-
getScaledImageData
protected org.dawnsci.plotting.draw2d.swtxy.ScaledImageData getScaledImageData()Get the current image which can be used by the composite trace.- Returns:
- Throws:
Exception
-
createScaledImage
protected boolean createScaledImage(org.dawnsci.plotting.draw2d.swtxy.ImageTrace.ImageScaleType rescaleType, org.eclipse.core.runtime.IProgressMonitor monitor) When this is called an SWT image is created and saved in the scaledData field. The image is downsampled. If rescaleAllowed is set to false, the current bin is not checked and the last scaled image is always used. Do not synchronized this method - it can cause a race condition on linux only.- Returns:
- true if scaledImage created.
-
setGlobalRange
public void setGlobalRange(double[] globalRange) Description copied from interface:IImageTraceSet a global axis range associated with the image. This parameter is used to mark an image trace as part of a collection which will be plotted on true linear axes (in the same style as XY data), potentially with multiple other traces- Specified by:
setGlobalRangein interfaceIImageTrace- Parameters:
globalRange-
-
getGlobalRange
public double[] getGlobalRange()Description copied from interface:IImageTraceGet a global axis range associated with the image. This parameter is used to mark an image trace as part of a collection which will be plotted on true linear axes (in the same style as XY data), potentially with multiple other traces- Specified by:
getGlobalRangein interfaceIImageTrace
-
fireDownsampleListeners
-
getBin
public int getBin()Description copied from interface:IDownsampledTraceProvides the square bin used for the downsample- Specified by:
getBinin interfaceIDownsampledTrace- Returns:
-
addDownsampleListener
Add listener to be notifed if the dawnsampling changes.- Specified by:
addDownsampleListenerin interfaceIDownsampledTrace- Parameters:
l-
-
removeDownsampleListener
Remove listener so that it is not notified.- Specified by:
removeDownsampleListenerin interfaceIDownsampledTrace- Parameters:
l-
-
getDownsampled
public org.eclipse.january.dataset.IDataset getDownsampled()- Specified by:
getDownsampledin interfaceIImageTrace- Returns:
- the current downsampled Dataset being used to draw the image.
-
getDownsampledMask
public org.eclipse.january.dataset.IDataset getDownsampledMask()- Specified by:
getDownsampledMaskin interfaceIImageTrace- Returns:
- the current downsampled mask or null if there is no mask.
-
getDownsampleBin
public int getDownsampleBin()Returns the bin for downsampling, either 1,2,4 or 8 currently. This gives a pixel count of 1,4,16 or 64 for the bin. If 1 no binning at all is done and no downsampling is being done, getDownsampled() will return the Dataset ok even if bin is one (no downsampling).- Specified by:
getDownsampleBinin interfaceIImageTrace- Parameters:
slice-bounds-- Returns:
-
paintFigure
protected void paintFigure(org.eclipse.draw2d.Graphics graphics) - Overrides:
paintFigurein classorg.eclipse.draw2d.Figure
-
sleep
public void sleep()Description copied from interface:IImageTraceCan be used to clear memory used by the image if the plotting system is no longer active.- Specified by:
sleepin interfaceIImageTrace
-
remove
public void remove() -
dispose
public void dispose()Description copied from interface:ITraceCalled to release system resources. -
getData
public org.eclipse.january.dataset.Dataset getData()Description copied from interface:ITraceCall this method to return a plotted data set by this trace. Different trace types will return different ranks from getData(). For ILineTrace it is 1D line data For IImageTrace it is a 2D image etc. -
getRGBData
public org.eclipse.january.dataset.IDataset getRGBData()Description copied from interface:IImageTraceIf the original data was RGB data, the trace may sum this and ignore the RGB values. In this case the original RGB data as read from disk is available by calling this method.- Specified by:
getRGBDatain interfaceIImageTrace- Returns:
-
axisRangeChanged
public void axisRangeChanged(org.eclipse.nebula.visualization.xygraph.figures.Axis axis, org.eclipse.nebula.visualization.xygraph.linearscale.Range oldRange, org.eclipse.nebula.visualization.xygraph.linearscale.Range newRange) - Specified by:
axisRangeChangedin interfaceorg.eclipse.nebula.visualization.xygraph.figures.IAxisListener
-
axisRevalidated
public void axisRevalidated(org.eclipse.nebula.visualization.xygraph.figures.Axis axis) We do a bit here to ensure that not too many calls to createScaledImage(...) are made.- Specified by:
axisRevalidatedin interfaceorg.eclipse.nebula.visualization.xygraph.figures.IAxisListener
-
performAutoscale
public void performAutoscale() -
setImageOrigin
Rotates the image so that its origin is in given corner- Specified by:
setImageOriginin interfaceIImageTrace- Parameters:
imageOrigin-
-
getImageOrigin
Description copied from interface:IImageTraceDefault is TOP_LEFT unlike normal plotting- Specified by:
getImageOriginin interfaceIImageTrace- Returns:
-
setImageTransposed
public void setImageTransposed(boolean imageTransposed) -
isRescaleHistogram
public boolean isRescaleHistogram()Description copied from interface:IPaletteTraceIs the imagetrace set to rescale the histogram when a new image update occurs- Specified by:
isRescaleHistogramin interfaceIPaletteTrace- Returns:
- the current state.
-
setRescaleHistogram
public void setRescaleHistogram(boolean rescaleHistogram) Description copied from interface:IPaletteTraceSet wheter an update to the image trace triggers a rehistogram- Specified by:
setRescaleHistogramin interfaceIPaletteTrace- Parameters:
rescaleHistogram-
-
setData
public boolean setData(org.eclipse.january.dataset.ILazyDataset im, List<? extends org.eclipse.january.dataset.IDataset> axes, boolean performAuto) Description copied from interface:IImageTraceCall to set image data- Specified by:
setDatain interfaceIImageTrace- Parameters:
im-axes- - may be nullperformAuto- - true to rescale to new selection, otherwise keeps last axis position.- Returns:
- false if could not set data
-
setDynamicData
public void setDynamicData(org.eclipse.january.dataset.IDynamicShape dynamic) Description copied from interface:IImageTraceSet image as a changeable one- Specified by:
setDynamicDatain interfaceIImageTrace- Parameters:
dynamic-
-
dataChangePerformed
public void dataChangePerformed(org.eclipse.january.dataset.DataEvent evt) Called when the internal data of image has changed.- Specified by:
dataChangePerformedin interfaceorg.eclipse.january.dataset.IDataListener
-
setAxes
Description copied from interface:IImageTraceChange the axes without changing the underlying data.- Specified by:
setAxesin interfaceIImageTrace- Parameters:
axes-performAuto-
-
getMin
Description copied from interface:IPaletteTraceThe min intensity for generating the image- Specified by:
getMinin interfaceIPaletteTrace- Returns:
-
setMin
Description copied from interface:IPaletteTraceThe min intensity for generating the image/surface trace- Specified by:
setMinin interfaceIPaletteTrace
-
getMax
Description copied from interface:IPaletteTraceThe max intensity for generating the image- Specified by:
getMaxin interfaceIPaletteTrace- Returns:
-
setMax
Description copied from interface:IPaletteTraceThe max intensity for generating the image/surface trace- Specified by:
setMaxin interfaceIPaletteTrace
-
getImageServiceBean
Description copied from interface:IPaletteTraceReturns the last image service bean sent to the service for getting the image.- Specified by:
getImageServiceBeanin interfaceIPaletteTrace- Returns:
-
addPaletteListener
Description copied from interface:IPaletteTraceCall to add a palette listener- Specified by:
addPaletteListenerin interfaceIPaletteTrace- Parameters:
pl-
-
removePaletteListener
Description copied from interface:IPaletteTraceCall to remove a palette listener- Specified by:
removePaletteListenerin interfaceIPaletteTrace- Parameters:
pl-
-
getDownsampleType
- Specified by:
getDownsampleTypein interfaceIImageTrace- Returns:
- the down-sample type being used for plotting less data than received.
-
setDownsampleType
Description copied from interface:IImageTraceChange the down-sample type, will also refresh the UI.- Specified by:
setDownsampleTypein interfaceIImageTrace- Parameters:
type-
-
rehistogram
public void rehistogram()- Specified by:
rehistogramin interfaceIImageTrace
-
remask
public void remask() -
getAxes
Description copied from interface:IAxesTraceThe set of axes, either a list of size 2 for a 2D trace or a list of size 3 for a 3D one. May contain nulls (z is often null for intensity).- Specified by:
getAxesin interfaceIAxesTrace- Specified by:
getAxesin interfaceICoordinateSystemTrace- Returns:
-
getHistoType
return the HistoType being used- Specified by:
getHistoTypein interfaceIImageTrace- Returns:
-
setHistoType
Sets the histo type.- Specified by:
setHistoTypein interfaceIImageTrace
-
getTrace
- Specified by:
getTracein interfaceITraceContainer- Returns:
- the trace which
-
setTrace
Description copied from interface:ITraceContainerThis method may do nothing if the trace cannot be changed.- Specified by:
setTracein interfaceITraceContainer- Parameters:
trace-
-
setImageUpdateActive
public void setImageUpdateActive(boolean active) Description copied from interface:IImageTraceYou may set the image not to redraw images during updating a number of settings for efficiency reasons. Do this in a try{} finally{} block to avoid it being left off.- Specified by:
setImageUpdateActivein interfaceIImageTrace- Parameters:
active-
-
getMinCut
Description copied from interface:IPaletteTraceGets the min cut, a RGB and a bound.- Specified by:
getMinCutin interfaceIPaletteTrace- Returns:
-
setMinCut
Description copied from interface:IPaletteTraceSets the min cut, a RGB and a bound.- Specified by:
setMinCutin interfaceIPaletteTrace
-
getMaxCut
Description copied from interface:IPaletteTraceGets the max cut, a RGB and a bound.- Specified by:
getMaxCutin interfaceIPaletteTrace- Returns:
-
setMaxCut
Description copied from interface:IPaletteTraceSets the min cut, a RGB and a bound.- Specified by:
setMaxCutin interfaceIPaletteTrace
-
getNanBound
Description copied from interface:IPaletteTraceGets the Nan cut- Specified by:
getNanBoundin interfaceIPaletteTrace- Returns:
-
setNanBound
Description copied from interface:IPaletteTraceSets the Nan cut- Specified by:
setNanBoundin interfaceIPaletteTrace
-
getMask
public org.eclipse.january.dataset.Dataset getMask()The masking dataset of there is one, normally null.- Specified by:
getMaskin interfaceIImageTrace- Returns:
-
setMask
public void setMask(org.eclipse.january.dataset.IDataset mask) Set mask- Specified by:
setMaskin interfaceIImageTrace- Parameters:
mask-
-
isUserTrace
public boolean isUserTrace()Description copied from interface:ITraceTrue if user trace (normally is)- Specified by:
isUserTracein interfaceITrace- Returns:
-
setUserTrace
public void setUserTrace(boolean isUserTrace) Description copied from interface:ITraceTrue if visible- Specified by:
setUserTracein interfaceITrace
-
isMaximumZoom
public boolean isMaximumZoom() -
getUserObject
Description copied from interface:ITraceAn object which may be set by API users to record information about the plot. Ideally avoid objects containing large data in this method.- Specified by:
getUserObjectin interfaceITrace- Returns:
-
setUserObject
Description copied from interface:ITraceAn object which may be set by API users to record information about the plot. Ideally avoid objects containing large data in this method.- Specified by:
setUserObjectin interfaceITrace
-
getRegionInAxisCoordinates
If the axis data set has been set, this method will return a selection region in the coordinates of the axes labels rather than the indices. Ellipse and Sector rois are not currently supported.- Specified by:
getRegionInAxisCoordinatesin interfaceICoordinateSystemTrace- Returns:
- ROI in label coordinates. This roi is not that useful after it is created. The data processing needs rois with indices.
- Throws:
Exception- if the roi could not be transformed or the roi type is unknown.
-
getPointInAxisCoordinates
Description copied from interface:ICoordinateSystemTraceIf the axis data set has been set, this method will return a point in the coordinates of the axes labels rather than the indices. If no axes are set, then the original point is returned. NOTE the double[] passed in is not the pixel coordinates point from events like a mouse click (int[]). It is the data point (indices of real data the case of the image). The return value is the data point looked up in the image custom axes. If no custom axes are set (via the setAxes(..) method) then you will simply get the same double passed back.- Specified by:
getPointInAxisCoordinatesin interfaceICoordinateSystemTrace- Parameters:
point- in index of dataset coordinates (same as ROIs on images use).- Returns:
- point in label coordinates.
- Throws:
Exception- if the point could not be transformed or the point type is unknown.- See Also:
-
getPointInImageCoordinates
Description copied from interface:ICoordinateSystemTraceFor regions over images: if the axis data set has been set, this method will return a point in the coordinates of the image indices rather than the axes. If no axes are set, then the original point is returned. If the plot is 1D then the original values are returned.- Specified by:
getPointInImageCoordinatesin interfaceICoordinateSystemTrace- Returns:
- point in index of dataset coordinates (same as ROIs on images use).
- Throws:
Exception- if the point could not be transformed or the point type is unknown.- See Also:
-
getPlottingSystem
-
setPlottingSystem
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceIAxesTrace- Returns:
- true if plot is currently plotting.
-
getAxesNames
Description copied from interface:IAxesTraceLabels for the axes. The data set name of the axis used if not set. Should be size 3 but may have nulls.- Specified by:
getAxesNamesin interfaceIAxesTrace- Returns:
-
is3DTrace
public boolean is3DTrace() -
getRank
public int getRank()Description copied from interface:ITraceThe rank of data plotted, 1 for XY, 2 for Image and surfaces, 3 for volumes. -
getDataName
Description copied from interface:ITraceThe name of the original data that this trace was plotted from or null- Specified by:
getDataNamein interfaceITrace- Returns:
-
setDataName
Description copied from interface:ITraceThe name of the original data that this trace was plotted from or null- Specified by:
setDataNamein interfaceITrace
-
getAlpha
public int getAlpha()Description copied from interface:IImageTraceReturn the transparency value of the image. The alpha value must be between 0 (transparent) and 255 (opaque). A value of -1 is the default and means that no CPU is used for alpha.- Specified by:
getAlphain interfaceIImageTrace
-
setAlpha
public void setAlpha(int alpha) Description copied from interface:IImageTraceSet the transparency setting The alpha value must be between 0 (transparent) and 255 (opaque). A value of -1 is the default and means that no CPU is used for alpha.- Specified by:
setAlphain interfaceIImageTrace- Parameters:
alpha-
-
hasTrueAxes
public boolean hasTrueAxes()Description copied from interface:IImageTraceIf true the image is plotted against a true linear axis rather than indicies. Only true if a global range is set.- Specified by:
hasTrueAxesin interfaceIImageTrace- Returns:
- trueAxes
-
axisForegroundColorChanged
public void axisForegroundColorChanged(org.eclipse.nebula.visualization.xygraph.figures.Axis axis, org.eclipse.swt.graphics.Color oldColor, org.eclipse.swt.graphics.Color newColor) - Specified by:
axisForegroundColorChangedin interfaceorg.eclipse.nebula.visualization.xygraph.figures.IAxisListener
-
axisTitleChanged
public void axisTitleChanged(org.eclipse.nebula.visualization.xygraph.figures.Axis axis, String oldTitle, String newTitle) - Specified by:
axisTitleChangedin interfaceorg.eclipse.nebula.visualization.xygraph.figures.IAxisListener
-
axisAutoScaleChanged
public void axisAutoScaleChanged(org.eclipse.nebula.visualization.xygraph.figures.Axis axis, boolean oldAutoScale, boolean newAutoScale) - Specified by:
axisAutoScaleChangedin interfaceorg.eclipse.nebula.visualization.xygraph.figures.IAxisListener
-
axisLogScaleChanged
public void axisLogScaleChanged(org.eclipse.nebula.visualization.xygraph.figures.Axis axis, boolean old, boolean logScale) - Specified by:
axisLogScaleChangedin interfaceorg.eclipse.nebula.visualization.xygraph.figures.IAxisListener
-
resetAxes
public void resetAxes()Reset axes back to not keep aspect ratio and original ticks settings
-