fr.esrf.tangoatk.widget.util
Class JImageJ

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by fr.esrf.tangoatk.widget.util.JImageJ
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class JImageJ
extends javax.swing.JPanel
implements java.awt.event.ActionListener

See Also:
Serialized Form

Nested Class Summary
protected  class JImageJ.CanvasRenderer
          JComponent used to render the ImageCanvas.
protected  class JImageJ.HiddenWindow
           
protected  class JImageJ.RenderedImageCanvas
          An ImageCanvas which can manage AdvancedImagePlus and its multi Roi.
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  javax.swing.JToggleButton angleButton
           
protected  java.lang.String angleTitle
           
protected  javax.swing.JToggleButton arrowButton
           
protected  javax.swing.ButtonGroup buttonGroup
           
protected  JImageJ.RenderedImageCanvas canvas
           
protected  JImageJ.CanvasRenderer canvasRenderer
           
protected  javax.swing.JButton clearButton
           
protected  java.lang.String clearTitle
           
protected  java.lang.String clearUndoRedoTitle
           
protected  boolean crossCursor
           
protected  java.awt.Color cursorColor
           
protected  java.lang.String deleteAllROIsMessage
           
protected  java.lang.String deleteAllROIsTitle
           
protected  javax.swing.JButton deleteButton
           
protected  java.lang.String deleteTitle
           
protected  java.lang.String deleteUndoRedoTitle
           
protected  javax.swing.JToggleButton ellipseButton
           
protected  java.lang.String ellipseTitle
           
protected  javax.swing.JToggleButton freeHandButton
           
protected  java.lang.String freeHandTitle
           
protected  int grid
           
protected  javax.swing.JToggleButton handButton
           
protected  java.lang.String handTitle
           
protected  ij.ImageJ hiddenIJ
           
protected  java.lang.String ignoreROIContinueMessage
           
protected  java.lang.String ignoreROIMessage
           
protected  java.lang.String ignoreROITitle
           
protected  javax.swing.JScrollPane imagePane
           
protected  AdvancedImagePlus imp
           
protected  javax.swing.JButton innerButton
           
protected  java.lang.String innerTitle
           
protected  javax.swing.JButton intersectionButton
           
protected  java.lang.String intersectionTitle
           
protected  java.lang.String intersectionUndoRedoTitle
           
protected  javax.swing.JButton invalidateButton
           
protected  java.lang.String invalidateTitle
           
protected  javax.swing.JToggleButton lineButton
           
protected  java.lang.String lineTitle
           
protected  java.awt.Insets margin
           
protected  javax.swing.JButton maskButton
           
protected  java.lang.String maskTitle
           
protected  java.lang.String maskUndoRedoTitle
           
protected static java.awt.Insets NO_MARGIN
           
protected  javax.swing.JButton outerButton
           
protected  java.lang.String outerTitle
           
protected  javax.swing.JToggleButton polygonButton
           
protected  java.lang.String polygonTitle
           
protected  javax.swing.JToggleButton rectangleButton
           
protected  java.lang.String rectangleTitle
           
protected  javax.swing.JButton redoButton
           
protected  java.lang.String redoTitle
           
protected  javax.swing.JButton resetButton
           
protected  java.lang.String resetTitle
           
protected  java.lang.String resetUndoRedoTitle
           
protected  java.awt.Color roiColor
           
protected  java.awt.Color roiInsideColor
           
protected  java.awt.Color roiInsideSelectionColor
           
protected  java.awt.Color roiOutsideColor
           
protected  java.awt.Color roiOutsideSelectionColor
           
protected  java.awt.Color roiSelectionColor
           
protected  javax.swing.JToggleButton selectedButton
           
protected  java.lang.String selectionTitle
           
protected  boolean snapToGrid
           
protected  javax.swing.JButton substractButton
           
protected  java.lang.String substractTitle
           
protected  java.lang.String substractUndoRedoTitle
           
protected  java.awt.image.BufferedImage theImage
           
protected  javax.swing.JPanel toolbarPanel
           
protected  javax.swing.JButton undoButton
           
protected static int undoLimit
           
protected  javax.swing.undo.UndoManager undoManager
           
protected  java.lang.String undoTitle
           
protected  javax.swing.JButton unionButton
           
protected  java.lang.String unionTitle
           
protected  java.lang.String unionUndoRedoTitle
           
protected  javax.swing.JToggleButton wandButton
           
protected  java.lang.String wandTitle
           
protected  JLAxis xAxis
           
protected  int xAxisHeight
           
protected  int xAxisUpMargin
           
protected  int xCursor
           
