public abstract class IcyCanvas2D extends IcyCanvas
PROPERTY_LAYERS_VISIBLE
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
IcyCanvas2D(Viewer viewer) |
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Point2D.Double |
canvasToImage(int x,
int y)
Convert specified canvas point to image point
|
java.awt.geom.Rectangle2D.Double |
canvasToImage(int x,
int y,
int w,
int h)
Convert specified canvas rectangle to image rectangle
|
java.awt.geom.Point2D.Double |
canvasToImage(java.awt.Point point)
Convert specified canvas point to image point
|
java.awt.geom.Rectangle2D.Double |
canvasToImage(java.awt.Rectangle rect)
Convert specified canvas rectangle to image rectangle
|
java.awt.geom.Point2D.Double |
canvasToImageDelta(int x,
int y)
Convert specified canvas delta point to image delta point
|
java.awt.geom.Point2D.Double |
canvasToImageDelta(java.awt.Point point)
Convert specified canvas delta point to image delta point
|
java.awt.geom.Point2D.Double |
canvasToImageLogDelta(int x,
int y)
Convert specified canvas delta point to image delta point.
|
java.awt.geom.Point2D.Double |
canvasToImageLogDelta(int x,
int y,
double logFactor)
Convert specified canvas delta point to image delta point.
|
java.awt.Dimension |
canvasToViewer(java.awt.Dimension dim)
Convert canvas dimension to viewer dimension
|
void |
centerImage()
Center image in canvas
|
void |
centerOn(java.awt.Rectangle region)
Adjust view position and possibly scaling factor to ensure the specified region become visible.
|
void |
centerOnImage(double x,
double y)
Center image on specified image position in canvas
|
void |
centerOnImage(java.awt.geom.Point2D.Double pt)
Center image on specified image position in canvas
|
void |
changed(IcyCanvasEvent event)
canvas changed (packed event).
|
void |
fitCanvasToImage()
Change canvas size (so viewer size) to get it fit with image dimension if possible
|
void |
fitImageToCanvas()
Change scale so image fit in canvas view dimension
|
java.awt.Dimension |
getCanvasSize()
Get 2D view size in canvas pixel coordinate
|
java.awt.Rectangle |
getCanvasVisibleRect()
Get 2D canvas visible rectangle (canvas coordinate).
|
java.awt.Dimension |
getImageCanvasSize()
Get 2D image size in canvas pixel coordinate
|
java.awt.Dimension |
getImageSize()
Get 2D image size
|
java.awt.geom.Rectangle2D |
getImageVisibleRect()
Get 2D image visible rectangle (image coordinate).
|
java.awt.geom.AffineTransform |
getInverseTransform()
Return the 2D
AffineTransform object which convert from canvas coordinate to image
coordinate. |
java.awt.geom.Point2D.Double |
getMouseImagePos()
Return mouse image position
|
double |
getMouseImagePosX()
mouse X image position
|
double |
getMouseImagePosY()
mouse Y image position
|
java.awt.geom.AffineTransform |
getTransform()
Return the 2D
AffineTransform object which convert from image coordinate to canvas
coordinate. |
java.awt.Point |
imageToCanvas(double x,
double y)
Convert specified image point to canvas point
|
java.awt.Rectangle |
imageToCanvas(double x,
double y,
double w,
double h)
Convert specified image rectangle to canvas rectangle
|
java.awt.Point |
imageToCanvas(java.awt.geom.Point2D.Double point)
Convert specified image point to canvas point
|
java.awt.Rectangle |
imageToCanvas(java.awt.geom.Rectangle2D.Double rect)
Convert specified image rectangle to canvas rectangle
|
java.awt.Point |
imageToCanvasDelta(double x,
double y)
Convert specified image delta point to canvas delta point
|
java.awt.Point |
imageToCanvasDelta(java.awt.geom.Point2D.Double point)
Convert specified image delta point to canvas delta point
|
void |
setMouseCanvasPos(int x,
int y)
Deprecated.
Use
setMousePos(int, int) instead |
void |
setMouseCanvasPos(java.awt.Point point)
Deprecated.
Use
IcyCanvas.setMousePos(Point) instead. |
void |
setMouseImagePos(double x,
double y) |
void |
setMouseImagePos(java.awt.geom.Point2D.Double point)
Set mouse image position
|
boolean |
setMousePos(int x,
int y)
Set mouse position (in canvas coordinate space).
|
void |
setPositionT(int t)
Set T position
|
void |
setPositionZ(int z)
Set Z position
|
java.awt.Dimension |
viewerToCanvas(java.awt.Dimension dim)
Convert viewer dimension to canvas dimension
|
addCanvasListener, addLayer, addLayer, addLayerListener, addLayersListener, addViewerToolbarComponents, addVisibleLayerToList, beginUpdate, canvasToImageC, canvasToImageDeltaC, canvasToImageDeltaT, canvasToImageDeltaX, canvasToImageDeltaY, canvasToImageDeltaZ, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaY, canvasToImageLogDeltaY, canvasToImageLogDeltaZ, canvasToImageLogDeltaZ, canvasToImageT, canvasToImageX, canvasToImageY, canvasToImageZ, create, customizeToolbar, endUpdate, getC, getCanvasClassName, getCanvasClassName, getCanvasOffsetC, getCanvasOffsetT, getCanvasOffsetX, getCanvasOffsetY, getCanvasOffsetZ, getCanvasPluginNames, getCanvasPlugins, getCanvasSize, getCanvasSizeC, getCanvasSizeT, getCanvasSizeX, getCanvasSizeY, getCanvasSizeZ, getCurrentImage, getDrawLayers, getFrameRate, getImage, getImage, getImageCanvasSize, getImageCanvasSizeC, getImageCanvasSizeT, getImageCanvasSizeX, getImageCanvasSizeY, getImageCanvasSizeZ, getImageLayer, getImageOffsetC, getImageOffsetT, getImageOffsetX, getImageOffsetY, getImageOffsetZ, getImageOverlay, getImageSize, getImageSizeC, getImageSizeT, getImageSizeX, getImageSizeY, getImageSizeZ, getLayer, getLayer, getLayer, getLayerListeners, getLayers, getLayers, getLayersPainter, getListeners, getLut, getMax, getMaxC, getMaxPosition, getMaxPosition5D, getMaxPositionC, getMaxPositionT, getMaxPositionX, getMaxPositionY, getMaxPositionZ, getMaxT, getMaxX, getMaxY, getMaxZ, getMouseImageInfosPanel, getMouseImagePos, getMouseImagePos5D, getMouseImagePosC, getMouseImagePosT, getMouseImagePosZ, getMousePos, getNumSelectedSamples, getOffset, getOffset5D, getOffsetC, getOffsetT, getOffsetX, getOffsetY, getOffsetZ, getOrderedLayersForEvent, getOverlays, getPanel, getPluginClassName, getPosition, getPosition5D, getPositionC, getPositionT, getPositionX, getPositionY, getPositionZ, getRenderedImage, getRenderedImage, getRenderedImage, getRenderedSequence, getRenderedSequence, getRenderedSequence, getRenderedSequence, getRotation, getRotationC, getRotationT, getRotationX, getRotationY, getRotationZ, getScale, getScaleC, getScaleFactorC, getScaleFactorT, getScaleFactorX, getScaleFactorY, getScaleFactorZ, getScaleT, getScaleX, getScaleY, getScaleZ, getSequence, getSyncId, getT, getTNavigationPanel, getViewComponent, getViewer, getVisibleLayers, getVisibleLayers, getVisibleOrderedLayersForEvent, getZ, getZNavigationPanel, hasLayer, hasLayer, hasLayer, imageToCanvasC, imageToCanvasDeltaC, imageToCanvasDeltaT, imageToCanvasDeltaX, imageToCanvasDeltaY, imageToCanvasDeltaZ, imageToCanvasT, imageToCanvasX, imageToCanvasY, imageToCanvasZ, isLayersVisible, isSynchHeader, isSynchMaster, isSynchOnCursor, isSynchOnSlice, isSynchOnView, isSynchronizationSupported, isSynchronized, isSynchSlave, isUpdating, isVisible, keyPressed, keyReleased, keyTyped, layerChanged, lutChanged, mouseClick, mouseClick, mouseDrag, mouseDrag, mouseEntered, mouseEntered, mouseExited, mouseExited, mouseImagePositionChanged, mouseMove, mouseMove, mousePressed, mousePressed, mouseReleased, mouseReleased, mouseWheelMoved, mouseWheelMoved, offsetChanged, onChanged, refresh, removeCanvasListener, removeLayer, removeLayer, removeLayer, removeLayerListener, removeLayersListener, rotationChanged, scaleChanged, sequenceChanged, sequenceClosed, setC, setDrawLayers, setFrameRate, setLayersVisible, setMouseImagePos, setMouseImagePosC, setMouseImagePosT, setMouseImagePosX, setMouseImagePosY, setMouseImagePosZ, setMousePos, setOffset, setOffsetC, setOffsetT, setOffsetX, setOffsetY, setOffsetZ, setPosition, setPositionC, setPositionX, setPositionY, setRotation, setRotationC, setRotationT, setRotationX, setRotationY, setRotationZ, setScale, setScaleC, setScaleT, setScaleX, setScaleY, setScaleZ, setSyncId, setT, setZ, shutDown, viewerChanged, viewerClosed
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public IcyCanvas2D(Viewer viewer)
public void setPositionZ(int z)
IcyCanvas
setPositionZ
in class IcyCanvas
public void setPositionT(int t)
IcyCanvas
setPositionT
in class IcyCanvas
public double getMouseImagePosX()
IcyCanvas
getMouseImagePosX
in class IcyCanvas
public double getMouseImagePosY()
IcyCanvas
getMouseImagePosY
in class IcyCanvas
public java.awt.geom.Point2D.Double getMouseImagePos()
public void setMouseImagePos(double x, double y)
public void setMouseImagePos(java.awt.geom.Point2D.Double point)
public boolean setMousePos(int x, int y)
IcyCanvas
true
if the mouse position actually changed.setMousePos
in class IcyCanvas
@Deprecated public void setMouseCanvasPos(int x, int y)
setMousePos(int, int)
instead@Deprecated public void setMouseCanvasPos(java.awt.Point point)
IcyCanvas.setMousePos(Point)
instead.public java.awt.geom.Point2D.Double canvasToImageDelta(int x, int y)
public java.awt.geom.Point2D.Double canvasToImageDelta(java.awt.Point point)
public java.awt.geom.Point2D.Double canvasToImageLogDelta(int x, int y, double logFactor)
public java.awt.geom.Point2D.Double canvasToImageLogDelta(int x, int y)
public java.awt.geom.Point2D.Double canvasToImage(int x, int y)
public java.awt.geom.Point2D.Double canvasToImage(java.awt.Point point)
public java.awt.geom.Rectangle2D.Double canvasToImage(int x, int y, int w, int h)
public java.awt.geom.Rectangle2D.Double canvasToImage(java.awt.Rectangle rect)
public java.awt.Point imageToCanvasDelta(double x, double y)
public java.awt.Point imageToCanvasDelta(java.awt.geom.Point2D.Double point)
public java.awt.Point imageToCanvas(double x, double y)
public java.awt.Point imageToCanvas(java.awt.geom.Point2D.Double point)
public java.awt.Rectangle imageToCanvas(double x, double y, double w, double h)
public java.awt.Rectangle imageToCanvas(java.awt.geom.Rectangle2D.Double rect)
public java.awt.Dimension getCanvasSize()
public java.awt.Dimension getImageSize()
public java.awt.Dimension getImageCanvasSize()
public java.awt.Rectangle getCanvasVisibleRect()
public java.awt.geom.Rectangle2D getImageVisibleRect()
Graphics.getClipBounds()
method for paint operation as the image visible
rectangle may return wrong information sometime (when using the IcyCanvas.getRenderedImage(int, int, int, boolean)
method for instance).public void centerOn(java.awt.Rectangle region)
region
- the region we want to seepublic void centerOnImage(double x, double y)
public void centerOnImage(java.awt.geom.Point2D.Double pt)
public void centerImage()
public void fitImageToCanvas()
public void fitCanvasToImage()
public java.awt.Dimension canvasToViewer(java.awt.Dimension dim)
public java.awt.Dimension viewerToCanvas(java.awt.Dimension dim)
public java.awt.geom.AffineTransform getTransform()
AffineTransform
object which convert from image coordinate to canvas
coordinate.Overlay
should directly use the transform information from the Graphics2D
object provided in
their Overlay.paint(Graphics2D, Sequence, IcyCanvas)
method.public java.awt.geom.AffineTransform getInverseTransform()
AffineTransform
object which convert from canvas coordinate to image
coordinate.Overlay
should directly use the transform information from the Graphics2D
object provided in
their Overlay.paint(Graphics2D, Sequence, IcyCanvas)
method.public void changed(IcyCanvasEvent event)
IcyCanvas