|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
br.usp.ime.klava.segmentit.gui.SegmentationContainer
public class SegmentationContainer
The main class of the tool GUI.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.BaselineResizeBehavior |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JFrame |
|---|
EXIT_ON_CLOSE |
| Fields inherited from class java.awt.Frame |
|---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| 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, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Executes some actions fired by buttons or menus: Segment; change brush color; filtering. |
void |
arrangeWorkspace()
Puts the toolbox in the upper-left corner, the layer panel in the upper-right corner and arranges the open SegmentationDocuments in cascade. |
SegmentationDocument |
createSegmentationDocument(java.awt.image.BufferedImage image,
java.lang.String name)
Creates a SegmentationDocument that displays the image to be
segmented. |
void |
error(java.lang.Exception exception)
Display a dialog with the error message given by exception.getLocalizedMessage(). |
void |
error(java.lang.String message)
Display a dialog with the error message message. |
SegmentationDocument |
getActiveDocument()
Returns the active SegmentationDocument. |
Connectivity |
getConnectivity()
Returns the Connectivity being used. |
Granularity |
getGranularity()
Returns the Granularity being used. |
static SegmentationContainer |
getInstance()
Returns the unique instance of SegmentationContainer. |
void |
internalFrameActivated(javax.swing.event.InternalFrameEvent event)
Adds the SegmentationDocument being activated to the top of
the opened documents, adds its layers to the layers panel, sets some
states of the tools and enables/disables some actions if necessary. |
void |
internalFrameClosed(javax.swing.event.InternalFrameEvent e)
Does nothing. |
void |
internalFrameClosing(javax.swing.event.InternalFrameEvent e)
Removes the SegmentationDocument to be closed and its layers
from the layers panel, enabling/disabling some actions if necessary. |
void |
internalFrameDeactivated(javax.swing.event.InternalFrameEvent e)
Does nothing. |
void |
internalFrameDeiconified(javax.swing.event.InternalFrameEvent e)
Does nothing. |
void |
internalFrameIconified(javax.swing.event.InternalFrameEvent e)
Does nothing. |
void |
internalFrameOpened(javax.swing.event.InternalFrameEvent e)
Does nothing. |
boolean |
isSegmentAutomatically()
Returns if the segment automatically option is selected. |
static void |
main(java.lang.String[] args)
Main method that starts the tool GUI. |
void |
menuCanceled(javax.swing.event.MenuEvent e)
Does nothing. |
void |
menuDeselected(javax.swing.event.MenuEvent e)
Does nothing. |
void |
menuSelected(javax.swing.event.MenuEvent e)
Enables/disables the appropriated filters based if the active SegmentationDocument contains a color or a gray level image. |
void |
mouseClicked(java.awt.event.MouseEvent event)
Executes some actions fired by multiples mouse clicks on tools: Erase all markers; reset zoom. |
void |
mouseEntered(java.awt.event.MouseEvent event)
Activates the JInternalFrame of the layers panel or the
toolbox if the mouse enters one of them. |
void |
mouseExited(java.awt.event.MouseEvent evento)
Does nothing. |
void |
mousePressed(java.awt.event.MouseEvent e)
Does nothing. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Does nothing. |
void |
setBrushColor(java.awt.Color color)
Sets the color of the brushes. |
void |
setColorSpace(ColorSpace colorSpace)
Sets the colorSpace to paint the regions of the partition of
the active SegmentationDocument. |
void |
setConnectivity(Connectivity connectivity)
Sets the Connectivity. |
void |
setFilteredImage(java.awt.image.BufferedImage image,
Filter filter)
Sets the image, obtained by the filter, as the
filtered image of the active SegmentationDocument. |
void |
setGranularity(Granularity granularity)
Sets the Granularity. |
void |
setMarkersImage(java.awt.image.BufferedImage image)
Sets image as the markers image of the active
SegmentationDocument. |
void |
setSelectedTool(Tool tool)
Sets the selected Tool. |
void |
stateChanged(javax.swing.event.ChangeEvent event)
Changes the diameter of the brush when the corresponding slider is used. |
void |
updateUndoRedoState()
Enables or disables the Undo and Redo actions
depending on the existence and the state of the active document. |
| Methods inherited from class javax.swing.JFrame |
|---|
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.awt.Window |
|---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Method Detail |
|---|
public static SegmentationContainer getInstance()
SegmentationContainer.
SegmentationContainerpublic static void main(java.lang.String[] args)
args - path to files to be opened as SegmentationDocumentspublic SegmentationDocument getActiveDocument()
SegmentationDocument.
SegmentationDocument, null
if there is no SegmentationDocument openedpublic void arrangeWorkspace()
SegmentationDocuments in cascade.
public Connectivity getConnectivity()
Connectivity being used.
Connectivity being usedpublic void setConnectivity(Connectivity connectivity)
Connectivity.
connectivity - Connectivity to be usedpublic Granularity getGranularity()
Granularity being used.
Granularity being usedpublic void setGranularity(Granularity granularity)
Granularity.
granularity - Granularity to be usedpublic void setSelectedTool(Tool tool)
ToolContainerTool.
setSelectedTool in interface ToolContainertool - the Tool to be usedpublic boolean isSegmentAutomatically()
true if the segment automatically option is selectedpublic void setBrushColor(java.awt.Color color)
color - the Color to be set to the brushes
public SegmentationDocument createSegmentationDocument(java.awt.image.BufferedImage image,
java.lang.String name)
SegmentationDocument that displays the image to be
segmented.
image - the image to be segmentedname - the name of the SegmentationDocument
SegmentationDocument createdpublic void updateUndoRedoState()
Undo and Redo actions
depending on the existence and the state of the active document.
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed in interface java.awt.event.ActionListenerpublic void stateChanged(javax.swing.event.ChangeEvent event)
stateChanged in interface javax.swing.event.ChangeListenerpublic void internalFrameClosing(javax.swing.event.InternalFrameEvent e)
SegmentationDocument to be closed and its layers
from the layers panel, enabling/disabling some actions if necessary.
internalFrameClosing in interface javax.swing.event.InternalFrameListenerpublic void internalFrameClosed(javax.swing.event.InternalFrameEvent e)
internalFrameClosed in interface javax.swing.event.InternalFrameListenerpublic void internalFrameOpened(javax.swing.event.InternalFrameEvent e)
internalFrameOpened in interface javax.swing.event.InternalFrameListenerpublic void internalFrameIconified(javax.swing.event.InternalFrameEvent e)
internalFrameIconified in interface javax.swing.event.InternalFrameListenerpublic void internalFrameDeiconified(javax.swing.event.InternalFrameEvent e)
internalFrameDeiconified in interface javax.swing.event.InternalFrameListenerpublic void internalFrameActivated(javax.swing.event.InternalFrameEvent event)
SegmentationDocument being activated to the top of
the opened documents, adds its layers to the layers panel, sets some
states of the tools and enables/disables some actions if necessary.
internalFrameActivated in interface javax.swing.event.InternalFrameListenerpublic void internalFrameDeactivated(javax.swing.event.InternalFrameEvent e)
internalFrameDeactivated in interface javax.swing.event.InternalFrameListenerpublic void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent event)
JInternalFrame of the layers panel or the
toolbox if the mouse enters one of them.
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent evento)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void menuCanceled(javax.swing.event.MenuEvent e)
menuCanceled in interface javax.swing.event.MenuListenerpublic void menuDeselected(javax.swing.event.MenuEvent e)
menuDeselected in interface javax.swing.event.MenuListenerpublic void menuSelected(javax.swing.event.MenuEvent e)
SegmentationDocument contains a color or a gray level image.
menuSelected in interface javax.swing.event.MenuListenerpublic void setMarkersImage(java.awt.image.BufferedImage image)
image as the markers image of the active
SegmentationDocument.
image - the image to be used as markers
public void setFilteredImage(java.awt.image.BufferedImage image,
Filter filter)
image, obtained by the filter, as the
filtered image of the active SegmentationDocument. Can be
used by the method chooseParameters of a
ParameterizedFilter.
image - the filtered image obtained by the filterfilter - the filter used to obtain the imageParameterizedFilter.chooseParameters(BufferedImage)public void setColorSpace(ColorSpace colorSpace)
colorSpace to paint the regions of the partition of
the active SegmentationDocument.
colorSpace - a ColorSpace to paint the regions of the
partition of the active SegmentationDocument.public void error(java.lang.String message)
message.
message - the error messagepublic void error(java.lang.Exception exception)
exception.getLocalizedMessage().
exception - a Exception with an error message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||