HiRISE

HiRISE.HiPlan.HOGG
Class LUT_Selector_Dialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by HiRISE.HiPlan.HOGG.LUT_Selector_Dialog
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener, RootPaneContainer, WindowConstants

public class LUT_Selector_Dialog
extends JDialog
implements ActionListener, ChangeListener

A a dialog for picking LUTs for each of the 14 HiRISE CCDs.

To use this, first instantiate it. Then use the showDialog methods to display it. Their return value will indicate how it was dismissed.

NOTE: This version of LUT Selector is out-dated and unused; it remains a component of the HOGG for backwards compatability.

Version:
2.28
Author:
Christian Schaller - UA/PIRL
See Also:
Serialized Form

Nested Class Summary
protected static class LUT_Selector_Dialog.CCD_Brief
           
protected static class LUT_Selector_Dialog.CCD_Brief_Set
           
static class LUT_Selector_Dialog.Manual_Inputs
           
 
Nested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static String ABOUT_IMAGE_FILENAME
          The name of the image file containing the About box image.
static String CCD_INVERSE_GAIN
          The name of the PVL parameter for the CCD's inverse gain.
static String CCD_OFFSET
          The name of the PVL parameter for the CCD's offset.
static String DEFAULT_CONFIGURATION_TITLE
          The default title for the configuration dialog window.
static String DEFAULT_TITLE
          The default title for the dialog window.
static String FORCE_WIDE_DIALOG_PROPERTY
          The boolean system property that determines whether LUT Selector should be forced into wide mode.
static String HIST_14BIT_MAXIMUM
          The name of the PVL parameter for the CCD's 14-bit maximum.
static String HIST_14BIT_MEAN
          The name of the PVL parameter for the CCD's 14-bit mean.
static String HIST_14BIT_MINIMUM
          The name of the PVL parameter for the CCD's 14-bit minimum.
static String HIST_14BIT_STANDARD_DEVIATION
          The name of the PVL parameter for the CCD's 14-bit standard deviation.
static String HIST_8BIT_MAXIMUM
          The name of the PVL parameter for the CCD's 8-bit maximum.
static String HIST_8BIT_MEAN
          The name of the PVL parameter for the CCD's 8-bit mean.
static String HIST_8BIT_MINIMUM
          The name of the PVL parameter for the CCD's 8-bit minimum.
static String HIST_8BIT_STANDARD_DEVIATION
          The name of the PVL parameter for the CCD's 8-bit standard deviation.
static String ID
          Class identification name with source code version and date.
static String PARAMETER_NAME
          The name of the PVL parameter returned.
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
LUT_Selector_Dialog()
          Creates a modal LUT_Selector_Dialog.
LUT_Selector_Dialog(Component component)
          Creates a modal LUT_Selector_Dialog with an owner frame derived from the indicated component.
 
Method Summary
 void actionPerformed(ActionEvent event)
          Receives ActionEvents.
static void main(String[] args)
          Invokes a standalone test stub of the LUT selector in its own thread.
 Parameter showDialog(Component location_component, LUT_Selector_Dialog.CCD_Brief_Set ccd_brief_set, boolean[] red_high_map)
           
 Parameter showDialog(Component location_component, Parameter hiphop_data, boolean[] red_high_map)
          Displays the LUT_Selector_Dialog with the specified location component.
 Parameter showDialog(Component location_component, String title, LUT_Selector_Dialog.CCD_Brief_Set ccd_brief_set, boolean[] red_high_map)
           
 Parameter showDialog(Component location_component, String title, Parameter hiphop_data, boolean[] red_high_map)
          Displays the LUT_Selector_Dialog with the specified location component, dialog title, HIPHOP data, and red CCD data map.
 Parameter showDialog(LUT_Selector_Dialog.CCD_Brief_Set ccd_brief_set, boolean[] red_high_map)
           
 Parameter showDialog(Parameter hiphop_data, boolean[] red_high_map)
          Displays the LUT_Selector_Dialog.
 Parameter showDialog(String title, LUT_Selector_Dialog.CCD_Brief_Set ccd_brief_set, boolean[] red_high_map)
           
 Parameter showDialog(String title, Parameter hiphop_data, boolean[] red_high_map)
          Displays the LUT_Selector_Dialog with the specified title.
 void stateChanged(ChangeEvent event)
           
 
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, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, 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, transferFocusBackward, 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, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, 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, isOpaque, 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, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values

DEFAULT_TITLE

public static final String DEFAULT_TITLE
The default title for the dialog window.

See Also:
Constant Field Values

DEFAULT_CONFIGURATION_TITLE

public static final String DEFAULT_CONFIGURATION_TITLE
The default title for the configuration dialog window.