protected  javax.swing.JButton xorButton
           
protected  int xOrg
           
protected  java.lang.String xorTitle
           
protected  java.lang.String xorUndoRedoTitle
           
protected  JLAxis yAxis
           
protected  int yAxisRightMargin
           
protected  int yAxisWidth
           
protected  int yCursor
           
protected  int yOrg
           
protected  javax.swing.JToggleButton zoomButton
           
protected  java.lang.String zoomTitle
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JImageJ()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void applyMask()
           
protected  boolean canCombineROIs()
          Checks out whether it is possible to combine ROIs
 void deleteAllROIs()
          Clears the current selection.
 void deleteSelectedRois()
           
 javax.swing.JToggleButton getAngleButton()
           
 java.lang.String getAngleTitle()
           
 javax.swing.JToggleButton getArrowButton()
           
 javax.swing.JButton getClearButton()
           
 java.lang.String getClearTitle()
           
 java.lang.String getClearUndoRedoTitle()
           
 java.awt.Rectangle getCurrentRoiBounds()
          Returns the current ROI bounds.
 java.lang.String getDeleteAllROIsMessage()
           
 java.lang.String getDeleteAllROIsTitle()
           
 javax.swing.JButton getDeleteButton()
           
 java.lang.String getDeleteTitle()
           
 java.lang.String getDeleteUndoRedoTitle()
           
 javax.swing.JToggleButton getEllipseButton()
           
 java.lang.String getEllipseTitle()
           
 javax.swing.JToggleButton getFreeHandButton()
           
 java.lang.String getFreeHandTitle()
           
 java.lang.String getIgnoreROIContinueMessage()
           
 java.lang.String getIgnoreROIMessage()
           
 java.lang.String getIgnoreROITitle()
           
 java.awt.image.BufferedImage getImage()
          Returns a handle to the image displayed
 javax.swing.JScrollPane getImagePane()
           
 AdvancedImagePlus getImagePlus()
           
 javax.swing.JComponent getImageRenderer()
           
 java.awt.Dimension getImageSize()
          Returns size of the image (does not include margin)
 javax.swing.JButton getInnerButton()
           
 java.lang.String getInnerTitle()
           
 javax.swing.JButton getIntersectionButton()
           
 java.lang.String getIntersectionTitle()
           
 java.lang.String getIntersectionUndoRedoTitle()
           
 javax.swing.JButton getInvalidateButton()
           
 java.lang.String getInvalidateTitle()
           
 javax.swing.JToggleButton getLineButton()
           
 java.lang.String getLineTitle()
           
 java.awt.Insets getMargin()
          Returns margin of the image
 javax.swing.JButton getMaskButton()
           
 java.lang.String getMaskTitle()
           
 java.lang.String getMaskUndoRedoTitle()
           
 java.awt.Dimension getMinimumSize()
           
 javax.swing.JButton getOuterButton()
           
 java.lang.String getOuterTitle()
           
 javax.swing.JToggleButton getPolygonButton()
           
 java.lang.String getPolygonTitle()
           
 java.awt.Dimension getPreferredSize()
           
 javax.swing.JToggleButton getRectangleButton()
           
 java.lang.String getRectangleTitle()
           
 java.lang.String getRedoTitle()
           
 javax.swing.JButton getResetButton()
           
 java.lang.String getResetTitle()
           
 java.lang.String getResetUndoRedoTitle()
           
 java.awt.Color getRoiColor()
           
 java.awt.Color getRoiInsideColor()
           
 java.awt.Color getRoiInsideSelectionColor()
           
 java.awt.Color getRoiOutsideColor()
           
 java.awt.Color getRoiOutsideSelectionColor()
           
 java.awt.Color getRoiSelectionColor()
           
 javax.swing.JToggleButton getSelectedButton()
           
 java.awt.Point[] getSelectionPoint()
          Returns the current line selected.
 java.lang.String getSelectionTitle()
           
 javax.swing.JButton getSubstractButton()
           
 java.lang.String getSubstractTitle()
           
 java.lang.String getSubstractUndoRedoTitle()
           
 ij.gui.Toolbar getToolbar()
           
 javax.swing.JPanel getToolbarPanel()
           
 java.lang.String getUndoTitle()
           
 javax.swing.JButton getUnionButton()
           
 java.lang.String getUnionTitle()
           
 java.lang.String getUnionUndoRedoTitle()
           
 javax.swing.JToggleButton getWandButton()
           
 java.lang.String getWandTitle()
           
 JLAxis getXAxis()
          Returns a handle of the X axis.
 javax.swing.JButton getXorButton()
           
 int getXOrigin()
          Return origin of the image within the component
 java.lang.String getXorTitle()
           
 java.lang.String getXorUndoRedoTitle()
           
 JLAxis getYAxis()
          Returns a handle of the Y axis.
 int getYOrigin()
          Return origin of the image within the component
 double getZoom()
           
 javax.swing.JToggleButton getZoomButton()
           
 java.lang.String getZoomTitle()
           
