Class JDialogMaximumLikelihoodIteratedBlindDeconvolution

  • All Implemented Interfaces:
    AlgorithmInterface, ScriptableActionInterface, DialogDefaultsInterface, java.awt.event.ActionListener, java.awt.event.FocusListener, java.awt.event.ItemListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

    public class JDialogMaximumLikelihoodIteratedBlindDeconvolution
    extends JDialogScriptableBase
    implements AlgorithmInterface
    Dialog that launches the Maximum likelihood iterated blind deconvolution algorithm. The dialog allows the user to set six parameters to the algorithm: numberIterations: the number of times to iterate in the blind deconvolution algorithm showProgress: Display the deconvolved image every showProgress images objectiveNumericalAperature: a property of the lens used to image the sample wavelength: the wavelength of the reflected (for brightfield) or fluorescence light refractiveIndex: the index of refraction of the sample. useMicroscopeSettings: When true, the lens NA, wavelength, and refractive index are used in the deconvolution process See AlgorithmMaximumLikelihoodIteratedBlindDeconvolution.java for algorithm details.
    See Also:
    Serialized Form
    • Nested Class Summary

      • 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
      • 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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • 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.
      void algorithmPerformed​(AlgorithmBase algorithm)
      Called when the AlgorithmMaximumLikelihoodIteratedBlindDeconvolution has finished processing the source image.
      protected void callAlgorithm()
      Once all the necessary variables are set, call the algorithm based on what type of image this is and whether or not there is a separate destination image.
      protected void doPostAlgorithmActions()
      Store the result image in the script runner's image table now that the action execution is finished.
      private void init()
      Initializes the user-interface components of the dialog:
      private boolean isPowerOf2​(int dimValue)
      Check if the dimension value is already a power of 2.
      protected void setGUIFromParams()
      Set the dialog GUI using the script parameters while running this algorithm as part of a script.
      private boolean setVariables()
      Gets the user-determined parameters for the algorithm from the user-interface components.
      protected void storeParamsFromGUI()
      Record the parameters just used to run this algorithm in a script.
      private int transformDimPowerOf2​(int dimValue)
      Calculate the dimension value to power of 2.
      • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • numberIterations

        private int numberIterations
        The number of iterations for calculating the deconvolution:
      • showProgress

        private int showProgress
        Display the deconvolved image every X images to show progress:
      • objectiveNumericalAperature

        private float objectiveNumericalAperature
        The object numerical aperature, a property of the lens used to image the sample:
      • wavelength

        private float wavelength
        The reflected or fluorescence wavelength of the sample:
      • refractiveIndex

        private float refractiveIndex
        The index of refraction of the sample:
      • useMicroscopeSettings

        private boolean useMicroscopeSettings
        When true the lens NA, wavelength, and refractive index are used in the deconvolution process
      • originalImage

        private ModelImage originalImage
        The original data image to be reconstructed:
      • extents

        private int[] extents
        The extents of original image
      • dim

        private int dim
        Number of dimensions in an image e.g 2D, 3D
      • newExtents

        private int[] newExtents
        The extents of transformed (to the power of 2) image
      • doResample

        private boolean doResample
        The boolean value to determine whether to resample the original image or not.
      • textNumberIterations

        private javax.swing.JTextField textNumberIterations
        User-Interface for entering the number of deconvolution iterations:
      • textShowProgress

        private javax.swing.JTextField textShowProgress
        User-Interface for entering the number of intermediate images to show:
      • textObjectiveNumericalAperature

        private javax.swing.JTextField textObjectiveNumericalAperature
        User-Interface for entering the objective numerical aperature:
      • textWavelength

        private javax.swing.JTextField textWavelength
        User-Interface for entering the sample wavelength:
      • textRefractiveIndex

        private javax.swing.JTextField textRefractiveIndex
        User-Interface for entering the index of refraction:
      • textOriginalExtentX

        private javax.swing.JTextField textOriginalExtentX
        User-Interface for displaying the original extent X
      • textOriginalExtentY

        private javax.swing.JTextField textOriginalExtentY
        User-Interface for displaying the original extent Y
      • textOriginalExtentZ

        private javax.swing.JTextField textOriginalExtentZ
        User-Interface for displaying the original extent Z
      • textExpectedExtentX

        private javax.swing.JTextField textExpectedExtentX
        User-Interface for entering the expected extent X
      • textExpectedExtentY

        private javax.swing.JTextField textExpectedExtentY
        User-Interface for entering the expected extent Y
      • textExpectedExtentZ

        private javax.swing.JTextField textExpectedExtentZ
        User-Interface for entering the expected extent Z
    • Constructor Detail

      • JDialogMaximumLikelihoodIteratedBlindDeconvolution

        public JDialogMaximumLikelihoodIteratedBlindDeconvolution​(java.awt.Frame theParentFrame,
                                                                  ModelImage im)
        Creates a new JDialogMaximumLikelihoodIteratedBlindDeconvolution object.
        Parameters:
        theParentFrame - The frame that launched this dialog
        im - The source image to be reconstructed
    • 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 interface java.awt.event.ActionListener
        Overrides:
        actionPerformed in class JDialogBase
        Parameters:
        event - Event that triggers function.
      • algorithmPerformed

        public void algorithmPerformed​(AlgorithmBase algorithm)
        Called when the AlgorithmMaximumLikelihoodIteratedBlindDeconvolution has finished processing the source image. If the algorithm is completed, the resulting reconstructed image is displayed.
        Specified by:
        algorithmPerformed in interface AlgorithmInterface
        Parameters:
        algorithm - The algorithm that has finished processing.
      • setGUIFromParams

        protected void setGUIFromParams()
        Set the dialog GUI using the script parameters while running this algorithm as part of a script.
        Specified by:
        setGUIFromParams in class JDialogScriptableBase
      • doPostAlgorithmActions

        protected void doPostAlgorithmActions()
        Store the result image in the script runner's image table now that the action execution is finished.
        Overrides:
        doPostAlgorithmActions in class JDialogScriptableBase
      • callAlgorithm

        protected void callAlgorithm()
        Once all the necessary variables are set, call the algorithm based on what type of image this is and whether or not there is a separate destination image.
        Specified by:
        callAlgorithm in class JDialogScriptableBase
      • init

        private void init()
        Initializes the user-interface components of the dialog:
      • setVariables

        private boolean setVariables()
        Gets the user-determined parameters for the algorithm from the user-interface components.
        Returns:
        true
      • isPowerOf2

        private boolean isPowerOf2​(int dimValue)
        Check if the dimension value is already a power of 2.
        Parameters:
        dimValue - dimension value
        Returns:
        isPower2 true if dimValue is a power of 2, false otherwise.
      • transformDimPowerOf2

        private int transformDimPowerOf2​(int dimValue)
        Calculate the dimension value to power of 2.
        Parameters:
        dimValue - dimension value
        Returns:
        newDimValue dimension value in power of 2.