See Also:
Constant Field Values

ABOUT_IMAGE_FILENAME

public static final String ABOUT_IMAGE_FILENAME
The name of the image file containing the About box image. The class loader expects to find this file in the directory named by Constants.RESOURCES_DIRECTORY.

See Also:
Constant Field Values

PARAMETER_NAME

public static final String PARAMETER_NAME
The name of the PVL parameter returned.

See Also:
Constant Field Values

CCD_OFFSET

public static final String CCD_OFFSET
The name of the PVL parameter for the CCD's offset.

See Also:
Constant Field Values

CCD_INVERSE_GAIN

public static final String CCD_INVERSE_GAIN
The name of the PVL parameter for the CCD's inverse gain.

See Also:
Constant Field Values

HIST_14BIT_MINIMUM

public static final String HIST_14BIT_MINIMUM
The name of the PVL parameter for the CCD's 14-bit minimum.

See Also:
Constant Field Values

HIST_14BIT_MAXIMUM

public static final String HIST_14BIT_MAXIMUM
The name of the PVL parameter for the CCD's 14-bit maximum.

See Also:
Constant Field Values

HIST_14BIT_MEAN

public static final String HIST_14BIT_MEAN
The name of the PVL parameter for the CCD's 14-bit mean.

See Also:
Constant Field Values

HIST_14BIT_STANDARD_DEVIATION

public static final String HIST_14BIT_STANDARD_DEVIATION
The name of the PVL parameter for the CCD's 14-bit standard deviation.

See Also:
Constant Field Values

HIST_8BIT_MINIMUM

public static final String HIST_8BIT_MINIMUM
The name of the PVL parameter for the CCD's 8-bit minimum.

See Also:
Constant Field Values

HIST_8BIT_MAXIMUM

public static final String HIST_8BIT_MAXIMUM
The name of the PVL parameter for the CCD's 8-bit maximum.

See Also:
Constant Field Values

HIST_8BIT_MEAN

public static final String HIST_8BIT_MEAN
The name of the PVL parameter for the CCD's 8-bit mean.

See Also:
Constant Field Values

HIST_8BIT_STANDARD_DEVIATION

public static final String HIST_8BIT_STANDARD_DEVIATION
The name of the PVL parameter for the CCD's 8-bit standard deviation.

See Also:
Constant Field Values

FORCE_WIDE_DIALOG_PROPERTY

public static final String FORCE_WIDE_DIALOG_PROPERTY
The boolean system property that determines whether LUT Selector should be forced into wide mode. When "false," LUT Selector determines whether to make the layout wide instead of tall based on the height of the available screens. If "true," LUT Selector will always be in wide mode.

See Also:
Constant Field Values
Constructor Detail

LUT_Selector_Dialog

public LUT_Selector_Dialog(Component component)
Creates a modal LUT_Selector_Dialog with an owner frame derived from the indicated component. The dialog is not displayed; to do so, use one of the showDialog methods.

If component is null, a shared, hidden frame is set as the owner of the dialog.

Parameters:
component - the component that identifies the owner frame of this LUT_Selector_Dialog.

LUT_Selector_Dialog

public LUT_Selector_Dialog()
Creates a modal LUT_Selector_Dialog. A shared, hidden frame is set as the owner of the dialog. The dialog is not displayed; to do so, use one of the showDialog methods.

Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
Receives ActionEvents. This method is invoked when an action occurs within this LUT_Selector_Dialog object. This method invokes additional methods appropriate to the source of the action event.

Specified by:
actionPerformed in interface ActionListener
Parameters:
event - the action event that invoked this method.

stateChanged

public void stateChanged(ChangeEvent event)
Specified by:
stateChanged in interface ChangeListener

showDialog

public Parameter showDialog(Component location_component,
                            String title,
                            Parameter hiphop_data,
                            boolean[] red_high_map)
Displays the LUT_Selector_Dialog with the specified location component, dialog title, HIPHOP data, and red CCD data map.

If location_component is null, the dialog is centered on the screen. If title is null, DEFAULT_TITLE is used. If the hiphop_data parameter is null, demo histogram data will be generated and used instead.

The red CCD map, red_high_map, maps a red CCD to either the high-binning histogram data or the low-binning histogram data. The map, a simple array of booleans, is indexed by CCD, such that RED0 is the 0th index element of the array, RED1 is the 1st index element, RED2 is the 2nd index element, and so on. If a value is true, the corresponding red CCD is mapped to the high-binning histogram; otherwise it is mapped to the low-binning histogram.