protected  void initCanvasRenderer()
           
protected  void initMessages()
           
protected  void initToolbar()
           
 void intersectROIs()
           
 void invalidateROI()
           
protected  void measureAxis()
           
protected  void paintAxis(java.awt.Graphics g)
           
 void redo()
           
 void refreshImage()
           
 void resetMask()
           
protected  void scrollTo(int x, int y)
           
 void setAngleTitle(java.lang.String angleTitle)
           
 void setClearTitle(java.lang.String clearTitle)
           
 void setClearUndoRedoTitle(java.lang.String clearUndoRedoTitle)
           
 void setDeleteAllROIsMessage(java.lang.String deleteAllROIsMessage)
           
 void setDeleteAllROIsTitle(java.lang.String deleteAllROIsTitle)
           
 void setDeleteTitle(java.lang.String deleteTitle)
           
 void setDeleteUndoRedoTitle(java.lang.String deleteUndoRedoTitle)
           
 void setEllipseTitle(java.lang.String ellipseTitle)
           
 void setFreeHandTitle(java.lang.String freeHandTitle)
           
 void setIgnoreROITitle(java.lang.String ignoreROITitle)
           
 void setIgnoreValidatedROIContinueMessage(java.lang.String ignoreValidatedROIContinueMessage)
           
 void setIgnoreValidatedROIMessage(java.lang.String ignoreValidatedROIMessage)
           
 void setIgnoreValidatedROITitle(java.lang.String ignoreValidatedROITitle)
           
 void setImage(java.awt.image.BufferedImage i)
          Stes the image to be displayed
 void setInnerTitle(java.lang.String innerTitle)
           
 void setIntersectionTitle(java.lang.String intersectionTitle)
           
 void setIntersectionUndoRedoTitle(java.lang.String intersectionUndoRedoTitle)
           
 void setInvalidateTitle(java.lang.String invalidateTitle)
           
 void setLineTitle(java.lang.String lineTitle)
           
 void setMargin(java.awt.Insets i)
          Sets the margin of the JImage
 void setMaskTitle(java.lang.String maskTitle)
           
 void setMaskUndoRedoTitle(java.lang.String maskUndoRedoTitle)
           
 void setOuterTitle(java.lang.String outerTitle)
           
 void setPolygonTitle(java.lang.String polygonTitle)
           
 void setRectangleTitle(java.lang.String rectangleTitle)
           
 void setRedoTitle(java.lang.String redoTitle)
           
 void setResetTitle(java.lang.String resetTitle)
           
 void setResetUndoRedoTitle(java.lang.String resetUndoRedoTitle)
           
 void setRoiColor(java.awt.Color selectionColor)
           
 void setRoiInsideColor(java.awt.Color roiInsideColor)
           
 void setRoiInsideSelectionColor(java.awt.Color roiInsideSelectionColor)
           
 void setRoiOutsideColor(java.awt.Color roiOutsideColor)
           
 void setRoiOutsideSelectionColor(java.awt.Color roiOutsideSelectionColor)
           
 void setRoiSelectionColor(java.awt.Color roiSelectionColor)
           
 void setSelectedRoisAsInner()
           
 void setSelectedRoisAsOuter()
           
 void setSelection(int _x1, int _y1, int _x2, int _y2)
          Sets the current selection.
 void setSelectionRoi(ij.gui.Roi selectionRoi)
           
 void setSelectionTitle(java.lang.String selectionTitle)
           
 void setSubstractTitle(java.lang.String substractTitle)
           
 void setSubstractUndoRedoTitle(java.lang.String substractUndoRedoTitle)
           
 void setUndoTitle(java.lang.String undoTitle)
           
 void setUnionTitle(java.lang.String unionTitle)
           
 void setUnionUndoRedoTitle(java.lang.String unionUndoRedoTitle)
           
 void setWandTitle(java.lang.String wandTitle)
           
 void setXorTitle(java.lang.String xorTitle)
           
 void setXorUndoRedoTitle(java.lang.String xorUndoRedoTitle)
           
 void setZoom(double zoom)
           
 void setZoomRoi(ij.gui.Roi zoomRoi)
           
 void setZoomTitle(java.lang.String zoomTitle)
           
 void substractROIs()
           
 int transformX(int x)
           
 int transformY(int y)
           
 void undo()
           
 void unifyROIs()
           
