Package gov.nih.mipav.view.dialogs
Class JDialogSIFT
- 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.JDialogSIFT
 
 
 
 
 
 
 
 
- 
- 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.event.ListSelectionListener,- javax.swing.RootPaneContainer,- javax.swing.WindowConstants
 
 public class JDialogSIFT extends JDialogScriptableBase implements AlgorithmInterface, javax.swing.event.ListSelectionListener Dialog to get user input, then call the algorithm.- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBaseJDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKAction
 - 
Nested classes/interfaces inherited from class javax.swing.JDialogjavax.swing.JDialog.AccessibleJDialog
 - 
Nested classes/interfaces inherited from class java.awt.Dialogjava.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 - 
Nested classes/interfaces inherited from class java.awt.Windowjava.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
 
- 
 - 
Field SummaryFields Modifier and Type Field Description private booleanchangeRemoveIndexprivate javax.swing.JButtonchooserButtonprivate java.lang.Stringdescriptorargprivate doubleedge_threshprivate java.lang.String[]fileDirprivate java.lang.String[]fileNameprivate booleanforce_orientationsprivate java.lang.Stringframesargprivate java.lang.Stringgssargprivate javax.swing.JListimageListprivate javax.swing.JPanelimagePanelprivate javax.swing.JLabellabelEdgeThreshprivate javax.swing.JLabellabelFirstOctaveprivate javax.swing.JLabellabelMagnificationprivate javax.swing.JLabellabelNLevelsprivate javax.swing.JLabellabelNOctavesprivate javax.swing.JLabellabelNormThreshprivate javax.swing.JLabellabelPeakThreshprivate javax.swing.JLabellabelRegisterprivate javax.swing.JLabellabelWindowSizeprivate doublemagnifprivate java.lang.Stringmetaargprivate javax.swing.DefaultListModel<java.lang.String>modelprivate booleanmosaicprivate javax.swing.JCheckBoxmosaicCheckBoxprivate doublenorm_threshprivate intOprivate intominprivate javax.swing.JCheckBoxorientationsCheckBoxprivate java.lang.Stringoutargprivate javax.swing.JPanelparamPanelprivate doublepeak_threshprivate java.lang.Stringread_framesargprivate booleanreadFramesprivate javax.swing.JCheckBoxreadFramesCheckBoxprivate javax.swing.JButtonremoveButtonprivate intremoveIndexprivate intSprivate java.lang.StringselectedDirectoryprivate java.lang.StringselectedFileNameprivate static longserialVersionUIDUse serialVersionUID for interoperability.private SIFTSIFTAlgoprivate intsrcNumberprivate java.lang.String[]tempFileDirprivate java.lang.String[]tempFileNameprivate javax.swing.JTextFieldtextEdgeThreshprivate javax.swing.JTextFieldtextFirstOctaveprivate javax.swing.JTextFieldtextMagnificationprivate javax.swing.JTextFieldtextNLevelsprivate javax.swing.JTextFieldtextNOctavesprivate javax.swing.JTextFieldtextNormThreshprivate javax.swing.JTextFieldtextPeakThreshprivate javax.swing.JTextFieldtextWindowSize(package private) ViewUserInterfaceuserInterfaceprivate booleanverboseprivate javax.swing.JCheckBoxverboseCheckBoxprivate doublewindow_sizeprivate booleanwriteDescriptorprivate javax.swing.JCheckBoxwriteDescriptorCheckBoxprivate booleanwriteFramesprivate javax.swing.JCheckBoxwriteFramesCheckBoxprivate booleanwriteGssprivate javax.swing.JCheckBoxwriteGssCheckBoxprivate booleanwriteMetaprivate javax.swing.JCheckBoxwriteMetaCheckBox- 
Fields inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBasedisplayInNewFrame, isComplete, scriptParameters
 - 
Fields inherited from class gov.nih.mipav.view.dialogs.JDialogBaseapplyButton, bar, cancelButton, cancelFlag, closeButton, HELP, helpButton, mainDialogPanel, NEW, OKButton, parentFrame, progressBar, REPLACE, runInSeparateThread, runningScriptFlag, runQuiet, serif12, serif12B, voiManager
 - 
Fields inherited from class javax.swing.JDialogaccessibleContext, rootPane, rootPaneCheckingEnabled
 - 
Fields inherited from class java.awt.ComponentBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
- 
 - 
