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,ActionListener,FocusListener,ItemListener,KeyListener,MouseListener,MouseWheelListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,RootPaneContainer,WindowConstants
public class JDialogPowerPaint
extends JDialogBase
implements MouseListener, MouseWheelListener, KeyListener, ChangeListener
Dialog box for the paint power tools: morphology operations, object delete, etc.
- Version:
- May 2005
- Author:
- Pierre-Louis Bazin
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKActionNested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static intDOCUMENT ME!private static intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private JPanelDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JToggleButtonDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private JCheckBoxDOCUMENT ME!private JCheckBoxhandling of intensity threshold.private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private StringDOCUMENT ME!private String[]DOCUMENT ME!private static intautosave elements.private StringDOCUMENT ME!private String[]DOCUMENT ME!private StringDOCUMENT ME!private JPanelDOCUMENT ME!private intDOCUMENT ME!private ButtonGroupDOCUMENT ME!private ButtonGroupDOCUMENT ME!private ButtonGroupDOCUMENT ME!private ButtonGroupDOCUMENT ME!private ButtonGroupDOCUMENT ME!private static intDOCUMENT ME!private ModelImageDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private floathandling of intensity threshold.private JPaneldialog elements.private static final intDOCUMENT ME!private JPanelDOCUMENT ME!private JPanelDOCUMENT ME!private static intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private JPanelDOCUMENT ME!private JPanelDOCUMENT ME!private BitSetinternal objects.private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private intparameters.private static intDOCUMENT ME!private static intDOCUMENT ME!private ModelImageDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private PaintAutoSaveDOCUMENT ME!private TimerDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private static final longUse serialVersionUID for interoperability.private JSpinnerhandling of intensity threshold.private JSpinnerDOCUMENT ME!private floatDOCUMENT ME!private StringDOCUMENT ME!private String[]DOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private floathandling of intensity threshold.private static intDOCUMENT ME!private static intDOCUMENT ME!private static intDOCUMENT 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, voiManagerFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionJDialogPowerPaint(Frame theParentFrame, ModelImage im) Creates dialog for plugin. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(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 voidmake the structuring element for morphology.private voidmake the structuring element for morphology.private voiddilation.private BitSetdilateObject(BitSet img, int nx, int ny, int nz, 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 voiderosion.private BitSeterodeObject(BitSet img, int nx, int ny, int nz, 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 voidexport to Mask.private voidexport to VOI.private voidfillAllBackgrounds(int xS, int yS, int zS, int sliceDir) background filling algorithm.private voidfillBackground(int xS, int yS, int zS, int sliceDir) background filling algorithm.Accessor that returns the image.private voidgrowRegion(int xS, int yS, int zS, int sliceDir) region growing algorithm.private voidimport from Mask.private voidimport from VOI.private voidinit()Sets up the GUI (panels, buttons, etc) and displays it on the screen.private booleanisInsideIntensityThreshold(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)voidHandle the key pressed event.voidHandle the key released event.voidHandle the key typed event.voidmouseClicked(MouseEvent mouseEvent) Listening to mouse events when updating paint.voidmouseEntered(MouseEvent mouseEvent) DOCUMENT ME!voidmouseExited(MouseEvent mouseEvent) DOCUMENT ME!voidmousePressed(MouseEvent mouseEvent) DOCUMENT ME!voidmouseReleased(MouseEvent mouseEvent) DOCUMENT ME!voidmouseWheelMoved(MouseWheelEvent mouseEvent) DOCUMENT ME!private voidpropagate to all slices.private voidpropagate to the next slice.private voidpropagate to the next slice.private voidrefreshImagePaint(ModelImage img, BitSet obj) refresh the displayed mask.private voidremoveAllObjects(int xS, int yS, int zS, int sliceDir) object removal algorithm.private voidremoveObject(int xS, int yS, int zS, int sliceDir) object removal algorithm.private voidrevert to previous mask.voidstate change listener for the sliders.private voidtrimIntensityThreshold(ModelImage img, BitSet obj, BitSet prev) trim the mask using the intensityMethods 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, windowOpenedMethods 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, updateMethods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackMethods 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, toFrontMethods 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, validateTreeMethods 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 Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
MaxObject
private static final int MaxObjectDOCUMENT ME!- See Also:
-
NONE
private static int NONEDOCUMENT ME! -
BACKGROUND
private static int BACKGROUNDDOCUMENT ME! -
ALLBACKGROUNDS
private static int ALLBACKGROUNDSDOCUMENT ME! -
REMOVE
private static int REMOVEDOCUMENT ME! -
REMOVEALL
private static int REMOVEALLDOCUMENT ME! -
GROWREGION
private static int GROWREGIONDOCUMENT ME! -
XY
private static int XYDOCUMENT ME! -
XZ
private static int XZDOCUMENT ME! -
ZY
private static int ZYDOCUMENT ME! -
delay
private static int delayautosave elements. -
backgroundDim
private int backgroundDimDOCUMENT ME! -
backgroundsDim
private int backgroundsDimDOCUMENT ME! -
botPanel
DOCUMENT ME! -
buttonDilate
DOCUMENT ME! -
buttonErode
DOCUMENT ME! -
buttonExportToMask
DOCUMENT ME! -
buttonExportToVOI
DOCUMENT ME! -
buttonFillBackground
DOCUMENT ME! -
buttonFillBackgrounds
DOCUMENT ME! -
buttonGrowRegion
DOCUMENT ME! -
buttonImportFromMask
DOCUMENT ME! -
buttonImportFromVOI
DOCUMENT ME! -
buttonRevert
DOCUMENT ME! -
buttonRmObject
DOCUMENT ME! -
buttonRmObjects
DOCUMENT ME! -
buttonShortkeys
DOCUMENT ME! -
c2x
private int c2xDOCUMENT ME! -
c2y
private int c2yDOCUMENT ME! -
c2z
private int c2zDOCUMENT ME! -
c3x
private int c3xDOCUMENT ME! -
c3y
private int c3yDOCUMENT ME! -
c3z
private int c3zDOCUMENT ME! -
checkSave
DOCUMENT ME! -
checkThreshold
handling of intensity threshold. -
comboConnectType
DOCUMENT ME! -
comboDilateDimType
DOCUMENT ME! -
comboErodeDimType
DOCUMENT ME! -
comboStructureType
DOCUMENT ME! -
connectType
DOCUMENT ME! -
connectTypes
DOCUMENT ME! -
dilateDimType
DOCUMENT ME! -
dimTypes
DOCUMENT ME! -
erodeDimType
DOCUMENT ME! -
exportPanel
DOCUMENT ME! -
getMouseInput
private int getMouseInputDOCUMENT ME! -
groupBackground
DOCUMENT ME! -
groupBackgrounds
DOCUMENT ME! -
groupGrowRegion
DOCUMENT ME! -
groupObject
DOCUMENT ME! -
groupObjects
DOCUMENT ME! -
image
DOCUMENT ME! -
labelConnectType
DOCUMENT ME! -
labelO2D
DOCUMENT ME! -
labelO3D
DOCUMENT ME! -
labelStructureType
DOCUMENT ME! -
labelStructuring
DOCUMENT ME! -
lowerThreshold
private float lowerThresholdhandling of intensity threshold. -
mainPanel
dialog elements. -
morphoPanel
DOCUMENT ME! -
movePanel
DOCUMENT ME! -
nx
private int nxDOCUMENT ME! -
ny
private int nyDOCUMENT ME! -
nz
private int nzDOCUMENT ME! -
objectPanel
DOCUMENT ME! -
panelThreshold
DOCUMENT ME! -
previous
internal objects. -
radioBackground2D
DOCUMENT ME! -
radioBackground3D
DOCUMENT ME! -
radioBackgrounds2D
DOCUMENT ME! -
radioBackgrounds3D
DOCUMENT ME! -
radioGrowRegion2D
DOCUMENT ME! -
radioGrowRegion3D
DOCUMENT ME! -
radioObject2D
DOCUMENT ME! -
radioObject3D
DOCUMENT ME! -
radioObjects2D
DOCUMENT ME! -
radioObjects3D
DOCUMENT ME! -
regionGrowDim
private int regionGrowDimparameters. -
resultImage
DOCUMENT ME! -
rmObjDim
private int rmObjDimDOCUMENT ME! -
rmObjsDim
private int rmObjsDimDOCUMENT ME! -
save
DOCUMENT ME! -
saver
DOCUMENT ME! -
se2xy
DOCUMENT ME! -
se2yz
DOCUMENT ME! -
se2xz
DOCUMENT ME! -
se3
DOCUMENT ME! -
spinLower
handling of intensity threshold. -
spinUpper
DOCUMENT ME! -
structureSize
private float structureSizeDOCUMENT ME! -
structureType
DOCUMENT ME! -
structureTypes
DOCUMENT ME! -
textSave
DOCUMENT ME! -
textStructuring
DOCUMENT ME! -
upperThreshold
private float upperThresholdhandling of intensity threshold.
-
-
Constructor Details
-
JDialogPowerPaint
Creates dialog for plugin.- Parameters:
theParentFrame- Parent frame.im- Source image.
-
-
Method Details
-
actionPerformed
Closes dialog box when the OK button is pressed and calls the algorithm.- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase- Parameters:
event- Event that triggers function.
-
getResultImage
Accessor that returns the image.- Returns:
- The result image.
-
keyPressed
Handle the key pressed event.- Specified by:
keyPressedin interfaceKeyListener- Parameters:
e- DOCUMENT ME!
-
keyReleased
Handle the key released event.- Specified by:
keyReleasedin interfaceKeyListener- Parameters:
e- DOCUMENT ME!
-
keyTyped
Handle the key typed event.- Specified by:
keyTypedin interfaceKeyListener- Parameters:
e- DOCUMENT ME!
-
mouseClicked
Listening to mouse events when updating paint.- Specified by:
mouseClickedin interfaceMouseListener- Parameters:
mouseEvent- MouseEvent
-
mouseEntered
DOCUMENT ME!- Specified by:
mouseEnteredin interfaceMouseListener- Parameters:
mouseEvent- DOCUMENT ME!
-
mouseExited
DOCUMENT ME!- Specified by:
mouseExitedin interfaceMouseListener- Parameters:
mouseEvent- DOCUMENT ME!
-
mousePressed
DOCUMENT ME!- Specified by:
mousePressedin interfaceMouseListener- Parameters:
mouseEvent- DOCUMENT ME!
-
mouseReleased
DOCUMENT ME!- Specified by:
mouseReleasedin interfaceMouseListener- Parameters:
mouseEvent- DOCUMENT ME!
-
mouseWheelMoved
DOCUMENT ME!- Specified by:
mouseWheelMovedin interfaceMouseWheelListener- Parameters:
mouseEvent- DOCUMENT ME!
-
stateChanged
state change listener for the sliders.- Specified by:
stateChangedin interfaceChangeListener- 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 BitSet dilateObject(BitSet img, int nx, int ny, int nz, 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
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
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
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.
-