Package gov.nih.mipav.view
Class JPanelHistogram
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- gov.nih.mipav.view.JPanelHistogram
-
- All Implemented Interfaces:
HistoLUTParent,java.awt.event.ActionListener,java.awt.event.ItemListener,java.awt.event.KeyListener,java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,java.util.EventListener,javax.accessibility.Accessible,javax.swing.event.ChangeListener
public class JPanelHistogram extends javax.swing.JPanel implements java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.awt.event.ItemListener, java.awt.event.KeyListener, HistoLUTParent
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JCheckBoxblueCheckBoxcheckbox for turning on / off the blue component of the color look-up table.private JDialogCTctDialogprivate intcursorIndexActive mouse cursor index of the imageA, B and GM image A, B.private javax.swing.JCheckBoxgreenCheckBoxcheckbox for turning on / off the green component of the color look-up table.protected ModelHistogramhistogramred, green and blue histograms:protected ModelHistogramhistogramBred, green and blue histograms:protected ModelHistogramhistogramGred, green and blue histograms:protected ViewJPanelHistoLUThistoPanelhistogram panel interface.protected ModelImageimageinput imageprivate javax.swing.JTextFieldindexColorTextFdisplays the selected LUT colorprivate javax.swing.JCheckBoxinterpCheckBoxturns interpolation on/offprivate java.util.Hashtable<java.lang.Integer,javax.swing.JLabel>labelsTableprivate javax.swing.JCheckBoxlogCheckBoxturns log display on/offprotected ModelStorageBaseLUTinput LUT, either ModelLUT or ModelRGBprivate javax.swing.JSlidermouseSliderslider for small LUT changesprivate javax.swing.JLabel[]mouseSliderLabelsprivate javax.swing.JTextFieldnColorsTextFdisplays the number of colors in the LUTprivate javax.swing.JCheckBoxoneBasedLUTCheckBoxImagesets the minimum LUT value to (1,1,1)private javax.swing.JComboBoxoutputBoxenables the user to set the image output type or LUT-based image extrationprotected JFrameHistogrampanelParentcontaining parent class.private floatrangeXX range value of the imageA, B and GM imageA, B.private javax.swing.JCheckBoxredCheckBoxcheckbox for turning on / off the red component of the color look-up table.protected intscaleRangeprivate static longserialVersionUIDprivate javax.swing.JTextFieldthreshFillFdisplays the threshold fill-valueprivate javax.swing.JTextFieldthreshLowerFdisplays the threshold lower-valueprivate javax.swing.JTextFieldthreshUpperFdisplays the threshold upper-valueprotected javax.swing.JToolBartoolBarBottombottom tool barprotected javax.swing.JToolBartoolBarThresholdthreshold tool barprivate javax.swing.JCheckBoxupdateCheckBoxenables the user to set updating the display in real-time or only on mouse-releaseprivate javax.swing.JLabelvoxelVolumeLabelvolume threshold vaueprotected booleanwholeImagetrue = apply algorithm to the whole imageprivate javax.swing.JTextFieldxRangeTextprivate javax.swing.JTextFieldyRangeText-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description JPanelHistogram(ModelImage _image, ModelStorageBase _LUT, boolean _wholeImage)Creates the JPanelHistogram.JPanelHistogram(JFrameHistogram _panelParent, ModelImage _image, ModelStorageBase _LUT, boolean _wholeImage)Creates the JPanelHistogram, with the JFrameHistogram as the containing class.JPanelHistogram(JFrameHistogram _panelParent, ModelImage _image, ModelStorageBase _LUT, boolean _wholeImage, boolean _simpleLUT)Creates the JPanelHistogram, with the JFrameHistogram as the containing class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent event)protected javax.swing.JPanelbuildControlPanel(ModelImage image, boolean addAdjustment)Builds the interface panel.private static javax.swing.JToolBarbuildLUTSelectionList(java.awt.event.ActionListener listener)Build the center part of the LUT toolbar.protected javax.swing.JPanelbuildMousePanel(double range)Builds the mouse panel.protected voidbuildPanel()Method that displays the histogram and LUT and other controls to manipulate the LUT.protected voidbuildSimplePanel()protected javax.swing.JPanelbuildSimpleToolBar(ModelImage image)protected javax.swing.JPanelbuildToolBar(ModelImage image)Builds the toolbars.protected ModelHistogramcalcHistogram(ModelImage image, boolean entireFlag, int offset)Calculates histogram for the image(s).voidcalcThreshold()Calculates the thresholded image based on the parameters of the threshold transfer function.voidcalculateThreshold()Calculates the volume (for 3D images) or area (for 2D images) of the image between the two values from the upper and lower bounds text areas.voidcalculateThreshold(float lower, float upper)Calculates the volume or area of the image between the two values from the upper and lower bounds (inclusive).private voidcalculateThresholdArea(float lower, float upper)Calculates the area of the image between the two values from the upper and lower bounds (inclusive).private voidcalculateThresholdVolume(float lower, float upper)Calculates the volume of the image between the two values from the upper and lower bounds (inclusive).voidclearVoxelLabel()Resets the threshold volume and area labels.voiddisposeLocal()Removes and deletes local memory.voiddragPoint(java.awt.event.MouseEvent mouseEvent)Handle the dragging of a transfer function point.private static java.util.Vector<java.lang.String>getCustomLUTList()Creates a Vectoror LUT names representing different color look-up tables. floatgetLowerThreshold()intgetMode()floatgetUpperThreshold()booleaninterpolateImage()booleanisImageUpdate()Indicates if real-time update of the image should take place.protected static booleanisLUT1Based(ModelStorageBase LUT)returns true if the first entry in the color look-up table is (1,1,1), false otherwise.voiditemStateChanged(java.awt.event.ItemEvent event)voidkeyPressed(java.awt.event.KeyEvent arg0)voidkeyReleased(java.awt.event.KeyEvent arg0)voidkeyTyped(java.awt.event.KeyEvent event)private voidmakeLUT(ModelLUT selectedLUT, int nColors)Updates the number of colors in the LUT and updates the displays.private voidmakeLUT(ModelLUT selectedLUT, int nColors, boolean makeLUT)Updates the number of colors in the LUT and updates the displays.voidresetHistoLUT()Resets the histogram and histogram panel.voidsetAllOff()Accessor to disable the all RGB color channels button if one of the lines has moved.voidsetBlueOn(boolean isOn)Sets the blue checkbox on/off.voidsetGreenOn(boolean isOn)Sets the green checkbox on/off.voidsetImage(ModelImage newImage)voidsetLUT(ModelLUT newLUT)Replaces the LUT and builds a new LUT component.voidsetLUT(ModelStorageBase newLUT)Sets the LUT and updates the histogram panel.voidsetNColors(int value)Change the text field showing the number of colors.voidsetRangeText(float x, float y, int _index)Set the range value of the text field.voidsetRedOn(boolean isOn)Sets the red checkbox on/off.voidstateChanged(javax.swing.event.ChangeEvent event)voidupdateComponentLUT()Redraw the componentLUT.voidupdateFrames(boolean flag)Update all of the image frames that display the image this histo lut is for.voidupdateLUTPositionString(java.lang.String str)Sets the position string in the LUT text field.voidupdateRealTime(boolean updateRealTime)voidupdateThresholdFields(float lower, float upper)Method to update the threshold text fields when the lower or upper threshold changes.-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
blueCheckBox
private javax.swing.JCheckBox blueCheckBox
checkbox for turning on / off the blue component of the color look-up table.
-
ctDialog
private JDialogCT ctDialog
-
greenCheckBox
private javax.swing.JCheckBox greenCheckBox
checkbox for turning on / off the green component of the color look-up table.
-
histogram
protected ModelHistogram histogram
red, green and blue histograms:
-
histogramG
protected ModelHistogram histogramG
red, green and blue histograms:
-
histogramB
protected ModelHistogram histogramB
red, green and blue histograms:
-
histoPanel
protected ViewJPanelHistoLUT histoPanel
histogram panel interface.
-
indexColorTextF
private javax.swing.JTextField indexColorTextF
displays the selected LUT color
-
interpCheckBox
private javax.swing.JCheckBox interpCheckBox
turns interpolation on/off
-
logCheckBox
private javax.swing.JCheckBox logCheckBox
turns log display on/off
-
nColorsTextF
private javax.swing.JTextField nColorsTextF
displays the number of colors in the LUT
-
oneBasedLUTCheckBoxImage
private javax.swing.JCheckBox oneBasedLUTCheckBoxImage
sets the minimum LUT value to (1,1,1)
-
outputBox
private javax.swing.JComboBox outputBox
enables the user to set the image output type or LUT-based image extration
-
redCheckBox
private javax.swing.JCheckBox redCheckBox
checkbox for turning on / off the red component of the color look-up table.
-
threshFillF
private javax.swing.JTextField threshFillF
displays the threshold fill-value
-
threshLowerF
private javax.swing.JTextField threshLowerF
displays the threshold lower-value
-
threshUpperF
private javax.swing.JTextField threshUpperF
displays the threshold upper-value
-
toolBarBottom
protected javax.swing.JToolBar toolBarBottom
bottom tool bar
-
toolBarThreshold
protected javax.swing.JToolBar toolBarThreshold
threshold tool bar
-
updateCheckBox
private javax.swing.JCheckBox updateCheckBox
enables the user to set updating the display in real-time or only on mouse-release
-
voxelVolumeLabel
private javax.swing.JLabel voxelVolumeLabel
volume threshold vaue
-
image
protected ModelImage image
input image
-
LUT
protected ModelStorageBase LUT
input LUT, either ModelLUT or ModelRGB
-
panelParent
protected JFrameHistogram panelParent
containing parent class.
-
wholeImage
protected boolean wholeImage
true = apply algorithm to the whole image
-
cursorIndex
private int cursorIndex
Active mouse cursor index of the imageA, B and GM image A, B.
-
rangeX
private float rangeX
X range value of the imageA, B and GM imageA, B.
-
mouseSlider
private javax.swing.JSlider mouseSlider
slider for small LUT changes
-
xRangeText
private javax.swing.JTextField xRangeText
-
yRangeText
private javax.swing.JTextField yRangeText
-
scaleRange
protected int scaleRange
-
mouseSliderLabels
private javax.swing.JLabel[] mouseSliderLabels
-
labelsTable
private java.util.Hashtable<java.lang.Integer,javax.swing.JLabel> labelsTable
-
-
Constructor Detail
-
JPanelHistogram
public JPanelHistogram(JFrameHistogram _panelParent, ModelImage _image, ModelStorageBase _LUT, boolean _wholeImage)
Creates the JPanelHistogram, with the JFrameHistogram as the containing class.- Parameters:
_panelParent- parent class._image- input image._LUT- input LUT (ModelLUT or ModelRGB)._wholeImage- , when true apply the LUT to the entire image, when false apply to VOI regions only.
-
JPanelHistogram
public JPanelHistogram(ModelImage _image, ModelStorageBase _LUT, boolean _wholeImage)
Creates the JPanelHistogram.- Parameters:
_image- input image._LUT- input LUT (ModelLUT or ModelRGB)._wholeImage- , when true apply the LUT to the entire image, when false apply to VOI regions only.
-
JPanelHistogram
public JPanelHistogram(JFrameHistogram _panelParent, ModelImage _image, ModelStorageBase _LUT, boolean _wholeImage, boolean _simpleLUT)
Creates the JPanelHistogram, with the JFrameHistogram as the containing class.- Parameters:
_panelParent- parent class._image- input image._LUT- input LUT (ModelLUT or ModelRGB)._wholeImage- , when true apply the LUT to the entire image, when false apply to VOI regions only.
-
-
Method Detail
-
buildLUTSelectionList
private static final javax.swing.JToolBar buildLUTSelectionList(java.awt.event.ActionListener listener)
Build the center part of the LUT toolbar.- Parameters:
listener- The listener to attach to the created LUT selection combo box.- Returns:
- the top part of the LUT toolbar
-
getCustomLUTList
private static final java.util.Vector<java.lang.String> getCustomLUTList()
Creates a Vectoror LUT names representing different color look-up tables. - Returns:
- a Vector
or LUT names representing different color look-up tables.
-
isLUT1Based
protected static final boolean isLUT1Based(ModelStorageBase LUT)
returns true if the first entry in the color look-up table is (1,1,1), false otherwise.- Parameters:
LUT- the LUT to query, either a ModelLUT or ModelRGB- Returns:
- true if the first entry in the color look-up table is (1,1,1), false otherwise.
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
-
calcThreshold
public void calcThreshold()
Calculates the thresholded image based on the parameters of the threshold transfer function. Image A is thresholded if the selected panel is for imageA and likewise for image B.
-
calculateThreshold
public void calculateThreshold()
Calculates the volume (for 3D images) or area (for 2D images) of the image between the two values from the upper and lower bounds text areas.
-
calculateThreshold
public void calculateThreshold(float lower, float upper)Calculates the volume or area of the image between the two values from the upper and lower bounds (inclusive).- Parameters:
lower- Lower bound of the threshold (inclusive).upper- Upper bound of the threshold (inclusive).
-
clearVoxelLabel
public void clearVoxelLabel()
Resets the threshold volume and area labels.
-
disposeLocal
public void disposeLocal()
Removes and deletes local memory.
-
dragPoint
public void dragPoint(java.awt.event.MouseEvent mouseEvent)
Description copied from interface:HistoLUTParentHandle the dragging of a transfer function point.- Specified by:
dragPointin interfaceHistoLUTParent- Parameters:
mouseEvent- the point dragging event
-
getLowerThreshold
public float getLowerThreshold()
- Returns:
- the lower threshold value.
-
getMode
public int getMode()
- Returns:
- he HIstoLUTComponent mode.
-
getUpperThreshold
public float getUpperThreshold()
- Returns:
- the upper threshold value.
-
interpolateImage
public boolean interpolateImage()
- Returns:
- if the image interpolation checkbox is selected.
-
isImageUpdate
public boolean isImageUpdate()
Description copied from interface:HistoLUTParentIndicates if real-time update of the image should take place.- Specified by:
isImageUpdatein interfaceHistoLUTParent- Returns:
- if the update in real-time checkbox is selected.
-
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent event)
- Specified by:
itemStateChangedin interfacejava.awt.event.ItemListener
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent arg0)
- Specified by:
keyPressedin interfacejava.awt.event.KeyListener
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent arg0)
- Specified by:
keyReleasedin interfacejava.awt.event.KeyListener
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent event)
- Specified by:
keyTypedin interfacejava.awt.event.KeyListener
-
resetHistoLUT
public void resetHistoLUT()
Resets the histogram and histogram panel.
-
setAllOff
public void setAllOff()
Description copied from interface:HistoLUTParentAccessor to disable the all RGB color channels button if one of the lines has moved.- Specified by:
setAllOffin interfaceHistoLUTParent
-
setBlueOn
public void setBlueOn(boolean isOn)
Sets the blue checkbox on/off.- Parameters:
isOn-
-
setGreenOn
public void setGreenOn(boolean isOn)
Sets the green checkbox on/off.- Parameters:
isOn-
-
setLUT
public void setLUT(ModelLUT newLUT)
Description copied from interface:HistoLUTParentReplaces the LUT and builds a new LUT component.- Specified by:
setLUTin interfaceHistoLUTParent- Parameters:
newLUT- New LUT
-
setImage
public void setImage(ModelImage newImage)
-
setLUT
public void setLUT(ModelStorageBase newLUT)
Sets the LUT and updates the histogram panel.- Parameters:
newLUT-
-
setNColors
public void setNColors(int value)
Change the text field showing the number of colors.- Parameters:
value- the number of colors
-
setRangeText
public void setRangeText(float x, float y, int _index)Description copied from interface:HistoLUTParentSet the range value of the text field.- Specified by:
setRangeTextin interfaceHistoLUTParent- Parameters:
x- the x threshold range valuey- the y threshold range value_index- the cursor index
-
setRedOn
public void setRedOn(boolean isOn)
Sets the red checkbox on/off.- Parameters:
isOn-
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent event)
- Specified by:
stateChangedin interfacejavax.swing.event.ChangeListener
-
updateComponentLUT
public void updateComponentLUT()
Description copied from interface:HistoLUTParentRedraw the componentLUT.- Specified by:
updateComponentLUTin interfaceHistoLUTParent
-
updateFrames
public void updateFrames(boolean flag)
Description copied from interface:HistoLUTParentUpdate all of the image frames that display the image this histo lut is for.- Specified by:
updateFramesin interfaceHistoLUTParent- Parameters:
flag- this boolean indicates if the frame that displays the image should re-export the image and apply new LUT- See Also:
ModelImage.notifyImageDisplayListeners()
-
updateLUTPositionString
public void updateLUTPositionString(java.lang.String str)
Description copied from interface:HistoLUTParentSets the position string in the LUT text field.- Specified by:
updateLUTPositionStringin interfaceHistoLUTParent- Parameters:
str- the position string
-
updateRealTime
public void updateRealTime(boolean updateRealTime)
- Parameters:
updateRealTime-
-
updateThresholdFields
public void updateThresholdFields(float lower, float upper)Description copied from interface:HistoLUTParentMethod to update the threshold text fields when the lower or upper threshold changes.- Specified by:
updateThresholdFieldsin interfaceHistoLUTParent- Parameters:
lower- the lower threshold valueupper- the upper threshold value
-
buildControlPanel
protected javax.swing.JPanel buildControlPanel(ModelImage image, boolean addAdjustment)
Builds the interface panel.- Parameters:
image-addAdjustment-- Returns:
-
buildMousePanel
protected javax.swing.JPanel buildMousePanel(double range)
Builds the mouse panel.- Parameters:
range-- Returns:
-
buildPanel
protected void buildPanel()
Method that displays the histogram and LUT and other controls to manipulate the LUT. Panel for image A.- Parameters:
image- Model of imageLUT- Model of LUTentireFlag- Flag indicating if histogram should be made of entire image.
-
buildSimplePanel
protected void buildSimplePanel()
-
buildToolBar
protected javax.swing.JPanel buildToolBar(ModelImage image)
Builds the toolbars.- Parameters:
image-- Returns:
-
buildSimpleToolBar
protected javax.swing.JPanel buildSimpleToolBar(ModelImage image)
-
calcHistogram
protected ModelHistogram calcHistogram(ModelImage image, boolean entireFlag, int offset)
Calculates histogram for the image(s).- Parameters:
imageAorB- flag to indicate if histogram is to be calculated for imageA or imageB.entireFlag- if true calculate histogram for the entire image. if false uses areas defined by VOI regions.progressFlag- passed to calculateHistogram algorithm. If false progress bar is not displayed
-
calculateThresholdArea
private void calculateThresholdArea(float lower, float upper)Calculates the area of the image between the two values from the upper and lower bounds (inclusive).- Parameters:
lower- Lower bound of the threshold (inclusive).upper- Upper bound of the threshold (inclusive).
-
calculateThresholdVolume
private void calculateThresholdVolume(float lower, float upper)Calculates the volume of the image between the two values from the upper and lower bounds (inclusive).- Parameters:
lower- Lower bound of the threshold (inclusive).upper- Upper bound of the threshold (inclusive).
-
makeLUT
private void makeLUT(ModelLUT selectedLUT, int nColors)
Updates the number of colors in the LUT and updates the displays.- Parameters:
selectedLUT-nColors-
-
makeLUT
private void makeLUT(ModelLUT selectedLUT, int nColors, boolean makeLUT)
Updates the number of colors in the LUT and updates the displays.- Parameters:
selectedLUT-nColors-makeLUT-
-
-