protected  void updateUndoRedoButtons()
           
 void xorROIs()
           
 void zoomIn()
           
 void zoomOut()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, hide, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

theImage

protected java.awt.image.BufferedImage theImage

margin

protected java.awt.Insets margin

xOrg

protected int xOrg

yOrg

protected int yOrg

snapToGrid

protected boolean snapToGrid

grid

protected int grid

xAxis

protected JLAxis xAxis

xAxisHeight

protected int xAxisHeight

xAxisUpMargin

protected int xAxisUpMargin

yAxis

protected JLAxis yAxis

yAxisWidth

protected int yAxisWidth

yAxisRightMargin

protected int yAxisRightMargin

crossCursor

protected boolean crossCursor

cursorColor

protected java.awt.Color cursorColor

xCursor

protected int xCursor

yCursor

protected int yCursor

roiColor

protected java.awt.Color roiColor

roiSelectionColor

protected java.awt.Color roiSelectionColor

roiInsideColor

protected java.awt.Color roiInsideColor

roiInsideSelectionColor

protected java.awt.Color roiInsideSelectionColor

roiOutsideColor

protected java.awt.Color roiOutsideColor

roiOutsideSelectionColor

protected java.awt.Color roiOutsideSelectionColor

imp

protected AdvancedImagePlus imp

canvas

protected JImageJ.RenderedImageCanvas canvas

hiddenIJ

protected ij.ImageJ hiddenIJ

canvasRenderer

protected JImageJ.CanvasRenderer canvasRenderer

imagePane

protected javax.swing.JScrollPane imagePane

toolbarPanel

protected javax.swing.JPanel toolbarPanel

buttonGroup

protected javax.swing.ButtonGroup buttonGroup

rectangleButton

protected javax.swing.JToggleButton rectangleButton

ellipseButton

protected javax.swing.JToggleButton ellipseButton

freeHandButton

protected javax.swing.JToggleButton freeHandButton

polygonButton

protected javax.swing.JToggleButton polygonButton

lineButton

protected javax.swing.JToggleButton lineButton

angleButton

protected javax.swing.JToggleButton angleButton

wandButton

protected javax.swing.JToggleButton wandButton

zoomButton

protected javax.swing.JToggleButton zoomButton

handButton

protected javax.swing.JToggleButton handButton

arrowButton

protected javax.swing.JToggleButton arrowButton

clearButton

protected javax.swing.JButton clearButton

deleteButton

protected javax.swing.JButton deleteButton

selectedButton

protected javax.swing.JToggleButton selectedButton

innerButton

protected javax.swing.JButton innerButton

outerButton

protected javax.swing.JButton outerButton

maskButton

protected javax.swing.JButton maskButton

invalidateButton

protected javax.swing.JButton invalidateButton

resetButton

protected javax.swing.JButton resetButton

intersectionButton

protected javax.swing.JButton intersectionButton

unionButton

protected javax.swing.JButton unionButton

substractButton

protected javax.swing.JButton substractButton

xorButton

protected javax.swing.JButton xorButton

undoButton

protected javax.swing.JButton undoButton

redoButton

protected javax.swing.JButton redoButton

rectangleTitle

protected java.lang.String rectangleTitle

ellipseTitle

protected java.lang.String ellipseTitle

freeHandTitle

protected java.lang.String freeHandTitle

polygonTitle

protected java.lang.String polygonTitle

lineTitle

protected java.lang.String lineTitle

angleTitle

protected java.lang.String angleTitle

wandTitle

protected java.lang.String wandTitle

zoomTitle

protected java.lang.String zoomTitle

handTitle

protected java.lang.String handTitle

selectionTitle

protected java.lang.String selectionTitle

deleteTitle

protected java.lang.String deleteTitle

deleteUndoRedoTitle

protected java.lang.String deleteUndoRedoTitle

clearTitle

protected java.lang.String clearTitle

clearUndoRedoTitle

protected java.lang.String clearUndoRedoTitle

innerTitle

protected java.lang.String innerTitle

outerTitle

protected java.lang.String outerTitle

maskTitle

protected java.lang.String maskTitle

maskUndoRedoTitle

protected java.lang.String maskUndoRedoTitle

invalidateTitle

protected java.lang.String invalidateTitle

resetTitle

protected java.lang.String resetTitle

resetUndoRedoTitle

protected java.lang.String resetUndoRedoTitle

intersectionTitle

protected java.lang.String intersectionTitle

intersectionUndoRedoTitle

protected java.lang.String intersectionUndoRedoTitle