Constructor SummaryConstructors Constructor Description JDialogSIFT()Empty constructor needed for dynamic instantiation (used during scripting).JDialogSIFT(java.awt.Frame theParentFrame, ModelImage im)Creates a new JDialogMSFuzzyCMeans object.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent event)Closes dialog box when the OK button is pressed and calls the algorithm.voidalgorithmPerformed(AlgorithmBase algorithm)This method is required if the AlgorithmPerformed interface is implemented.protected voidcallAlgorithm()Starts the algorithm.private javax.swing.filechooser.FileFiltergetFileFilter(javax.swing.JFileChooser chooser, int index)A private helper function to get the current used FileFilter from JFileChooser.private voidinit()Sets up the GUI (panels, buttons, etc) and displays it on the screen.private voidselectFileName()Open an image based on the suffix of the file.protected voidsetGUIFromParams()Set the dialog GUI using the script parameters while running this algorithm as part of a script.private booleansetVariables()protected voidstoreParamsFromGUI()Record the parameters just used to run this algorithm in a script.voidvalueChanged(javax.swing.event.ListSelectionEvent evt)Sets the remove index based on the selected index in the list.- 
Methods inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBasedoPostAlgorithmActions, getDialogActionString, insertScriptLine, isComplete, scriptRun, setComplete
 - 
Methods inherited from class gov.nih.mipav.view.dialogs.JDialogBasebuildApplyButton, 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.JDialogaddImpl, 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.DialogaddNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
 - 
Methods inherited from class java.awt.WindowaddPropertyChangeListener, 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.Containeradd, 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.Componentaction, 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- 
serialVersionUIDprivate static final long serialVersionUID Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
 
 - 
fileDirprivate java.lang.String[] fileDir 
 - 
fileNameprivate java.lang.String[] fileName 
 - 
selectedDirectoryprivate java.lang.String selectedDirectory 
 - 
selectedFileNameprivate java.lang.String selectedFileName 
 - 
tempFileDirprivate java.lang.String[] tempFileDir 
 - 
tempFileNameprivate java.lang.String[] tempFileName 
 - 
SIFTAlgoprivate SIFT SIFTAlgo 
 - 
verboseprivate boolean verbose 
 - 
outargprivate java.lang.String outarg 
 - 
framesargprivate java.lang.String framesarg 
 - 
descriptorargprivate java.lang.String descriptorarg 
 - 
metaargprivate java.lang.String metaarg 
 - 
read_framesargprivate java.lang.String read_framesarg 
 - 
gssargprivate java.lang.String gssarg 
 - 
Oprivate int O 
 - 
Sprivate int S 
 - 
ominprivate int omin 
 - 
edge_threshprivate double edge_thresh 
 - 
peak_threshprivate double peak_thresh 
 - 
norm_threshprivate double norm_thresh 
 - 
magnifprivate double magnif 
 - 
window_sizeprivate double window_size 
 - 
force_orientationsprivate boolean force_orientations 
 - 
writeFramesprivate boolean writeFrames 
 - 
readFramesprivate boolean readFrames 
 - 
writeDescriptorprivate boolean writeDescriptor 
 - 
writeMetaprivate boolean writeMeta 
 - 
writeGssprivate boolean writeGss 
 - 
mosaicprivate boolean mosaic 
 - 
changeRemoveIndexprivate boolean changeRemoveIndex 
 - 
removeButtonprivate javax.swing.JButton removeButton 
 - 
removeIndexprivate int removeIndex 
 - 
srcNumberprivate int srcNumber 
 - 
modelprivate javax.swing.DefaultListModel<java.lang.String> model 
 - 
labelRegisterprivate javax.swing.JLabel labelRegister 
 - 
imageListprivate javax.swing.JList imageList 
 - 
imagePanelprivate javax.swing.JPanel imagePanel 
 - 
chooserButtonprivate javax.swing.JButton chooserButton 
 - 
paramPanelprivate javax.swing.JPanel paramPanel 
 - 
userInterfaceViewUserInterface userInterface 
 - 
labelNOctavesprivate javax.swing.JLabel labelNOctaves 
 - 
textNOctavesprivate javax.swing.JTextField textNOctaves 
 - 
labelNLevelsprivate javax.swing.JLabel labelNLevels 
 - 
textNLevelsprivate javax.swing.JTextField textNLevels 
 - 
labelFirstOctaveprivate javax.swing.JLabel labelFirstOctave 
 - 
textFirstOctaveprivate javax.swing.JTextField textFirstOctave 
 - 
labelEdgeThreshprivate javax.swing.JLabel labelEdgeThresh 
 - 
textEdgeThreshprivate javax.swing.JTextField textEdgeThresh 
 - 
labelPeakThreshprivate javax.swing.JLabel labelPeakThresh 
 - 
textPeakThreshprivate javax.swing.JTextField textPeakThresh 
 - 
labelNormThreshprivate javax.swing.JLabel labelNormThresh 
 - 
textNormThreshprivate javax.swing.JTextField textNormThresh 
 - 
labelMagnificationprivate javax.swing.JLabel labelMagnification 
 - 
textMagnificationprivate javax.swing.JTextField textMagnification 
 - 
labelWindowSizeprivate javax.swing.JLabel labelWindowSize 
 - 
textWindowSizeprivate javax.swing.JTextField textWindowSize 
 - 
orientationsCheckBoxprivate javax.swing.JCheckBox orientationsCheckBox 
 - 
verboseCheckBoxprivate javax.swing.JCheckBox verboseCheckBox 
 - 
writeFramesCheckBoxprivate javax.swing.JCheckBox writeFramesCheckBox 
 - 
readFramesCheckBoxprivate javax.swing.JCheckBox readFramesCheckBox 
 - 
writeDescriptorCheckBoxprivate javax.swing.JCheckBox writeDescriptorCheckBox 
 - 
writeMetaCheckBoxprivate javax.swing.JCheckBox writeMetaCheckBox 
 - 
writeGssCheckBoxprivate javax.swing.JCheckBox writeGssCheckBox 
 - 
mosaicCheckBoxprivate javax.swing.JCheckBox mosaicCheckBox 
 
- 
 - 
Constructor Detail- 
JDialogSIFTpublic JDialogSIFT() Empty constructor needed for dynamic instantiation (used during scripting).
 - 
JDialogSIFTpublic JDialogSIFT(java.awt.Frame theParentFrame, ModelImage im)Creates a new JDialogMSFuzzyCMeans object.- Parameters:
- theParentFrame- parent frame
- im- source image
 
 
- 
 - 
Method Detail- 
initprivate void init() Sets up the GUI (panels, buttons, etc) and displays it on the screen.
 - 
actionPerformedpublic void actionPerformed(java.awt.event.ActionEvent event) Closes dialog box when the OK button is pressed and calls the algorithm.- Specified by:
- actionPerformedin interface- java.awt.event.ActionListener
- Overrides:
- actionPerformedin class- JDialogBase
- Parameters:
- event- Event that triggers function.
 
 - 
selectFileNameprivate void selectFileName() Open an image based on the suffix of the file.
 - 
getFileFilterprivate javax.swing.filechooser.FileFilter getFileFilter(javax.swing.JFileChooser chooser, int index)A private helper function to get the current used FileFilter from JFileChooser.- Parameters:
- chooser- DOCUMENT ME!
- index- the index of the choosable file filters.
- Returns:
- the current used file filter.
 
 - 
valueChangedpublic void valueChanged(javax.swing.event.ListSelectionEvent evt) Sets the remove index based on the selected index in the list.- Specified by:
- valueChangedin interface- javax.swing.event.ListSelectionListener
- Parameters:
- evt- Event that caused this method to fire.
 
 - 
callAlgorithmprotected void callAlgorithm() Description copied from class:JDialogScriptableBaseStarts the algorithm. Already exists in most algorithm dialogs. Should be called during scripted execution and regular operation.- Specified by:
- callAlgorithmin class- JDialogScriptableBase
 
 - 
algorithmPerformedpublic void algorithmPerformed(AlgorithmBase algorithm) This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithms when it has completed or failed to to complete, so that the dialog can be display the result image and/or clean up.- Specified by:
- algorithmPerformedin interface- AlgorithmInterface
- Parameters:
- algorithm- Algorithm that caused the event.
 
 - 
setVariablesprivate boolean setVariables() 
 - 
setGUIFromParamsprotected void setGUIFromParams() Description copied from class:JDialogScriptableBaseSet the dialog GUI using the script parameters while running this algorithm as part of a script.- Specified by:
- setGUIFromParamsin class- JDialogScriptableBase
 
 - 
storeParamsFromGUIprotected void storeParamsFromGUI() throws ParserExceptionDescription copied from class:JDialogScriptableBaseRecord the parameters just used to run this algorithm in a script.- Specified by:
- storeParamsFromGUIin class- JDialogScriptableBase
- Throws:
- ParserException- If there is a problem creating/recording the new parameters.
 
 
- 
 
-