Package gov.nih.mipav.view.dialogs
Class JDialogPowerPaint
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Dialog
-
- javax.swing.JDialog
-
- gov.nih.mipav.view.dialogs.JDialogBase
-
- gov.nih.mipav.view.dialogs.JDialogPowerPaint
-
- All Implemented Interfaces:
DialogDefaultsInterface
,java.awt.event.ActionListener
,java.awt.event.FocusListener
,java.awt.event.ItemListener
,java.awt.event.KeyListener
,java.awt.event.MouseListener
,java.awt.event.MouseWheelListener
,java.awt.event.WindowListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.ChangeListener
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public class JDialogPowerPaint extends JDialogBase implements java.awt.event.MouseListener, java.awt.event.MouseWheelListener, java.awt.event.KeyListener, javax.swing.event.ChangeListener
Dialog box for the paint power tools: morphology operations, object delete, etc.- Version:
- May 2005
- Author:
- Pierre-Louis Bazin
- See Also:
JDialogBase
,AlgorithmInterface
, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKAction
-
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
-
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private static int
ALLBACKGROUNDS
DOCUMENT ME!private static int
BACKGROUND
DOCUMENT ME!private int
backgroundDim
DOCUMENT ME!private int
backgroundsDim
DOCUMENT ME!private javax.swing.JPanel
botPanel
DOCUMENT ME!private javax.swing.JButton
buttonDilate
DOCUMENT ME!private javax.swing.JButton
buttonErode
DOCUMENT ME!private javax.swing.JButton
buttonExportToMask
DOCUMENT ME!private javax.swing.JButton
buttonExportToVOI
DOCUMENT ME!private javax.swing.JButton
buttonFillBackground
DOCUMENT ME!private javax.swing.JButton
buttonFillBackgrounds
DOCUMENT ME!private javax.swing.JButton
buttonGrowRegion
DOCUMENT ME!private javax.swing.JButton
buttonImportFromMask
DOCUMENT ME!private javax.swing.JButton
buttonImportFromVOI
DOCUMENT ME!private javax.swing.JButton
buttonRevert
DOCUMENT ME!private javax.swing.JButton
buttonRmObject
DOCUMENT ME!private javax.swing.JButton
buttonRmObjects
DOCUMENT ME!private javax.swing.JToggleButton
buttonShortkeys
DOCUMENT ME!private int
c2x
DOCUMENT ME!private int
c2y
DOCUMENT ME!private int
c2z
DOCUMENT ME!private int
c3x
DOCUMENT ME!private int
c3y
DOCUMENT ME!private int
c3z
DOCUMENT ME!private javax.swing.JCheckBox
checkSave
DOCUMENT ME!private javax.swing.JCheckBox
checkThreshold
handling of intensity threshold.private javax.swing.JComboBox
comboConnectType
DOCUMENT ME!private javax.swing.JComboBox
comboDilateDimType
DOCUMENT ME!private javax.swing.JComboBox
comboErodeDimType
DOCUMENT ME!private javax.swing.JComboBox
comboStructureType
DOCUMENT ME!private java.lang.String
connectType
DOCUMENT ME!private java.lang.String[]
connectTypes
DOCUMENT ME!private static int
delay
autosave elements.private java.lang.String
dilateDimType
DOCUMENT ME!private java.lang.String[]
dimTypes
DOCUMENT ME!private java.lang.String
erodeDimType
DOCUMENT ME!private javax.swing.JPanel
exportPanel
DOCUMENT ME!private int
getMouseInput
DOCUMENT ME!private javax.swing.ButtonGroup
groupBackground
DOCUMENT ME!private javax.swing.ButtonGroup
groupBackgrounds
DOCUMENT ME!private javax.swing.ButtonGroup
groupGrowRegion
DOCUMENT ME!private javax.swing.ButtonGroup
groupObject
DOCUMENT ME!private javax.swing.ButtonGroup
groupObjects
DOCUMENT ME!private static int
GROWREGION
DOCUMENT ME!private ModelImage
image
DOCUMENT ME!private javax.swing.JLabel
labelConnectType
DOCUMENT ME!private javax.swing.JLabel
labelO2D
DOCUMENT ME!private javax.swing.JLabel
labelO3D
DOCUMENT ME!private javax.swing.JLabel
labelStructureType
DOCUMENT ME!private javax.swing.JLabel
labelStructuring
DOCUMENT ME!private float
lowerThreshold
handling of intensity threshold.private javax.swing.JPanel
mainPanel
dialog elements.private static int
MaxObject
DOCUMENT ME!private javax.swing.JPanel
morphoPanel
DOCUMENT ME!private javax.swing.JPanel
movePanel
DOCUMENT ME!private static int
NONE
DOCUMENT ME!private int
nx
DOCUMENT ME!private int
ny
DOCUMENT ME!private int
nz
DOCUMENT ME!private javax.swing.JPanel
objectPanel
DOCUMENT ME!private javax.swing.JPanel
panelThreshold
DOCUMENT ME!private java.util.BitSet
previous
internal objects.private javax.swing.JRadioButton
radioBackground2D
DOCUMENT ME!private javax.swing.JRadioButton
radioBackground3D
DOCUMENT ME!private javax.swing.JRadioButton
radioBackgrounds2D
DOCUMENT ME!private javax.swing.JRadioButton
radioBackgrounds3D
DOCUMENT ME!private javax.swing.JRadioButton
radioGrowRegion2D
DOCUMENT ME!private javax.swing.JRadioButton
radioGrowRegion3D
DOCUMENT ME!private javax.swing.JRadioButton
radioObject2D
DOCUMENT ME!private javax.swing.JRadioButton
radioObject3D
DOCUMENT ME!private javax.swing.JRadioButton
radioObjects2D
DOCUMENT ME!private javax.swing.JRadioButton
radioObjects3D
DOCUMENT ME!private int
regionGrowDim
parameters.private static int
REMOVE
DOCUMENT ME!private static int
REMOVEALL
DOCUMENT ME!private ModelImage
resultImage
DOCUMENT ME!private int
rmObjDim
DOCUMENT ME!private int
rmObjsDim
DOCUMENT ME!private PaintAutoSave
save
DOCUMENT ME!private java.util.Timer
saver
DOCUMENT ME!private java.util.BitSet
se2xy
DOCUMENT ME!private java.util.BitSet
se2xz
DOCUMENT ME!private java.util.BitSet
se2yz
DOCUMENT ME!private java.util.BitSet
se3
DOCUMENT ME!private static long
serialVersionUID
Use serialVersionUID for interoperability.private javax.swing.JSpinner
spinLower
handling of intensity threshold.private javax.swing.JSpinner
spinUpper
DOCUMENT ME!private float
structureSize
DOCUMENT ME!private java.lang.String
structureType
DOCUMENT ME!private java.lang.String[]
structureTypes
DOCUMENT ME!private javax.swing.JTextField
textSave
DOCUMENT ME!private javax.swing.JTextField
textStructuring
DOCUMENT ME!private float
upperThreshold
handling of intensity threshold.private static int
XY
DOCUMENT ME!private static int
XZ
DOCUMENT ME!private static int
ZY
DOCUMENT ME!-
Fields inherited from class gov.nih.mipav.view.dialogs.JDialogBase
applyButton, bar, cancelButton, cancelFlag, closeButton, HELP, helpButton, mainDialogPanel, NEW, OKButton, parentFrame, progressBar, REPLACE, runInSeparateThread, runningScriptFlag, runQuiet, serif12, serif12B, voiManager
-
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description JDialogPowerPaint(java.awt.Frame theParentFrame, ModelImage im)
Creates dialog for plugin.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
Closes dialog box when the OK button is pressed and calls the algorithm.private int[][][]
connected18Object3D(boolean[][][] img, int nx, int ny, int nz)
3D images: 18-neighborhood.private int[][][]
connected26Object3D(boolean[][][] img, int nx, int ny, int nz)
3D images: 26-neighborhood.private int[][]
connected4Object2D(boolean[][] img, int nx, int ny)
2D images: 4-connectivity.private int[][][]
connected6Object3D(boolean[][][] img, int nx, int ny, int nz)
3D images: 6-neighborhood.private int[][]
connected8Object2D(boolean[][] img, int nx, int ny)
2D images: 8-neighborhood.private void
createStructuringElement2D()
make the structuring element for morphology.private void
createStructuringElement3D()
make the structuring element for morphology.private void
dilateImage()
dilation.private java.util.BitSet
dilateObject(java.util.BitSet img, int nx, int ny, int nz, java.util.BitSet mask, int dx, int dy, int dz)
dilate binary object with a custom kernel using the BitSet structure with indexing convention index = x + nx*y + nx*ny*z.private void
erodeImage()
erosion.private java.util.BitSet
erodeObject(java.util.BitSet img, int nx, int ny, int nz, java.util.BitSet mask, int dx, int dy, int dz)
erode binary object with a custom kernel using the BitSet structure with indexing convention index = x + nx*y + nx*ny*z.private void
exportToMask()
export to Mask.private void
exportToVOI()
export to VOI.private void
fillAllBackgrounds(int xS, int yS, int zS, int sliceDir)
background filling algorithm.private void
fillBackground(int xS, int yS, int zS, int sliceDir)
background filling algorithm.ModelImage
getResultImage()
Accessor that returns the image.private void
growRegion(int xS, int yS, int zS, int sliceDir)
region growing algorithm.private void
importFromMask()
import from Mask.private void
importFromVOI()
import from VOI.private void
init()
Sets up the GUI (panels, buttons, etc) and displays it on the screen.private boolean
isInsideIntensityThreshold(int x, int y, int z, ModelImage img, int xS, int yS, int zS)
check if point (x,y,z) has same intensity as (xS,yS,zS)void
keyPressed(java.awt.event.KeyEvent e)
Handle the key pressed event.void
keyReleased(java.awt.event.KeyEvent e)
Handle the key released event.void
keyTyped(java.awt.event.KeyEvent e)
Handle the key typed event.void
mouseClicked(java.awt.event.MouseEvent mouseEvent)
Listening to mouse events when updating paint.void
mouseEntered(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!void
mouseExited(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!void
mousePressed(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!void
mouseReleased(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!void
mouseWheelMoved(java.awt.event.MouseWheelEvent mouseEvent)
DOCUMENT ME!private void
propagateAll()
propagate to all slices.private void
propagateDown()
propagate to the next slice.private void
propagateUp()
propagate to the next slice.private void
refreshImagePaint(ModelImage img, java.util.BitSet obj)
refresh the displayed mask.private void
removeAllObjects(int xS, int yS, int zS, int sliceDir)
object removal algorithm.private void
removeObject(int xS, int yS, int zS, int sliceDir)
object removal algorithm.private void
revertImage()
revert to previous mask.void
stateChanged(javax.swing.event.ChangeEvent e)
state change listener for the sliders.private void
trimIntensityThreshold(ModelImage img, java.util.BitSet obj, java.util.BitSet prev)
trim the mask using the intensity-
Methods inherited from class gov.nih.mipav.view.dialogs.JDialogBase
buildApplyButton, buildButtons, buildCancelButton, buildCancelButton, buildCloseButton, buildHelpButton, buildImageComboBox, buildOKButton, buildOKButton, buildOKCancelButtons, buildTitledBorder, buildTitledBorder, createLabel, createProgressBar, createProgressBar, createTextField, focusGained, focusLost, getDialogName, isCancelled, isQuietRunning, isRunInSeparateThread, isScriptRunning, itemStateChanged, loadDefaults, loadDefaults, makeImageName, makeString, openNewFrame, saveDefaults, saveDefaults, setLeftHandSystem, setQuietRunning, setScriptRunning, setSeparateThread, setVisible, setVisible, setVisibleMenuBar, setVisibleStandard, setVOIManager, setWCSystem, testParameter, testParameterMin, updateFFTFileInfo, updateFileInfo, updateFileInfoOtherModality, updateFileInfoStatic, updateFileInfoStatic, updateFileTypeInfo, updateFileTypeInfo, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, 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, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
MaxObject
private static final int MaxObject
DOCUMENT ME!- See Also:
- Constant Field Values
-
NONE
private static int NONE
DOCUMENT ME!
-
BACKGROUND
private static int BACKGROUND
DOCUMENT ME!
-
ALLBACKGROUNDS
private static int ALLBACKGROUNDS
DOCUMENT ME!
-
REMOVE
private static int REMOVE
DOCUMENT ME!
-
REMOVEALL
private static int REMOVEALL
DOCUMENT ME!
-
GROWREGION
private static int GROWREGION
DOCUMENT ME!
-
XY
private static int XY
DOCUMENT ME!
-
XZ
private static int XZ
DOCUMENT ME!
-
ZY
private static int ZY
DOCUMENT ME!
-
delay
private static int delay
autosave elements.
-
backgroundDim
private int backgroundDim
DOCUMENT ME!
-
backgroundsDim
private int backgroundsDim
DOCUMENT ME!
-
botPanel
private javax.swing.JPanel botPanel
DOCUMENT ME!
-
buttonDilate
private javax.swing.JButton buttonDilate
DOCUMENT ME!
-
buttonErode
private javax.swing.JButton buttonErode
DOCUMENT ME!
-
buttonExportToMask
private javax.swing.JButton buttonExportToMask
DOCUMENT ME!
-
buttonExportToVOI
private javax.swing.JButton buttonExportToVOI
DOCUMENT ME!
-
buttonFillBackground
private javax.swing.JButton buttonFillBackground
DOCUMENT ME!
-
buttonFillBackgrounds
private javax.swing.JButton buttonFillBackgrounds
DOCUMENT ME!
-
buttonGrowRegion
private javax.swing.JButton buttonGrowRegion
DOCUMENT ME!
-
buttonImportFromMask
private javax.swing.JButton buttonImportFromMask
DOCUMENT ME!
-
buttonImportFromVOI
private javax.swing.JButton buttonImportFromVOI
DOCUMENT ME!
-
buttonRevert
private javax.swing.JButton buttonRevert
DOCUMENT ME!
-
buttonRmObject
private javax.swing.JButton buttonRmObject
DOCUMENT ME!
-
buttonRmObjects
private javax.swing.JButton buttonRmObjects
DOCUMENT ME!
-
buttonShortkeys
private javax.swing.JToggleButton buttonShortkeys
DOCUMENT ME!
-
c2x
private int c2x
DOCUMENT ME!
-
c2y
private int c2y
DOCUMENT ME!
-
c2z
private int c2z
DOCUMENT ME!
-
c3x
private int c3x
DOCUMENT ME!
-
c3y
private int c3y
DOCUMENT ME!
-
c3z
private int c3z
DOCUMENT ME!
-
checkSave
private javax.swing.JCheckBox checkSave
DOCUMENT ME!
-
checkThreshold
private javax.swing.JCheckBox checkThreshold
handling of intensity threshold.
-
comboConnectType
private javax.swing.JComboBox comboConnectType
DOCUMENT ME!
-
comboDilateDimType
private javax.swing.JComboBox comboDilateDimType
DOCUMENT ME!
-
comboErodeDimType
private javax.swing.JComboBox comboErodeDimType
DOCUMENT ME!
-
comboStructureType
private javax.swing.JComboBox comboStructureType
DOCUMENT ME!
-
connectType
private java.lang.String connectType
DOCUMENT ME!
-
connectTypes
private java.lang.String[] connectTypes
DOCUMENT ME!
-
dilateDimType
private java.lang.String dilateDimType
DOCUMENT ME!
-
dimTypes
private java.lang.String[] dimTypes
DOCUMENT ME!
-
erodeDimType
private java.lang.String erodeDimType
DOCUMENT ME!
-
exportPanel
private javax.swing.JPanel exportPanel
DOCUMENT ME!
-
getMouseInput
private int getMouseInput
DOCUMENT ME!
-
groupBackground
private javax.swing.ButtonGroup groupBackground
DOCUMENT ME!
-
groupBackgrounds
private javax.swing.ButtonGroup groupBackgrounds
DOCUMENT ME!
-
groupGrowRegion
private javax.swing.ButtonGroup groupGrowRegion
DOCUMENT ME!
-
groupObject
private javax.swing.ButtonGroup groupObject
DOCUMENT ME!
-
groupObjects
private javax.swing.ButtonGroup groupObjects
DOCUMENT ME!
-
image
private ModelImage image
DOCUMENT ME!
-
labelConnectType
private javax.swing.JLabel labelConnectType
DOCUMENT ME!
-
labelO2D
private javax.swing.JLabel labelO2D
DOCUMENT ME!
-
labelO3D
private javax.swing.JLabel labelO3D
DOCUMENT ME!
-
labelStructureType
private javax.swing.JLabel labelStructureType
DOCUMENT ME!
-
labelStructuring
private javax.swing.JLabel labelStructuring
DOCUMENT ME!
-
lowerThreshold
private float lowerThreshold
handling of intensity threshold.
-
mainPanel
private javax.swing.JPanel mainPanel
dialog elements.
-
morphoPanel
private javax.swing.JPanel morphoPanel
DOCUMENT ME!
-
movePanel
private javax.swing.JPanel movePanel
DOCUMENT ME!
-
nx
private int nx
DOCUMENT ME!
-
ny
private int ny
DOCUMENT ME!
-
nz
private int nz
DOCUMENT ME!
-
objectPanel
private javax.swing.JPanel objectPanel
DOCUMENT ME!
-
panelThreshold
private javax.swing.JPanel panelThreshold
DOCUMENT ME!
-
previous
private java.util.BitSet previous
internal objects.
-
radioBackground2D
private javax.swing.JRadioButton radioBackground2D
DOCUMENT ME!
-
radioBackground3D
private javax.swing.JRadioButton radioBackground3D
DOCUMENT ME!
-
radioBackgrounds2D
private javax.swing.JRadioButton radioBackgrounds2D
DOCUMENT ME!
-
radioBackgrounds3D
private javax.swing.JRadioButton radioBackgrounds3D
DOCUMENT ME!
-
radioGrowRegion2D
private javax.swing.JRadioButton radioGrowRegion2D
DOCUMENT ME!
-
radioGrowRegion3D
private javax.swing.JRadioButton radioGrowRegion3D
DOCUMENT ME!
-
radioObject2D
private javax.swing.JRadioButton radioObject2D
DOCUMENT ME!
-
radioObject3D
private javax.swing.JRadioButton radioObject3D
DOCUMENT ME!
-
radioObjects2D
private javax.swing.JRadioButton radioObjects2D
DOCUMENT ME!
-
radioObjects3D
private javax.swing.JRadioButton radioObjects3D
DOCUMENT ME!
-
regionGrowDim
private int regionGrowDim
parameters.
-
resultImage
private ModelImage resultImage
DOCUMENT ME!
-
rmObjDim
private int rmObjDim
DOCUMENT ME!
-
rmObjsDim
private int rmObjsDim
DOCUMENT ME!
-
save
private PaintAutoSave save
DOCUMENT ME!
-
saver
private java.util.Timer saver
DOCUMENT ME!
-
se2xy
private java.util.BitSet se2xy
DOCUMENT ME!
-
se2yz
private java.util.BitSet se2yz
DOCUMENT ME!
-
se2xz
private java.util.BitSet se2xz
DOCUMENT ME!
-
se3
private java.util.BitSet se3
DOCUMENT ME!
-
spinLower
private javax.swing.JSpinner spinLower
handling of intensity threshold.
-
spinUpper
private javax.swing.JSpinner spinUpper
DOCUMENT ME!
-
structureSize
private float structureSize
DOCUMENT ME!
-
structureType
private java.lang.String structureType
DOCUMENT ME!
-
structureTypes
private java.lang.String[] structureTypes
DOCUMENT ME!
-
textSave
private javax.swing.JTextField textSave
DOCUMENT ME!
-
textStructuring
private javax.swing.JTextField textStructuring
DOCUMENT ME!
-
upperThreshold
private float upperThreshold
handling of intensity threshold.
-
-
Constructor Detail
-
JDialogPowerPaint
public JDialogPowerPaint(java.awt.Frame theParentFrame, ModelImage im)
Creates dialog for plugin.- Parameters:
theParentFrame
- Parent frame.im
- Source image.
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Closes dialog box when the OK button is pressed and calls the algorithm.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Overrides:
actionPerformed
in classJDialogBase
- Parameters:
event
- Event that triggers function.
-
getResultImage
public ModelImage getResultImage()
Accessor that returns the image.- Returns:
- The result image.
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
Handle the key pressed event.- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
- Parameters:
e
- DOCUMENT ME!
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
Handle the key released event.- Specified by:
keyReleased
in interfacejava.awt.event.KeyListener
- Parameters:
e
- DOCUMENT ME!
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)
Handle the key typed event.- Specified by:
keyTyped
in interfacejava.awt.event.KeyListener
- Parameters:
e
- DOCUMENT ME!
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent mouseEvent)
Listening to mouse events when updating paint.- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
- Parameters:
mouseEvent
- MouseEvent
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
- Parameters:
mouseEvent
- DOCUMENT ME!
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
- Parameters:
mouseEvent
- DOCUMENT ME!
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Parameters:
mouseEvent
- DOCUMENT ME!
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- Parameters:
mouseEvent
- DOCUMENT ME!
-
mouseWheelMoved
public void mouseWheelMoved(java.awt.event.MouseWheelEvent mouseEvent)
DOCUMENT ME!- Specified by:
mouseWheelMoved
in interfacejava.awt.event.MouseWheelListener
- Parameters:
mouseEvent
- DOCUMENT ME!
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
state change listener for the sliders.- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Parameters:
e
- DOCUMENT ME!
-
connected18Object3D
private int[][][] connected18Object3D(boolean[][][] img, int nx, int ny, int nz)
3D images: 18-neighborhood.- Parameters:
img
- DOCUMENT ME!nx
- DOCUMENT ME!ny
- DOCUMENT ME!nz
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
connected26Object3D
private int[][][] connected26Object3D(boolean[][][] img, int nx, int ny, int nz)
3D images: 26-neighborhood.- Parameters:
img
- DOCUMENT ME!nx
- DOCUMENT ME!ny
- DOCUMENT ME!nz
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
connected4Object2D
private int[][] connected4Object2D(boolean[][] img, int nx, int ny)
2D images: 4-connectivity.- Parameters:
img
- DOCUMENT ME!nx
- DOCUMENT ME!ny
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
connected6Object3D
private int[][][] connected6Object3D(boolean[][][] img, int nx, int ny, int nz)
3D images: 6-neighborhood.- Parameters:
img
- DOCUMENT ME!nx
- DOCUMENT ME!ny
- DOCUMENT ME!nz
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
connected8Object2D
private int[][] connected8Object2D(boolean[][] img, int nx, int ny)
2D images: 8-neighborhood.- Parameters:
img
- DOCUMENT ME!nx
- DOCUMENT ME!ny
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
createStructuringElement2D
private void createStructuringElement2D()
make the structuring element for morphology.
-
createStructuringElement3D
private void createStructuringElement3D()
make the structuring element for morphology.
-
dilateImage
private void dilateImage()
dilation.
-
dilateObject
private java.util.BitSet dilateObject(java.util.BitSet img, int nx, int ny, int nz, java.util.BitSet mask, int dx, int dy, int dz)
dilate binary object with a custom kernel using the BitSet structure with indexing convention index = x + nx*y + nx*ny*z.- Parameters:
img
- DOCUMENT ME!nx
- DOCUMENT ME!ny
- DOCUMENT ME!nz
- DOCUMENT ME!mask
- DOCUMENT ME!dx
- DOCUMENT ME!dy
- DOCUMENT ME!dz
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
erodeImage
private void erodeImage()
erosion.
-
erodeObject
private java.util.BitSet erodeObject(java.util.BitSet img, int nx, int ny, int nz, java.util.BitSet mask, int dx, int dy, int dz)
erode binary object with a custom kernel using the BitSet structure with indexing convention index = x + nx*y + nx*ny*z.- Parameters:
img
- DOCUMENT ME!nx
- DOCUMENT ME!ny
- DOCUMENT ME!nz
- DOCUMENT ME!mask
- DOCUMENT ME!dx
- DOCUMENT ME!dy
- DOCUMENT ME!dz
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
exportToMask
private void exportToMask()
export to Mask.
-
exportToVOI
private void exportToVOI()
export to VOI.
-
fillAllBackgrounds
private void fillAllBackgrounds(int xS, int yS, int zS, int sliceDir)
background filling algorithm.- Parameters:
xS
- ModelImage-Space x coordinateyS
- ModelImage-Space y coordinatezS
- ModelImage-Space z coordinatesliceDir
- (XY, XZ, ZY)
-
fillBackground
private void fillBackground(int xS, int yS, int zS, int sliceDir)
background filling algorithm.- Parameters:
xS
- ModelImage-Space x coordinateyS
- ModelImage-Space y coordinatezS
- ModelImage-Space z coordinatesliceDir
- (XY, XZ, ZY)
-
growRegion
private void growRegion(int xS, int yS, int zS, int sliceDir)
region growing algorithm.- Parameters:
xS
- ModelImage-Space x coordinateyS
- ModelImage-Space y coordinatezS
- ModelImage-Space z coordinatesliceDir
- (XY, XZ, ZY)
-
importFromMask
private void importFromMask()
import from Mask.
-
importFromVOI
private void importFromVOI()
import from VOI.
-
init
private void init()
Sets up the GUI (panels, buttons, etc) and displays it on the screen.
-
propagateAll
private void propagateAll()
propagate to all slices.
-
propagateDown
private void propagateDown()
propagate to the next slice.
-
propagateUp
private void propagateUp()
propagate to the next slice.
-
refreshImagePaint
private void refreshImagePaint(ModelImage img, java.util.BitSet obj)
refresh the displayed mask.- Parameters:
img
- DOCUMENT ME!obj
- DOCUMENT ME!
-
isInsideIntensityThreshold
private boolean isInsideIntensityThreshold(int x, int y, int z, ModelImage img, int xS, int yS, int zS)
check if point (x,y,z) has same intensity as (xS,yS,zS)
-
trimIntensityThreshold
private void trimIntensityThreshold(ModelImage img, java.util.BitSet obj, java.util.BitSet prev)
trim the mask using the intensity- Parameters:
img
- DOCUMENT ME!obj
- DOCUMENT ME!prev
- DOCUMENT ME!
-
removeAllObjects
private void removeAllObjects(int xS, int yS, int zS, int sliceDir)
object removal algorithm.- Parameters:
xS
- ModelImage-Space x coordinateyS
- ModelImage-Space y coordinatezS
- ModelImage-Space z coordinatesliceDir
- (XY, XZ, ZY)
-
removeObject
private void removeObject(int xS, int yS, int zS, int sliceDir)
object removal algorithm.- Parameters:
xS
- ModelImage-Space x coordinateyS
- ModelImage-Space y coordinatezS
- ModelImage-Space z coordinatesliceDir
- (XY, XZ, ZY)
-
revertImage
private void revertImage()
revert to previous mask.
-
-