Package gov.nih.mipav.view.dialogs
Class JDialogWinLevel
- 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.JDialogWinLevel
-
- All Implemented Interfaces:
DialogDefaultsInterface
,java.awt.event.ActionListener
,java.awt.event.FocusListener
,java.awt.event.ItemListener
,java.awt.event.KeyListener
,java.awt.event.MouseListener
,java.awt.event.WindowListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.ChangeListener
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public class JDialogWinLevel extends JDialogBase implements javax.swing.event.ChangeListener, java.awt.event.KeyListener, java.awt.event.MouseListener
Dialog creates 2 sliders which adjust the level and window of an image. The level is found at the x coordinate of the mid point of the sloping transfer segment. The window is the x width of the sloping transfer segment. Note y inversion in transfer segment because graphical origin is in upper left corner.________ / 255 ^ / | / | / | / <------- Transfer function | / L | / U | / T | / | / | / |______/ 0 |________________________________> | | | minImage | level | maxImage | | st win end win
Image intensity
- Author:
- senseneyj
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKAction
-
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
-
-
Field Summary
Fields Modifier and Type Field Description private int
allowChangesMinMax
allow changes to the min and max boundaries *private int
allowChangesWin
allow changes to the window and level boundaries *private javax.swing.JButton
closeButton
DOCUMENT ME!private float[]
dataSlice
Reference to the image data of the slice presently displayed.private ModelImage
image
Reference to the image that will be affected by the adjust of the window and level.static int
IMAGE_A
DOCUMENT ME!static int
IMAGE_B
DOCUMENT ME!boolean
keyTyped
private float
level
Average of the min and max extents of the transfer window that describes the window size.float
levelMaxFloat
the maxes and mins for window and level *float
levelMinFloat
the maxes and mins for window and level *javax.swing.JSlider
levelSlider
DOCUMENT ME!private int
levelSliderMax
Stores the maximum slider value.private javax.swing.JTextField
levelValTextField
textfield inputs for window and level *private javax.swing.JButton
loadButton
DOCUMENT ME!private ModelLUT
LUT
Reference to the LUT used to display the image.private float
max
private float
maxImage
Image's maximum intensity.javax.swing.JSlider
maxSlider
DOCUMENT ME!private javax.swing.JTextField
maxValTextField
textfield inputs for window and level *private float
min
private float
minImage
Image's minimum intensity.float
minMaxBInt
b intercept for mapping of min/max sliders *private javax.swing.JPanel
minMaxPanel
DOCUMENT ME!float
minMaxSlope
slope for mapping of min/max sliders *javax.swing.JSlider
minSlider
DOCUMENT ME!private javax.swing.JTextField
minValTextField
textfield inputs for window and level *private javax.swing.JButton
saveButton
DOCUMENT ME!private static long
serialVersionUID
Use serialVersionUID for interoperability.private javax.swing.JLabel
sliderLevMax
private javax.swing.JLabel
sliderLevMin
private javax.swing.JLabel
sliderMaxMax
labels at top and bottom of sliders indicating slider bounds *private javax.swing.JLabel
sliderMaxMin
labels at top and bottom of sliders indicating slider bounds *private javax.swing.JLabel
sliderMinMax
labels at top and bottom of sliders indicating slider bounds *private javax.swing.JLabel
sliderMinMin
labels at top and bottom of sliders indicating slider bounds *private javax.swing.JLabel
sliderWinMax
private javax.swing.JLabel
sliderWinMin
javax.swing.JTabbedPane
tabbedPane
tabbed pane for w/L and min/max *private float
window
The size of the window.private javax.swing.JPanel
windowLevelPanel
DOCUMENT ME!javax.swing.JSlider
windowSlider
DOCUMENT ME!private int
windowSliderMax
Stores the minimum slider value.float
winMaxFloat
the maxes and mins for window and level *float
winMinFloat
the maxes and mins for window and level *private javax.swing.JTextField
winValTextField
textfield inputs for window and level *private float[]
x
Three arrays to save the coordinates of the LUT's transfer fucntion. z[] not used.private float[]
y
DOCUMENT ME!private float[]
z
DOCUMENT ME!-
Fields inherited from class gov.nih.mipav.view.dialogs.JDialogBase
applyButton, bar, cancelButton, cancelFlag, HELP, helpButton, mainDialogPanel, NEW, OKButton, parentFrame, progressBar, REPLACE, runInSeparateThread, runningScriptFlag, runQuiet, serif12, serif12B, voiManager
-
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description JDialogWinLevel(ModelImage image, ModelLUT LUT, boolean plugIn)
Constructor.JDialogWinLevel(java.awt.Frame theParentFrame, ModelImage image, ModelLUT LUT)
Constructor.JDialogWinLevel(java.awt.Frame theParentFrame, ModelImage image, ModelLUT LUT, float[] dataS)
Constructor.
-
Method Summary
All Methods Static 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.private void
buildButtons(java.awt.GridBagConstraints gbc)
Builds the close button.private void
buildLevelSlider(javax.swing.JPanel spanel, java.awt.GridBagConstraints gbc)
Builds the level slider and places it in the slider panel.private void
buildMaxSlider(javax.swing.JPanel spanel, java.awt.GridBagConstraints gbc)
private javax.swing.JPanel
buildMinMaxPanel()
private void
buildMinSlider(javax.swing.JPanel spanel, java.awt.GridBagConstraints gbc)
Builds the min slider and places it in the slider panel.private javax.swing.JPanel
buildWindowLevelPanel()
Builds the slider Panel.private void
buildWindowSlider(javax.swing.JPanel spanel, java.awt.GridBagConstraints gbc)
Builds the window slider and places it in the slider panel.private static int
calcLevelSliderMax(ModelImage img)
private void
calcMinMax()
Calculate the maximum and minimum valuse to setup the window and level sliders.static float[]
calcMinMax(ModelImage img)
Calculate the image range bounds for transfer function determination.private static float
calcMinMaxSlope(ModelImage img)
private static int
calcWindowSliderMax(ModelImage img)
static void
calcWinLevTransferFunction(ModelImage img, float win, float lev, float[] tfx, float[] tfy)
Calculate the x and y components of the transfer function, given the active image and the desired window and level.private void
changeBounds(float left, float right, boolean levWin)
overrides and expands the min/max and or the window/level boundaries of an image based on the transfer function being appliedModelLUT
getLUT()
float
getMax()
float
getMin()
javax.swing.JTabbedPane
getTabbedPane()
float
getWinMax()
void
keyPressed(java.awt.event.KeyEvent arg0)
void
keyReleased(java.awt.event.KeyEvent arg0)
void
keyTyped(java.awt.event.KeyEvent event)
key typedvoid
locateDialog()
Setting location of window-level adjustment panel based on the amount of space available near the image window.void
mouseClicked(java.awt.event.MouseEvent e)
void
mouseEntered(java.awt.event.MouseEvent e)
void
mouseExited(java.awt.event.MouseEvent e)
void
mousePressed(java.awt.event.MouseEvent e)
void
mouseReleased(java.awt.event.MouseEvent e)
void
notifyImageDisplayListeners()
void
setVisible(boolean vis)
Overides the super.setVisible(boolean b) (which also locates a panel in the center of the screen), to use the super.setVisibleStandard(boolean b) which merely displays the Swing object onscreen.void
setWinLevel(int windowValue, int levelValue)
void
stateChanged(javax.swing.event.ChangeEvent e)
Sets values based on knob along slider.private void
updateHistoLUTFrame()
Displays histoLUT frame for a gray scale image.void
updateSliders(int min, int max)
Update the window, level sliders from CTPreset dialog.static float
validateCurrentNum(java.lang.String numString, float min, float max)
validate current numberstatic boolean
validateMinMaxNums(ModelImage img, java.lang.String minString, java.lang.String maxString)
-
Methods 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, 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.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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
IMAGE_A
public static final int IMAGE_A
DOCUMENT ME!- See Also:
- Constant Field Values
-
IMAGE_B
public static final int IMAGE_B
DOCUMENT ME!- See Also:
- Constant Field Values
-
closeButton
private javax.swing.JButton closeButton
DOCUMENT ME!
-
saveButton
private javax.swing.JButton saveButton
DOCUMENT ME!
-
loadButton
private javax.swing.JButton loadButton
DOCUMENT ME!
-
dataSlice
private final float[] dataSlice
Reference to the image data of the slice presently displayed. Needed to calculate the max/min of the slice used to adjust the transfer function.
-
image
private final ModelImage image
Reference to the image that will be affected by the adjust of the window and level.
-
level
private float level
Average of the min and max extents of the transfer window that describes the window size.
-
min
private float min
-
max
private float max
-
levelSlider
public javax.swing.JSlider levelSlider
DOCUMENT ME!
-
minSlider
public javax.swing.JSlider minSlider
DOCUMENT ME!
-
levelSliderMax
private int levelSliderMax
Stores the maximum slider value.
-
LUT
private final ModelLUT LUT
Reference to the LUT used to display the image.
-
maxImage
private float maxImage
Image's maximum intensity.
-
minImage
private float minImage
Image's minimum intensity.
-
windowLevelPanel
private final javax.swing.JPanel windowLevelPanel
DOCUMENT ME!
-
minMaxPanel
private final javax.swing.JPanel minMaxPanel
DOCUMENT ME!
-
window
private float window
The size of the window.
-
windowSlider
public javax.swing.JSlider windowSlider
DOCUMENT ME!
-
maxSlider
public javax.swing.JSlider maxSlider
DOCUMENT ME!
-
windowSliderMax
private int windowSliderMax
Stores the minimum slider value.
-
winValTextField
private javax.swing.JTextField winValTextField
textfield inputs for window and level *
-
levelValTextField
private javax.swing.JTextField levelValTextField
textfield inputs for window and level *
-
minValTextField
private javax.swing.JTextField minValTextField
textfield inputs for window and level *
-
maxValTextField
private javax.swing.JTextField maxValTextField
textfield inputs for window and level *
-
winMaxFloat
public float winMaxFloat
the maxes and mins for window and level *
-
winMinFloat
public float winMinFloat
the maxes and mins for window and level *
-
levelMaxFloat
public float levelMaxFloat
the maxes and mins for window and level *
-
levelMinFloat
public float levelMinFloat
the maxes and mins for window and level *
-
x
private final float[] x
Three arrays to save the coordinates of the LUT's transfer fucntion. z[] not used.
-
y
private final float[] y
DOCUMENT ME!
-
z
private final float[] z
DOCUMENT ME!
-
tabbedPane
public javax.swing.JTabbedPane tabbedPane
tabbed pane for w/L and min/max *
-
minMaxSlope
public float minMaxSlope
slope for mapping of min/max sliders *
-
minMaxBInt
public float minMaxBInt
b intercept for mapping of min/max sliders *
-
keyTyped
public boolean keyTyped
-
allowChangesWin
private int allowChangesWin
allow changes to the window and level boundaries *
-
allowChangesMinMax
private int allowChangesMinMax
allow changes to the min and max boundaries *
-
sliderMinMax
private javax.swing.JLabel sliderMinMax
labels at top and bottom of sliders indicating slider bounds *
-
sliderMinMin
private javax.swing.JLabel sliderMinMin
labels at top and bottom of sliders indicating slider bounds *
-
sliderMaxMax
private javax.swing.JLabel sliderMaxMax
labels at top and bottom of sliders indicating slider bounds *
-
sliderMaxMin
private javax.swing.JLabel sliderMaxMin
labels at top and bottom of sliders indicating slider bounds *
-
sliderWinMin
private javax.swing.JLabel sliderWinMin
-
sliderWinMax
private javax.swing.JLabel sliderWinMax
-
sliderLevMin
private javax.swing.JLabel sliderLevMin
-
sliderLevMax
private javax.swing.JLabel sliderLevMax
-
-
Constructor Detail
-
JDialogWinLevel
public JDialogWinLevel(java.awt.Frame theParentFrame, ModelImage image, ModelLUT LUT)
Constructor.- Parameters:
theParentFrame
- parent frameimage
- source imageLUT
- DOCUMENT ME!
-
JDialogWinLevel
public JDialogWinLevel(ModelImage image, ModelLUT LUT, boolean plugIn)
Constructor.- Parameters:
theParentFrame
- parent frameimage
- source imageLUT
- DOCUMENT ME!
-
JDialogWinLevel
public JDialogWinLevel(java.awt.Frame theParentFrame, ModelImage image, ModelLUT LUT, float[] dataS)
Constructor.- Parameters:
theParentFrame
- parent frameimage
- source imageLUT
- DOCUMENT ME!
-
-
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 interfacejava.awt.event.ActionListener
- Overrides:
actionPerformed
in classJDialogBase
- Parameters:
event
- event that triggers function
-
changeBounds
private void changeBounds(float left, float right, boolean levWin)
overrides and expands the min/max and or the window/level boundaries of an image based on the transfer function being applied
-
locateDialog
public void locateDialog()
Setting location of window-level adjustment panel based on the amount of space available near the image window.
-
setVisible
public void setVisible(boolean vis)
Overides the super.setVisible(boolean b) (which also locates a panel in the center of the screen), to use the super.setVisibleStandard(boolean b) which merely displays the Swing object onscreen. (as if it super.super.setVisible(boolean b) could be called) when the property in MipavProps "BoundWindowLevel" isfalse
or when there is no property. The window/level dialog is "free." When there is "BoundWindowLevel" and when it istrue
, the window/level dialog will get relocated to next to the image window and then redrawn.- Overrides:
setVisible
in classJDialogBase
- Parameters:
vis
- Flag indicating if the dialog should be visible.- See Also:
gov.nih.mipav.view.JDialogBase#setVisible(boolean)
,gov.nih.mipav.view.JDialogBase#setVisibleStandard(boolean)
,locateDialog()
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
Sets values based on knob along slider.- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Parameters:
e
- event that triggered this function
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent event)
key typed- Specified by:
keyTyped
in interfacejava.awt.event.KeyListener
-
updateSliders
public void updateSliders(int min, int max)
Update the window, level sliders from CTPreset dialog.- Parameters:
min
- min valuemax
- max value
-
buildButtons
private void buildButtons(java.awt.GridBagConstraints gbc)
Builds the close button.- Parameters:
gbc
- DOCUMENT ME!
-
buildLevelSlider
private void buildLevelSlider(javax.swing.JPanel spanel, java.awt.GridBagConstraints gbc)
Builds the level slider and places it in the slider panel.- Parameters:
spanel
- DOCUMENT ME!gbc
- DOCUMENT ME!
-
buildMinSlider
private void buildMinSlider(javax.swing.JPanel spanel, java.awt.GridBagConstraints gbc)
Builds the min slider and places it in the slider panel.- Parameters:
spanel
- DOCUMENT ME!gbc
- DOCUMENT ME!
-
buildMaxSlider
private void buildMaxSlider(javax.swing.JPanel spanel, java.awt.GridBagConstraints gbc)
-
buildWindowLevelPanel
private javax.swing.JPanel buildWindowLevelPanel()
Builds the slider Panel.- Parameters:
borderTitle
- the title of the border.- Returns:
- DOCUMENT ME!
-
buildMinMaxPanel
private javax.swing.JPanel buildMinMaxPanel()
-
buildWindowSlider
private void buildWindowSlider(javax.swing.JPanel spanel, java.awt.GridBagConstraints gbc)
Builds the window slider and places it in the slider panel.- Parameters:
spanel
- DOCUMENT ME!gbc
- DOCUMENT ME!
-
validateCurrentNum
public static final float validateCurrentNum(java.lang.String numString, float min, float max)
validate current number- Parameters:
numString
-min
-max
-- Returns:
-
validateMinMaxNums
public static final boolean validateMinMaxNums(ModelImage img, java.lang.String minString, java.lang.String maxString)
-
updateHistoLUTFrame
private void updateHistoLUTFrame()
Displays histoLUT frame for a gray scale image.
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent arg0)
- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent arg0)
- Specified by:
keyReleased
in interfacejava.awt.event.KeyListener
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
-
notifyImageDisplayListeners
public void notifyImageDisplayListeners()
-
calcWinLevTransferFunction
public static final void calcWinLevTransferFunction(ModelImage img, float win, float lev, float[] tfx, float[] tfy)
Calculate the x and y components of the transfer function, given the active image and the desired window and level.- Parameters:
img
- The active image.win
- The desired window.lev
- The desired level.tfx
- The array in which the x components of the transfer function will be placed. Should already be allocated and of size 4.tfy
- The array in which the y components of the transfer function will be placed. Should already be allocated and of size 4.
-
calcMinMax
public static final float[] calcMinMax(ModelImage img)
Calculate the image range bounds for transfer function determination.- Parameters:
img
- The active image.- Returns:
- An array containing the minimum value of the range in the 0th index and the maximum in the 1st index.
-
calcLevelSliderMax
private static final int calcLevelSliderMax(ModelImage img)
-
calcWindowSliderMax
private static final int calcWindowSliderMax(ModelImage img)
-
calcMinMaxSlope
private static final float calcMinMaxSlope(ModelImage img)
-
calcMinMax
private void calcMinMax()
Calculate the maximum and minimum valuse to setup the window and level sliders.
-
getMin
public float getMin()
-
getMax
public float getMax()
-
getWinMax
public float getWinMax()
-
getTabbedPane
public javax.swing.JTabbedPane getTabbedPane()
-
getLUT
public ModelLUT getLUT()
-
setWinLevel
public void setWinLevel(int windowValue, int levelValue)
-
-