unionTitle

protected java.lang.String unionTitle

unionUndoRedoTitle

protected java.lang.String unionUndoRedoTitle

substractTitle

protected java.lang.String substractTitle

substractUndoRedoTitle

protected java.lang.String substractUndoRedoTitle

xorTitle

protected java.lang.String xorTitle

xorUndoRedoTitle

protected java.lang.String xorUndoRedoTitle

undoTitle

protected java.lang.String undoTitle

redoTitle

protected java.lang.String redoTitle

undoManager

protected javax.swing.undo.UndoManager undoManager

undoLimit

protected static final int undoLimit
See Also:
Constant Field Values

ignoreROITitle

protected java.lang.String ignoreROITitle

ignoreROIMessage

protected java.lang.String ignoreROIMessage

ignoreROIContinueMessage

protected java.lang.String ignoreROIContinueMessage

deleteAllROIsTitle

protected java.lang.String deleteAllROIsTitle

deleteAllROIsMessage

protected java.lang.String deleteAllROIsMessage

NO_MARGIN

protected static final java.awt.Insets NO_MARGIN
Constructor Detail

JImageJ

public JImageJ()
Method Detail

initCanvasRenderer

protected void initCanvasRenderer()

initToolbar

protected void initToolbar()

updateUndoRedoButtons

protected void updateUndoRedoButtons()

initMessages

protected void initMessages()

setMargin

public void setMargin(java.awt.Insets i)
Sets the margin of the JImage

Parameters:
i - Image margin

getMargin

public java.awt.Insets getMargin()
Returns margin of the image

Returns:
Image margin

getImagePlus

public AdvancedImagePlus getImagePlus()

measureAxis

protected void measureAxis()

paintAxis

protected void paintAxis(java.awt.Graphics g)

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class javax.swing.JComponent

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class javax.swing.JComponent

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getToolbar

public ij.gui.Toolbar getToolbar()

setImage

public void setImage(java.awt.image.BufferedImage i)
Stes the image to be displayed

Parameters:
i - Image

refreshImage

public void refreshImage()

setZoom

public void setZoom(double zoom)

setZoomRoi

public void setZoomRoi(ij.gui.Roi zoomRoi)

setSelectionRoi

public void setSelectionRoi(ij.gui.Roi selectionRoi)

getZoom

public double getZoom()

getXAxis

public JLAxis getXAxis()
Returns a handle of the X axis.


getYAxis

public JLAxis getYAxis()
Returns a handle of the Y axis.


getImage

public java.awt.image.BufferedImage getImage()
Returns a handle to the image displayed

Returns:
Image handle

getImageSize

public java.awt.Dimension getImageSize()
Returns size of the image (does not include margin)

Returns:
Image size

getXOrigin

public int getXOrigin()
Return origin of the image within the component

Returns:
X origin in pixel

getYOrigin

public int getYOrigin()
Return origin of the image within the component

Returns:
Y origin in pixel

getSelectionPoint

public java.awt.Point[] getSelectionPoint()
Returns the current line selected.

Returns:
null when no selection or a 2 points array

getCurrentRoiBounds

public java.awt.Rectangle getCurrentRoiBounds()
Returns the current ROI bounds.

Returns:
null when no ROI or its bounds

deleteAllROIs

public void deleteAllROIs()
Clears the current selection.


deleteSelectedRois

public void deleteSelectedRois()

setSelectedRoisAsInner

public void setSelectedRoisAsInner()

setSelectedRoisAsOuter

public void setSelectedRoisAsOuter()

applyMask

public void applyMask()

resetMask

public void resetMask()

invalidateROI

public void invalidateROI()

setSelection

public void setSelection(int _x1,
                         int _y1,
                         int _x2,
                         int _y2)
Sets the current selection.

Parameters:
_x1 - Top left corner x coordinate
_y1 - Top left corner y coordinate
_x2 - Bottom right corner x coordinate
_y2 - Bottom right corner y coordinate

transformX

public int transformX(int x)

transformY

public int transformY(int y)

canCombineROIs

protected boolean canCombineROIs()
Checks out whether it is possible to combine ROIs

Returns:
true if it is possible, false otherwise.

intersectROIs

public void intersectROIs()

unifyROIs

public void unifyROIs()

substractROIs

public void substractROIs()

xorROIs

public void xorROIs()

undo

public void undo()

redo

public void redo()

getRoiColor

public java.awt.Color getRoiColor()

setRoiColor

public void setRoiColor(java.awt.Color selectionColor)

getRoiSelectionColor

public java.awt.Color getRoiSelectionColor()
Returns:
the roiSelectionColor

