|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JInternalFrame
br.usp.ime.klava.segmentit.gui.SegmentationDocument
public class SegmentationDocument
Stores an image to be segmented. Represents a document that can be edited in
the SegmentationContainer
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JInternalFrame |
---|
javax.swing.JInternalFrame.JDesktopIcon |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary |
---|
Fields inherited from class javax.swing.JInternalFrame |
---|
CONTENT_PANE_PROPERTY, FRAME_ICON_PROPERTY, GLASS_PANE_PROPERTY, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, LAYERED_PANE_PROPERTY, MENU_BAR_PROPERTY, ROOT_PANE_PROPERTY, TITLE_PROPERTY |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, 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 javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SegmentationDocument(java.awt.image.BufferedImage image,
java.lang.String documentName,
Filter filter,
boolean hideFilteredImage)
Constructor for the SegmentationDocument . |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Turns on/off the visibility of the layers and enables/disables the sliders: Basins opacity; Filtered image contrast. |
void |
cleanMarkers()
Cleans the existing markers. |
java.awt.Color |
getBackgroundColor()
Returns the background color. |
java.awt.image.BufferedImage |
getBasinsImage()
Returns the segmentation result (catchment basins). |
java.awt.Color |
getBrushesColor()
Returns the color of the brushes. |
ColorSpace |
getColorSpace()
Returns the ColosSpace used to paint the basins. |
Connectivity |
getConnectivity()
Returns the Connectivity being used. |
java.lang.String |
getDocumentName()
Returns the document name. |
Filter |
getFilter()
Returns the Filter being used. |
Granularity |
getGranularity()
Returns the Granularity being used. |
java.awt.image.BufferedImage |
getInputImage()
Returns the input image. |
javax.swing.JPanel |
getLayers()
Returns the layers panel. |
java.awt.image.BufferedImage |
getMarkersImage()
Returns the markers image. |
java.awt.image.BufferedImage |
getSegmentedImage()
Returns the segmentation result superimposing the visible layers. |
java.awt.Color |
getWatershedColor()
Returns the color of the watershed lines. |
boolean |
isColorImage()
Returns if the input image is a color image. |
boolean |
isRedoAvailable()
Returns if it is possible to redo an action. |
boolean |
isUndoAvailable()
Returns if it is possible to undo an action. |
void |
loadPartition(java.awt.image.BufferedImage desiredPartition)
Loads desiredPartition as the selected partition by unifying the
labels within each PrimitiveCatchmentBasin in it and then
creating markers that recovers the resultant partition. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Does nothing. |
void |
mouseDragged(java.awt.event.MouseEvent event)
Executes some actions depending on the selected tool and the mouse button utilized. |
void |
mouseEntered(java.awt.event.MouseEvent evento)
Selects this SegmentationDocument if it is the active
document (to get the focus previously hold by the toolbox or the layers
panel). |
void |
mouseExited(java.awt.event.MouseEvent e)
Does nothing. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Does nothing. |
void |
mousePressed(java.awt.event.MouseEvent event)
Executes some actions depending on the selected tool and the mouse button utilized. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Executes some actions depending on the selected tool and the mouse button utilized. |
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Performs a zoom-in or a zoom-out depending on the wheel rotation. |
void |
redo()
Redoes an action, if possible. |
void |
segment()
Executes the watershed from markers algorithm, storing the previous state in the history. |
void |
segment(boolean storeState)
Executes the watershed from markers algorithm. |
void |
setBackgroundColor(java.awt.Color color)
Sets the background color to be used. |
void |
setBrushesColor(java.awt.Color color)
Sets the color of the brushes. |
void |
setBrushesDiameter(int diameter)
Sets the diameter of the brushes. |
void |
setColorSpace(ColorSpace colorSpace)
Sets the ColorSpace to be used to paint the basins. |
void |
setConnectivity(Connectivity connectivity)
Sets the Connectivity to be used. |
void |
setFilter(Filter filter)
Sets the Filter to be used. |
void |
setFilteredImage(java.awt.image.BufferedImage image,
Filter filter)
Sets the Filter to be used and an image obtained with it. |
void |
setGranularity(Granularity granularity)
Sets the Granularity to be used. |
void |
setMarkersImage(java.awt.image.BufferedImage image)
Sets an image to be used as markers. |
static void |
setSegmentViaHierarchyBuilder(SegmentViaHierarchyBuilderIF segmentViaHierarchyBuilder)
Sets a SegmentViaHierarchyBuilderIF to build
SegmentViaHierarchy in this SegmentationDocument |
void |
setTool(Tool tool)
Sets the tool being used. |
void |
setWatershedColor(java.awt.Color color)
Sets the color of the watershed lines. |
void |
setZoomLevel(double zoomLevel)
Sets the zoom to the given zoomLevel . |
void |
stateChanged(javax.swing.event.ChangeEvent e)
Changes the basins opacity or the filtered image contrast if the corresponding slider is moved. |
void |
undo()
Undoes an action, if possible. |
void |
zoomReset()
Sets the zoom to 100%. |
Methods inherited from class javax.swing.JInternalFrame |
---|
addInternalFrameListener, dispose, doDefaultCloseAction, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLastCursor, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isSelected, moveToBack, moveToFront, pack, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setCursor, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setSelected, setTitle, setUI, show, toBack, toFront, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
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, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, 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, 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 |
Methods inherited from class java.awt.Container |
---|
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, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
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, 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, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SegmentationDocument(java.awt.image.BufferedImage image, java.lang.String documentName, Filter filter, boolean hideFilteredImage)
SegmentationDocument
.
image
- the image to be segmenteddocumentName
- the name of the documentfilter
- the Filter
to be usedhideFilteredImage
- if the filtered image must start hiddenMethod Detail |
---|
public java.lang.String getDocumentName()
public boolean isColorImage()
true
if the input image is a color imagepublic Filter getFilter()
Filter
being used.
Filter
being usedpublic void setFilter(Filter filter)
Filter
to be used.
filter
- the Filter
to be usedpublic void setFilteredImage(java.awt.image.BufferedImage image, Filter filter)
Filter
to be used and an image obtained with it.
image
- an image obtained by the Filter
filter
- the Filter
used to obtain the given
image
public Connectivity getConnectivity()
Connectivity
being used.
Connectivity
being usedpublic void setConnectivity(Connectivity connectivity)
Connectivity
to be used.
connectivity
- the Connectivity
to be usedpublic Granularity getGranularity()
Granularity
being used.
Granularity
being usedpublic void setGranularity(Granularity granularity)
Granularity
to be used.
granularity
- the Granularity
to be usedpublic java.awt.image.BufferedImage getInputImage()
public void setMarkersImage(java.awt.image.BufferedImage image)
image
- an image to be used as markerspublic java.awt.image.BufferedImage getMarkersImage()
public void cleanMarkers()
public void setBrushesDiameter(int diameter)
diameter
- the diameter (in pixels) of the brushespublic void setTool(Tool tool)
tool
- the tool being usedpublic javax.swing.JPanel getLayers()
public java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color color)
color
- the background color to be usedpublic java.awt.Color getBrushesColor()
public void setBrushesColor(java.awt.Color color)
color
- the color of the brushespublic java.awt.Color getWatershedColor()
public void setWatershedColor(java.awt.Color color)
color
- the color of the watershed linespublic ColorSpace getColorSpace()
ColosSpace
used to paint the basins.
ColosSpace
used to paint the basinspublic void setColorSpace(ColorSpace colorSpace)
ColorSpace
to be used to paint the basins.
colorSpace
- the ColorSpace
to be used to paint the basinspublic void segment()
public void segment(boolean storeState)
storeState
- true
if the previous state must be stored in the
historypublic void setZoomLevel(double zoomLevel)
zoomLevel
.
zoomLevel
- a scale to be used as zoompublic void zoomReset()
public java.awt.image.BufferedImage getSegmentedImage()
public java.awt.image.BufferedImage getBasinsImage()
public boolean isUndoAvailable()
true
if it is possible to undo an actionpublic void undo()
public boolean isRedoAvailable()
true
if it is possible to redo an actionpublic void redo()
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
public void mousePressed(java.awt.event.MouseEvent event)
mousePressed
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent evento)
SegmentationDocument
if it is the active
document (to get the focus previously hold by the toolbox or the layers
panel).
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
public void loadPartition(java.awt.image.BufferedImage desiredPartition)
desiredPartition
as the selected partition by unifying the
labels within each PrimitiveCatchmentBasin
in it and then
creating markers that recovers the resultant partition.
desiredPartition
- a desired partitionpublic static void setSegmentViaHierarchyBuilder(SegmentViaHierarchyBuilderIF segmentViaHierarchyBuilder)
SegmentViaHierarchyBuilderIF
to build
SegmentViaHierarchy
in this SegmentationDocument
segmentViaHierarchyBuilder
- an implementation of SegmentViaHierarchyBuilderIF
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |