public class IntensityGraphFigure extends org.eclipse.draw2d.Figure implements Introspectable
Modifier and Type | Class and Description |
---|---|
static class |
IntensityGraphFigure.ColorDepth
Color depth of the image data in RGB1 mode, since SWT only support 8 bit color depth,
it has to convert all data to [0,255].
|
class |
IntensityGraphFigure.GraphArea |
(package private) class |
IntensityGraphFigure.GraphAreaZoomer |
static interface |
IntensityGraphFigure.ICroppedDataSizeListener |
static interface |
IntensityGraphFigure.IPixelInfoProvider |
static interface |
IntensityGraphFigure.IProfileDataChangeLisenter |
static interface |
IntensityGraphFigure.IROIInfoProvider
Provides info to be displayed on ROI label.
|
static interface |
IntensityGraphFigure.IROIListener
ROI listener which will be notified whenever ROI moved.
|
(package private) class |
IntensityGraphFigure.SinglePixelProfileCrossHair |
class |
IntensityGraphFigure.UnsignedPrimitiveArrayWrapper
Wraps an array of raw signed data to emulate an unsigned datatype.
|
Constructor and Description |
---|
IntensityGraphFigure() |
IntensityGraphFigure(boolean runMode) |
Modifier and Type | Method and Description |
---|---|
void |
addCroppedDataSizeListener(IntensityGraphFigure.ICroppedDataSizeListener listener) |
void |
addPixelInfoProvider(IntensityGraphFigure.IPixelInfoProvider pixelInfoProvider) |
void |
addProfileDataListener(IntensityGraphFigure.IProfileDataChangeLisenter listener) |
void |
addROI(java.lang.String name,
IntensityGraphFigure.IROIListener roiListener,
IntensityGraphFigure.IROIInfoProvider roiInfoProvider)
Add a new ROI to the graph.
|
protected int |
calcRGBPixel(IPrimaryArrayWrapper dataArray,
double max,
double min,
int index) |
void |
dispose() |
java.beans.BeanInfo |
getBeanInfo() |
IntensityGraphFigure.ColorDepth |
getColorDepth() |
ColorMap |
getColorMap() |
int |
getCropBottom() |
int |
getCropLeft() |
int |
getCropRight() |
int |
getCropTop() |
double[] |
getDataArray() |
int |
getDataHeight() |
int |
getDataWidth() |
IntensityGraphFigure.GraphArea |
getGraphArea() |
org.eclipse.draw2d.geometry.Dimension |
getGraphAreaInsets() |
double |
getMax() |
double |
getMin() |
java.lang.String |
getPixelInfo(int xIndex,
int yIndex,
double xCoordinate,
double yCoordinate,
double pixelValue) |
ROIFigure |
getROI(java.lang.String name) |
org.eclipse.swt.graphics.Color |
getRoiColor() |
int |
getUnsignedBits() |
Axis |
getXAxis() |
Axis |
getYAxis() |
boolean |
isInRGBMode() |
boolean |
isRunMode() |
boolean |
isShowRamp() |
boolean |
isSingleLineProfiling()
If it is profiling on single pixel.
|
protected void |
layout() |
void |
removeROI(java.lang.String name) |
void |
setColorDepth(IntensityGraphFigure.ColorDepth colorDepth)
Set Color depth of the image.
|
void |
setColorMap(ColorMap colorMap) |
void |
setCropBottom(int cropBottom) |
void |
setCropLeft(int cropLeft) |
void |
setCropRight(int cropRight) |
void |
setCropTop(int cropTop) |
void |
setDataArray(byte[] data)
Set the byte[] data array for the intensity graph.
|
void |
setDataArray(double[] data)
Set the double[] data array for the intensity graph.
|
void |
setDataArray(float[] data)
Set the float[] data array for the intensity graph.
|
void |
setDataArray(int[] data)
Set the int[] data array for the intensity graph.
|
void |
setDataArray(IPrimaryArrayWrapper dataWrapper)
Set the data array wrapper for the intensity graph.
|
void |
setDataArray(long[] data)
Set the long[] data array for the intensity graph.
|
void |
setDataArray(short[] data)
Set the short[] data array for the intensity graph.
|
void |
setDataHeight(int dataHeight) |
void |
setDataWidth(int dataWidth) |
void |
setFont(org.eclipse.swt.graphics.Font f) |
void |
setInRGBMode(boolean inRGBMode)
Set if the input data is in RGB mode.
|
void |
setMax(double max) |
void |
setMin(double min) |
void |
setROIColor(org.eclipse.swt.graphics.Color roiColor)
Set color of ROI figures.
|
void |
setROIDataBounds(java.lang.String name,
int xIndex,
int yIndex,
int width,
int height) |
void |
setROIVisible(java.lang.String name,
boolean visible) |
void |
setRunMode(boolean runMode) |
void |
setShowRamp(boolean show) |
void |
setSingleLineProfiling(boolean isSingleLineProfiling)
Profile on single pixel.
|
void |
setUnsignedBits(int bits)
Sets the unsigned bits
|
protected void |
updateCroppedDataSize() |
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, paint, paintBorder, paintChildren, paintClientArea, paintFigure, 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, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate
public IntensityGraphFigure()
public IntensityGraphFigure(boolean runMode)
public void addProfileDataListener(IntensityGraphFigure.IProfileDataChangeLisenter listener)
public void addPixelInfoProvider(IntensityGraphFigure.IPixelInfoProvider pixelInfoProvider)
public void addCroppedDataSizeListener(IntensityGraphFigure.ICroppedDataSizeListener listener)
public void addROI(java.lang.String name, IntensityGraphFigure.IROIListener roiListener, IntensityGraphFigure.IROIInfoProvider roiInfoProvider)
name
- name of the ROI. It must be unique for this graph.color
- color of the ROI.roiListener
- listener on ROI updates. Can be null.roiInfoProvider
- provides information for the ROI. Can be null.public void removeROI(java.lang.String name)
public void setROIVisible(java.lang.String name, boolean visible)
public void dispose()
protected int calcRGBPixel(IPrimaryArrayWrapper dataArray, double max, double min, int index)
dataArray
- max
- min
- index
- public ColorMap getColorMap()
public int getCropBottom()
public int getCropLeft()
public int getCropRight()
public int getCropTop()
public double[] getDataArray()
public int getDataHeight()
public int getDataWidth()
public int getUnsignedBits()
public IntensityGraphFigure.GraphArea getGraphArea()
public org.eclipse.draw2d.geometry.Dimension getGraphAreaInsets()
public double getMax()
public double getMin()
public final Axis getXAxis()
public final Axis getYAxis()
public boolean isInRGBMode()
public boolean isRunMode()
public boolean isShowRamp()
protected void layout()
layout
in class org.eclipse.draw2d.Figure
public final void setColorMap(ColorMap colorMap)
colorMap
- the colorMap to setpublic final void setCropBottom(int cropBottom)
cropBottom
- the cropBottom to setpublic final void setCropLeft(int cropLeft)
cropLeft
- the cropLeft to setpublic final void setCropRight(int cropRight)
cropRight
- the cropRigth to setpublic final void setCropTop(int cropTop)
cropTop
- the cropTop to setpublic final void setDataArray(double[] data)
data
- the dataArray to setpublic final void setDataArray(short[] data)
data
- the dataArray to setpublic final void setDataArray(byte[] data)
data
- the dataArray to setpublic final void setDataArray(int[] data)
data
- the dataArray to setpublic final void setDataArray(long[] data)
data
- the dataArray to setpublic final void setDataArray(float[] data)
data
- the dataArray to setpublic final void setDataArray(IPrimaryArrayWrapper dataWrapper)
data
- the dataArray to setpublic final void setDataHeight(int dataHeight)
dataHeight
- the dataHeight to setpublic final void setDataWidth(int dataWidth)
dataWidth
- the dataWidth to setpublic void setInRGBMode(boolean inRGBMode)
inRGBMode
- true if the input data in RGB mode.public final void setMax(double max)
max
- the max to setpublic void setFont(org.eclipse.swt.graphics.Font f)
setFont
in interface org.eclipse.draw2d.IFigure
setFont
in class org.eclipse.draw2d.Figure
public final void setMin(double min)
min
- the min to setpublic final void setUnsignedBits(int bits)
bits
- the number of bits in the unsigned data, or zero and has to be
<= 1023 (limit for IEEE doubles). If bits <= 0, the data is
treated as having signed values.public void setROIColor(org.eclipse.swt.graphics.Color roiColor)
roiColor
- public org.eclipse.swt.graphics.Color getRoiColor()
public void setROIDataBounds(java.lang.String name, int xIndex, int yIndex, int width, int height)
public ROIFigure getROI(java.lang.String name)
public void setRunMode(boolean runMode)
runMode
- the runMode to setpublic void setShowRamp(boolean show)
public java.beans.BeanInfo getBeanInfo() throws java.beans.IntrospectionException
getBeanInfo
in interface Introspectable
java.beans.IntrospectionException
public IntensityGraphFigure.ColorDepth getColorDepth()
public void setColorDepth(IntensityGraphFigure.ColorDepth colorDepth)
colorDepth
- the colorDepth to setpublic boolean isSingleLineProfiling()
public void setSingleLineProfiling(boolean isSingleLineProfiling)
isSingleLineProfiling
- the isSinglePixelProfiling to setpublic java.lang.String getPixelInfo(int xIndex, int yIndex, double xCoordinate, double yCoordinate, double pixelValue)
protected void updateCroppedDataSize()