setRoiSelectionColor

public void setRoiSelectionColor(java.awt.Color roiSelectionColor)
Parameters:
roiSelectionColor - the roiSelectionColor to set

getRoiInsideColor

public java.awt.Color getRoiInsideColor()
Returns:
the roiInsideColor

setRoiInsideColor

public void setRoiInsideColor(java.awt.Color roiInsideColor)
Parameters:
roiInsideColor - the roiInsideColor to set

getRoiInsideSelectionColor

public java.awt.Color getRoiInsideSelectionColor()
Returns:
the roiInsideSelectionColor

setRoiInsideSelectionColor

public void setRoiInsideSelectionColor(java.awt.Color roiInsideSelectionColor)
Parameters:
roiInsideSelectionColor - the roiInsideSelectionColor to set

getRoiOutsideColor

public java.awt.Color getRoiOutsideColor()
Returns:
the roiOutsideColor

setRoiOutsideColor

public void setRoiOutsideColor(java.awt.Color roiOutsideColor)
Parameters:
roiOutsideColor - the roiOutsideColor to set

getRoiOutsideSelectionColor

public java.awt.Color getRoiOutsideSelectionColor()
Returns:
the roiOutsideSelectionColor

setRoiOutsideSelectionColor

public void setRoiOutsideSelectionColor(java.awt.Color roiOutsideSelectionColor)
Parameters:
roiOutsideSelectionColor - the roiOutsideSelectionColor to set

getImageRenderer

public javax.swing.JComponent getImageRenderer()
Returns:
the image renderer

getImagePane

public javax.swing.JScrollPane getImagePane()
Returns:
the imagePane

getIgnoreROITitle

public java.lang.String getIgnoreROITitle()
Returns:
the ignoreValidatedROITitle

setIgnoreROITitle

public void setIgnoreROITitle(java.lang.String ignoreROITitle)
Parameters:
ignoreROITitle - the ignoreROITitle to set

setIgnoreValidatedROITitle

public void setIgnoreValidatedROITitle(java.lang.String ignoreValidatedROITitle)
Parameters:
ignoreValidatedROITitle - the ignoreValidatedROITitle to set

getIgnoreROIMessage

public java.lang.String getIgnoreROIMessage()
Returns:
the ignoreValidatedROIMessage

setIgnoreValidatedROIMessage

public void setIgnoreValidatedROIMessage(java.lang.String ignoreValidatedROIMessage)
Parameters:
ignoreValidatedROIMessage - the ignoreValidatedROIMessage to set

getIgnoreROIContinueMessage

public java.lang.String getIgnoreROIContinueMessage()
Returns:
the ignoreValidatedROIContinueMessage

setIgnoreValidatedROIContinueMessage

public void setIgnoreValidatedROIContinueMessage(java.lang.String ignoreValidatedROIContinueMessage)
Parameters:
ignoreValidatedROIContinueMessage - the ignoreValidatedROIContinueMessage to set

getDeleteAllROIsTitle

public java.lang.String getDeleteAllROIsTitle()
Returns:
the deleteAllROIsTitle

setDeleteAllROIsTitle

public void setDeleteAllROIsTitle(java.lang.String deleteAllROIsTitle)
Parameters:
deleteAllROIsTitle - the deleteAllROIsTitle to set

getDeleteAllROIsMessage

public java.lang.String getDeleteAllROIsMessage()
Returns:
the deleteAllROIsMessage

setDeleteAllROIsMessage

public void setDeleteAllROIsMessage(java.lang.String deleteAllROIsMessage)
Parameters:
deleteAllROIsMessage - the deleteAllROIsMessage to set

getToolbarPanel

public javax.swing.JPanel getToolbarPanel()
Returns:
the toolbarPanel

getRectangleButton

public javax.swing.JToggleButton getRectangleButton()
Returns:
the rectangleButton

getEllipseButton

public javax.swing.JToggleButton getEllipseButton()
Returns:
the ellipseButton

getFreeHandButton

public javax.swing.JToggleButton getFreeHandButton()
Returns:
the freeHandButton

getPolygonButton

public javax.swing.JToggleButton getPolygonButton()
Returns:
the polygonButton

getLineButton

public javax.swing.JToggleButton getLineButton()
Returns:
the lineButton

getAngleButton

public javax.swing.JToggleButton getAngleButton()
Returns:
the angleButton

getWandButton

public javax.swing.JToggleButton getWandButton()
Returns:
the wandButton

getZoomButton

public javax.swing.JToggleButton getZoomButton()
Returns:
the zoomButton

getArrowButton