Parameters:
location_component - the component in relation to which the dialog's location is determined.
title - the dialog's title.
hiphop_data - the PVL Parameter containing histogram data from HIPHOP.
red_high_map - the red CCD data map.
Returns:
a PVL Parameter that describes the LUT for each active CCD if the "OK" button was clicked, null otherwise.

showDialog

public Parameter showDialog(Component location_component,
                            Parameter hiphop_data,
                            boolean[] red_high_map)
Displays the LUT_Selector_Dialog with the specified location component. DEFAULT_TITLE is used for the dialog's title.

If location_component is null, the dialog is centered on the screen. If the hiphop_data parameter is null, demo histogram data will be generated and used instead.

The red CCD map, red_high_map, maps a red CCD to either the high-binning histogram data or the low-binning histogram data. The map, a simple array of booleans, is indexed by CCD, such that RED0 is the 0th index element of the array, RED1 is the 1st index element, RED2 is the 2nd index element, and so on. If a value is true, the corresponding red CCD is mapped to the high-binning histogram; otherwise it is mapped to the low-binning histogram.

Parameters:
location_component - the component in relation to which the dialog's location is determined.
hiphop_data - the PVL Parameter containing histogram data from HIPHOP.
red_high_map - the red CCD data map.
Returns:
a PVL Parameter that describes the LUT for each active CCD if the "OK" button was clicked, null otherwise.

showDialog

public Parameter showDialog(String title,
                            Parameter hiphop_data,
                            boolean[] red_high_map)
Displays the LUT_Selector_Dialog with the specified title. The dialog is centered on the screen.

If title is null, DEFAULT_TITLE is used. If the hiphop_data parameter is null, demo histogram data will be generated and used instead.

The red CCD map, red_high_map, maps a red CCD to either the high-binning histogram data or the low-binning histogram data. The map, a simple array of booleans, is indexed by CCD, such that RED0 is the 0th index element of the array, RED1 is the 1st index element, RED2 is the 2nd index element, and so on. If a value is true, the corresponding red CCD is mapped to the high-binning histogram; otherwise it is mapped to the low-binning histogram.

Parameters:
title - the dialog's title.
hiphop_data - the PVL Parameter containing histogram data from HIPHOP.
red_high_map - the red CCD data map.
Returns:
a PVL Parameter that describes the LUT for each active CCD if the "OK" button was clicked, null otherwise.

showDialog

public Parameter showDialog(Parameter hiphop_data,
                            boolean[] red_high_map)
Displays the LUT_Selector_Dialog. The dialog is centered on the screen, and DEFAULT_TITLE is used for the dialog's title.

If the hiphop_data parameter is null, demo histogram data will be generated and used instead.

The red CCD map, red_high_map, maps a red CCD to either the high-binning histogram data or the low-binning histogram data. The map, a simple array of booleans, is indexed by CCD, such that RED0 is the 0th index element of the array, RED1 is the 1st index element, RED2 is the 2nd index element, and so on. If a value is true, the corresponding red CCD is mapped to the high-binning histogram; otherwise it is mapped to the low-binning histogram.

Parameters:
hiphop_data - the PVL Parameter containing histogram data from HIPHOP.
red_high_map - the red CCD data map.
Returns:
a PVL Parameter that describes the LUT for each active CCD if the "OK" button was clicked, null otherwise.

showDialog

public Parameter showDialog(Component location_component,
                            String title,
                            LUT_Selector_Dialog.CCD_Brief_Set ccd_brief_set,
                            boolean[] red_high_map)

showDialog

public Parameter showDialog(Component location_component,
                            LUT_Selector_Dialog.CCD_Brief_Set ccd_brief_set,
                            boolean[] red_high_map)

showDialog

public Parameter showDialog(String title,
                            LUT_Selector_Dialog.CCD_Brief_Set ccd_brief_set,
                            boolean[] red_high_map)

showDialog

public Parameter showDialog(LUT_Selector_Dialog.CCD_Brief_Set ccd_brief_set,
                            boolean[] red_high_map)

main

public static void main(String[] args)
Invokes a standalone test stub of the LUT selector in its own thread.

Usage

LUT_Selector_Dialog [-wide] [-lut_set lut_set_name] [-data hiphop_transfer_data]

Options are not case-sensitive and may be reduced to their shortest unique form. Only one dash may be used.

Options

-wide
Sets the LUT selector to wide mode.
-lut_set lut_set_name
Sets the particular LUT set to use; the LUT sets are defined in the HOGG's resource directory. If not supplied, the default LUT set will be used. See Stored_LUT for details.
-data hiphop_transfer_data
Sets the HIPHOP transfer data, exported from the IDL version of HIPHOP. If not supplied, the LUT selector will be put into manual input mode.

Parameters:
args - the command-line arguments.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona