Package gov.nih.mipav.view.dialogs
Class JDialogMaximumLikelihoodIteratedBlindDeconvolution
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.JDialogScriptableBase
gov.nih.mipav.view.dialogs.JDialogMaximumLikelihoodIteratedBlindDeconvolution
- All Implemented Interfaces:
AlgorithmInterface,ScriptableActionInterface,DialogDefaultsInterface,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,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:
-
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 intNumber of dimensions in an image e.g 2D, 3Dprivate booleanThe boolean value to determine whether to resample the original image or not.private int[]The extents of original image(package private) AlgorithmMaximumLikelihoodIteratedBlindDeconvolutionThe MaximumLikelihood Blind Deconvolution algorithm:private int[]The extents of transformed (to the power of 2) imageprivate intThe number of iterations for calculating the deconvolution:private floatThe object numerical aperature, a property of the lens used to image the sample:private ModelImageThe original data image to be reconstructed:private floatThe index of refraction of the sample:private static final longUse serialVersionUID for interoperability.private intDisplay the deconvolved image every X images to show progress:private JTextFieldUser-Interface for entering the expected extent Xprivate JTextFieldUser-Interface for entering the expected extent Yprivate JTextFieldUser-Interface for entering the expected extent Zprivate JTextFieldUser-Interface for entering the number of deconvolution iterations:private JTextFieldUser-Interface for entering the objective numerical aperature:private JTextFieldUser-Interface for displaying the original extent Xprivate JTextFieldUser-Interface for displaying the original extent Yprivate JTextFieldUser-Interface for displaying the original extent Zprivate JTextFieldUser-Interface for entering the index of refraction:private JTextFieldUser-Interface for entering the number of intermediate images to show:private JTextFieldUser-Interface for entering the sample wavelength:private booleanWhen true the lens NA, wavelength, and refractive index are used in the deconvolution processprivate floatThe reflected or fluorescence wavelength of the sample:Fields inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
displayInNewFrame, isComplete, scriptParametersFields 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
ConstructorsConstructorDescriptionJDialogMaximumLikelihoodIteratedBlindDeconvolution(Frame theParentFrame, ModelImage im) Creates a new JDialogMaximumLikelihoodIteratedBlindDeconvolution object. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Closes dialog box when the OK button is pressed and calls the algorithm.voidalgorithmPerformed(AlgorithmBase algorithm) Called when the AlgorithmMaximumLikelihoodIteratedBlindDeconvolution has finished processing the source image.protected voidOnce 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 voidStore the result image in the script runner's image table now that the action execution is finished.private voidinit()Initializes the user-interface components of the dialog:private booleanisPowerOf2(int dimValue) Check if the dimension value is already a power of 2.protected voidSet the dialog GUI using the script parameters while running this algorithm as part of a script.private booleanGets the user-determined parameters for the algorithm from the user-interface components.protected voidRecord the parameters just used to run this algorithm in a script.private inttransformDimPowerOf2(int dimValue) Calculate the dimension value to power of 2.Methods inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
getDialogActionString, insertScriptLine, isComplete, scriptRun, setCompleteMethods 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:
-
ibdAlgor
The MaximumLikelihood Blind Deconvolution algorithm: -
numberIterations
private int numberIterationsThe number of iterations for calculating the deconvolution: -
showProgress
private int showProgressDisplay the deconvolved image every X images to show progress: -
objectiveNumericalAperature
private float objectiveNumericalAperatureThe object numerical aperature, a property of the lens used to image the sample: -
wavelength
private float wavelengthThe reflected or fluorescence wavelength of the sample: -
refractiveIndex
private float refractiveIndexThe index of refraction of the sample: -
useMicroscopeSettings
private boolean useMicroscopeSettingsWhen true the lens NA, wavelength, and refractive index are used in the deconvolution process -
originalImage
The original data image to be reconstructed: -
extents
private int[] extentsThe extents of original image -
dim
private int dimNumber of dimensions in an image e.g 2D, 3D -
newExtents
private int[] newExtentsThe extents of transformed (to the power of 2) image -
doResample
private boolean doResampleThe boolean value to determine whether to resample the original image or not. -
textNumberIterations
User-Interface for entering the number of deconvolution iterations: -
textShowProgress
User-Interface for entering the number of intermediate images to show: -
textObjectiveNumericalAperature
User-Interface for entering the objective numerical aperature: -
textWavelength
User-Interface for entering the sample wavelength: -
textRefractiveIndex
User-Interface for entering the index of refraction: -
textOriginalExtentX
User-Interface for displaying the original extent X -
textOriginalExtentY
User-Interface for displaying the original extent Y -
textOriginalExtentZ
User-Interface for displaying the original extent Z -
textExpectedExtentX
User-Interface for entering the expected extent X -
textExpectedExtentY
User-Interface for entering the expected extent Y -
textExpectedExtentZ
User-Interface for entering the expected extent Z
-
-
Constructor Details
-
JDialogMaximumLikelihoodIteratedBlindDeconvolution
Creates a new JDialogMaximumLikelihoodIteratedBlindDeconvolution object.- Parameters:
theParentFrame- The frame that launched this dialogim- The source image to be reconstructed
-
-
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.
-
algorithmPerformed
Called when the AlgorithmMaximumLikelihoodIteratedBlindDeconvolution has finished processing the source image. If the algorithm is completed, the resulting reconstructed image is displayed.- Specified by:
algorithmPerformedin interfaceAlgorithmInterface- Parameters:
algorithm- The algorithm that has finished processing.
-
storeParamsFromGUI
Record the parameters just used to run this algorithm in a script.- Specified by:
storeParamsFromGUIin classJDialogScriptableBase- Throws:
ParserException- If there is a problem creating/recording the new parameters.
-
setGUIFromParams
protected void setGUIFromParams()Set the dialog GUI using the script parameters while running this algorithm as part of a script.- Specified by:
setGUIFromParamsin classJDialogScriptableBase
-
doPostAlgorithmActions
protected void doPostAlgorithmActions()Store the result image in the script runner's image table now that the action execution is finished.- Overrides:
doPostAlgorithmActionsin classJDialogScriptableBase
-
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:
callAlgorithmin classJDialogScriptableBase
-
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.
-