public javax.swing.JToggleButton getArrowButton()
Returns:
the arrowButton

getClearButton

public javax.swing.JButton getClearButton()
Returns:
the clearButton

getDeleteButton

public javax.swing.JButton getDeleteButton()
Returns:
the deleteButton

getSelectedButton

public javax.swing.JToggleButton getSelectedButton()
Returns:
the selectedButton

getInnerButton

public javax.swing.JButton getInnerButton()
Returns:
the innerButton

getOuterButton

public javax.swing.JButton getOuterButton()
Returns:
the outerButton

getMaskButton

public javax.swing.JButton getMaskButton()
Returns:
the maskButton

getInvalidateButton

public javax.swing.JButton getInvalidateButton()
Returns:
the invalidateButton

getResetButton

public javax.swing.JButton getResetButton()
Returns:
the resetButton

getIntersectionButton

public javax.swing.JButton getIntersectionButton()
Returns:
the intersectionButton

getUnionButton

public javax.swing.JButton getUnionButton()
Returns:
the unionButton

getSubstractButton

public javax.swing.JButton getSubstractButton()
Returns:
the substractButton

getXorButton

public javax.swing.JButton getXorButton()
Returns:
the xorButton

getRectangleTitle

public java.lang.String getRectangleTitle()
Returns:
the rectangleTitle

setRectangleTitle

public void setRectangleTitle(java.lang.String rectangleTitle)
Parameters:
rectangleTitle - the rectangleTitle to set

getEllipseTitle

public java.lang.String getEllipseTitle()
Returns:
the ellipseTitle

setEllipseTitle

public void setEllipseTitle(java.lang.String ellipseTitle)
Parameters:
ellipseTitle - the ellipseTitle to set

getFreeHandTitle

public java.lang.String getFreeHandTitle()
Returns:
the freeHandTitle

setFreeHandTitle

public void setFreeHandTitle(java.lang.String freeHandTitle)
Parameters:
freeHandTitle - the freeHandTitle to set

getPolygonTitle

public java.lang.String getPolygonTitle()
Returns:
the polygonTitle

setPolygonTitle

public void setPolygonTitle(java.lang.String polygonTitle)
Parameters:
polygonTitle - the polygonTitle to set

getLineTitle

public java.lang.String getLineTitle()
Returns:
the lineTitle

setLineTitle

public void setLineTitle(java.lang.String lineTitle)
Parameters:
lineTitle - the lineTitle to set

getAngleTitle

public java.lang.String getAngleTitle()
Returns:
the angleTitle

setAngleTitle

public void setAngleTitle(java.lang.String angleTitle)
Parameters:
angleTitle - the angleTitle to set

getWandTitle

public java.lang.String getWandTitle()
Returns:
the wandTitle

setWandTitle

public void setWandTitle(java.lang.String wandTitle)
Parameters:
wandTitle - the wandTitle to set

getZoomTitle

public java.lang.String getZoomTitle()
Returns:
the zoomTitle

setZoomTitle

public void setZoomTitle(java.lang.String zoomTitle)
Parameters:
zoomTitle - the zoomTitle to set

getSelectionTitle

public java.lang.String getSelectionTitle()
Returns:
the selectionTitle

setSelectionTitle

public void setSelectionTitle(java.lang.String selectionTitle)
Parameters:
selectionTitle - the selectionTitle to set

getDeleteTitle

public java.lang.String getDeleteTitle()
Returns:
the deleteTitle

setDeleteTitle

public void setDeleteTitle(java.lang.String deleteTitle)
Parameters:
deleteTitle - the deleteTitle to set

getDeleteUndoRedoTitle

public java.lang.String getDeleteUndoRedoTitle()
Returns:
the deleteUndoRedoTitle

setDeleteUndoRedoTitle

public void setDeleteUndoRedoTitle(java.lang.String deleteUndoRedoTitle)
Parameters:
deleteUndoRedoTitle - the deleteUndoRedoTitle to set

getClearTitle

public java.lang.String getClearTitle()
Returns:
the clearTitle

setClearTitle

public void setClearTitle(java.lang.String clearTitle)
Parameters:
clearTitle - the clearTitle to set

getClearUndoRedoTitle

public java.lang.String getClearUndoRedoTitle()
Returns:
the clearUndoRedoTitle

setClearUndoRedoTitle

public void setClearUndoRedoTitle(java.lang.String clearUndoRedoTitle)
Parameters:
clearUndoRedoTitle - the clearUndoRedoTitle to set

getInnerTitle

public java.lang.String getInnerTitle()
Returns:
the innerTitle

setInnerTitle

