Package gov.nih.mipav.view.dialogs
Class JDialogKMeans
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.JDialogKMeans
- All Implemented Interfaces:
AlgorithmInterface,ScriptableActionInterface,DialogDefaultsInterface,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants
- 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 AlgorithmKMeanshandle to algorithmprivate ButtonGroupprivate intprivate double[]private JLabelprivate JTextFieldprivate float[]private BufferedReaderprivate static final intprivate JRadioButtonprivate JButtonprivate JButtonprivate ButtonGroupprivate booleanprivate double[][]private JRadioButtonprivate static final intprivate JRadioButtonprivate JRadioButtonprivate JCheckBoxprivate booleanprivate ButtonGroupprivate JRadioButtonprivate Stringprivate ButtonGroupprivate intprivate double[]private static final intprivate JRadioButtonprivate int[]private static final intprivate JRadioButtonprivate Stringprivate Fileprivate JCheckBoxprivate booleanprivate static final intprivate JRadioButtonprivate float[]private int[]private booleanprivate static final intprivate JRadioButtonprivate ModelImagesource image.private JComboBoxprivate ButtonGroupprivate JLabelprivate intprivate booleanboolean isMultifileprivate static final intprivate JRadioButtonprivate JRadioButtonprivate static final intprivate static final intprivate JRadioButtonprivate intprivate intprivate intprivate double[][]private static final intprivate JRadioButtonprivate float[]private ModelImageresult imageprivate Stringprivate JLabelprivate JTextFieldprivate JRadioButtonprivate static final intprivate JRadioButtonprivate double[]private doubleprivate booleanprivate JRadioButtonprivate booleanprivate static final intprivate JTextFieldprivate JTextFieldprivate JTextFieldprivate JCheckBoxprivate booleanprivate double[]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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) action performedvoidalgorithmPerformed(AlgorithmBase algorithm) algorithm performedprotected voidcall algorithmget result imageprivate voidinit()init Sets up the GUI (panels, buttons, etc) and displays it on the screen.voiditemStateChanged(ItemEvent event) item state changedprivate voidprotected voidset GUI from paramsprivate booleanprotected voidstore params from guivoidwindowClosing(WindowEvent event) window closingMethods inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
doPostAlgorithmActions, 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, 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, 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
-
RANDOM_INIT
private static final int RANDOM_INIT- See Also:
-
BRADLEY_FAYYAD_INIT
private static final int BRADLEY_FAYYAD_INIT- See Also:
-
HIERARCHICAL_GROUPING_INIT
private static final int HIERARCHICAL_GROUPING_INIT- See Also:
-
MAXMIN_INIT
private static final int MAXMIN_INIT- See Also:
-
K_MEANS
private static final int K_MEANS- See Also:
-
GLOBAL_K_MEANS
private static final int GLOBAL_K_MEANS- See Also:
-
FAST_GLOBAL_K_MEANS
private static final int FAST_GLOBAL_K_MEANS- See Also:
-
EUCLIDEAN_SQUARED
private static final int EUCLIDEAN_SQUARED- See Also:
-
CITY_BLOCK
private static final int CITY_BLOCK- See Also:
-
MAHALANOBIS_SQUARED
private static final int MAHALANOBIS_SQUARED- See Also:
-
S_METRIC
private static final int S_METRIC- See Also:
-
SPHERES_DIFFERENT_SIZES
private static final int SPHERES_DIFFERENT_SIZES- See Also:
-
image
source image. -
resultImage
result image -
alg
handle to algorithm -
isMultifile
private boolean isMultifileboolean isMultifile -
nDims
private int nDims -
extents
private int[] extents -
scale
private double[] scale -
directoryPoints
-
fileNamePoints
-
filePoints
-
br
-
nPoints
private int nPoints -
groupNum
private int[] groupNum -
pos
private double[][] pos -
weight
private double[] weight -
centroidPos
private double[][] centroidPos -
textImage
-
buttonImage
-
textPointsFile
-
buttonPointsFile
-
textClusters
-
numberClusters
private int numberClusters -
havePoints
private boolean havePoints -
resultsFileName
-
bwImageGroup
-
clusterImage
-
segmentedImage
-
colorSpaceGroup
-
RGBSpace
-
CIELABSpace
-
bwSegmentedImage
private boolean bwSegmentedImage -
showSegmentedImage
private boolean showSegmentedImage -
doubleBuffer
private double[] doubleBuffer -
algorithmGroup
-
kMeansAlgo
-
globalAlgo
-
fastGlobalAlgo
-
algoSelection
private int algoSelection -
initGroup
-
randomInit
-
BradleyInit
-
hierarchicalInit
-
maxMinInit
-
initSelection
private int initSelection -
redBuffer
private float[] redBuffer -
greenBuffer
private float[] greenBuffer -
blueBuffer
private float[] blueBuffer -
scaleMax
private double scaleMax -
colorHistogramBox
-
useColorHistogram
private boolean useColorHistogram -
initLabel
-
distanceMeasure
private int distanceMeasure -
distanceGroup
-
euclideanSquared
-
cityBlock
-
mahalanobis
-
SButton
-
differentSpheresButton
-
unitVarianceCheckBox
-
scaleVariablesToUnitVariance
private boolean scaleVariablesToUnitVariance -
resultsFileNameLabel
-
resultsFileNameText
-
axesRatioLabel
-
axesRatioText
-
axesRatio
private double[] axesRatio -
imageList
-
followBatchBox
-
followBatchWithIncremental
private boolean followBatchWithIncremental -
colorSegmentInRGB
private boolean colorSegmentInRGB
-
-
Constructor Details
-
JDialogKMeans
public JDialogKMeans()
-
-
Method Details
-
actionPerformed
action performed- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase
-
callAlgorithm
protected void callAlgorithm()call algorithm- Specified by:
callAlgorithmin classJDialogScriptableBase
-
loadImage
private void loadImage() -
algorithmPerformed
algorithm performed- Specified by:
algorithmPerformedin interfaceAlgorithmInterface- Parameters:
algorithm- the algorithm which has just completed
-
init
private void init()init Sets up the GUI (panels, buttons, etc) and displays it on the screen. -
setVariables
private boolean setVariables() -
setGUIFromParams
protected void setGUIFromParams()set GUI from params- Specified by:
setGUIFromParamsin classJDialogScriptableBase
-
storeParamsFromGUI
store params from gui- Specified by:
storeParamsFromGUIin classJDialogScriptableBase- Throws:
ParserException- If there is a problem creating/recording the new parameters.
-
getResultImage
get result image- Returns:
- The result image.
-
itemStateChanged
item state changed- Specified by:
itemStateChangedin interfaceItemListener- Overrides:
itemStateChangedin classJDialogBase- Parameters:
event- DOCUMENT ME!
-
windowClosing
window closing- Specified by:
windowClosingin interfaceWindowListener- Overrides:
windowClosingin classJDialogBase- Parameters:
event- WindowEvent
-