public void setInnerTitle(java.lang.String innerTitle)
Parameters:
innerTitle - the innerTitle to set

getOuterTitle

public java.lang.String getOuterTitle()
Returns:
the outerTitle

setOuterTitle

public void setOuterTitle(java.lang.String outerTitle)
Parameters:
outerTitle - the outerTitle to set

getMaskTitle

public java.lang.String getMaskTitle()
Returns:
the maskTitle

setMaskTitle

public void setMaskTitle(java.lang.String maskTitle)
Parameters:
maskTitle - the maskTitle to set

getMaskUndoRedoTitle

public java.lang.String getMaskUndoRedoTitle()
Returns:
the maskUndoRedoTitle

setMaskUndoRedoTitle

public void setMaskUndoRedoTitle(java.lang.String maskUndoRedoTitle)
Parameters:
maskUndoRedoTitle - the maskUndoRedoTitle to set

getInvalidateTitle

public java.lang.String getInvalidateTitle()
Returns:
the invalidateTitle

setInvalidateTitle

public void setInvalidateTitle(java.lang.String invalidateTitle)
Parameters:
invalidateTitle - the invalidateTitle to set

getResetTitle

public java.lang.String getResetTitle()
Returns:
the resetTitle

setResetTitle

public void setResetTitle(java.lang.String resetTitle)
Parameters:
resetTitle - the resetTitle to set

getResetUndoRedoTitle

public java.lang.String getResetUndoRedoTitle()
Returns:
the resetUndoRedoTitle

setResetUndoRedoTitle

public void setResetUndoRedoTitle(java.lang.String resetUndoRedoTitle)
Parameters:
resetUndoRedoTitle - the resetUndoRedoTitle to set

getIntersectionTitle

public java.lang.String getIntersectionTitle()
Returns:
the intersectionTitle

setIntersectionTitle

public void setIntersectionTitle(java.lang.String intersectionTitle)
Parameters:
intersectionTitle - the intersectionTitle to set

getIntersectionUndoRedoTitle

public java.lang.String getIntersectionUndoRedoTitle()
Returns:
the intersectionUndoRedoTitle

setIntersectionUndoRedoTitle

public void setIntersectionUndoRedoTitle(java.lang.String intersectionUndoRedoTitle)
Parameters:
intersectionUndoRedoTitle - the intersectionUndoRedoTitle to set

getUnionTitle

public java.lang.String getUnionTitle()
Returns:
the unionTitle

setUnionTitle

public void setUnionTitle(java.lang.String unionTitle)
Parameters:
unionTitle - the unionTitle to set

getUnionUndoRedoTitle

public java.lang.String getUnionUndoRedoTitle()
Returns:
the unionUndoRedoTitle

setUnionUndoRedoTitle

public void setUnionUndoRedoTitle(java.lang.String unionUndoRedoTitle)
Parameters:
unionUndoRedoTitle - the unionUndoRedoTitle to set

getSubstractTitle

public java.lang.String getSubstractTitle()
Returns:
the substractTitle

setSubstractTitle

public void setSubstractTitle(java.lang.String substractTitle)
Parameters:
substractTitle - the substractTitle to set

getSubstractUndoRedoTitle

public java.lang.String getSubstractUndoRedoTitle()
Returns:
the substractUndoRedoTitle

setSubstractUndoRedoTitle

public void setSubstractUndoRedoTitle(java.lang.String substractUndoRedoTitle)
Parameters:
substractUndoRedoTitle - the substractUndoRedoTitle to set

getXorTitle

public java.lang.String getXorTitle()
Returns:
the xorTitle

setXorTitle

public void setXorTitle(java.lang.String xorTitle)
Parameters:
xorTitle - the xorTitle to set

getXorUndoRedoTitle

public java.lang.String getXorUndoRedoTitle()
Returns:
the xorUndoRedoTitle

setXorUndoRedoTitle

public void setXorUndoRedoTitle(java.lang.String xorUndoRedoTitle)
Parameters:
xorUndoRedoTitle - the xorUndoRedoTitle to set

getUndoTitle

public java.lang.String getUndoTitle()
Returns:
the undoTitle

setUndoTitle

public void setUndoTitle(java.lang.String undoTitle)
Parameters:
undoTitle - the undoTitle to set

getRedoTitle

public java.lang.String getRedoTitle()
Returns:
the redoTitle

setRedoTitle

public void setRedoTitle(java.lang.String redoTitle)
Parameters:
redoTitle - the redoTitle to set

scrollTo

protected void scrollTo(int x,
                        int y)

zoomIn

public void zoomIn()

zoomOut

public void zoomOut()