Class ViewJFrameColocalizationRegression
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- gov.nih.mipav.view.ViewJFrameBase
-
- gov.nih.mipav.view.ViewJFrameColocalizationRegression
-
- All Implemented Interfaces:
ViewImageUpdateInterface
,java.awt.event.ActionListener
,java.awt.event.ComponentListener
,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.ChangeListener
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public class ViewJFrameColocalizationRegression extends ViewJFrameBase implements javax.swing.event.ChangeListener, java.awt.event.ItemListener
This class produces a frame surrounding a 2D histogram with a orthogonal least squares regression line and a threshold point that slides along the line. In free range mode this VOI point may be taken off the line. Optional region lines that go horizontally to the right and vertically to the top from the threshold point may be selected with the region button. Tool bar buttons are present for reset, magnify, unmagnify, for generating a histogram LUT dialog, for generating a dialog to set brightness and contrast, for switching between linear and log mode, for whether or not horizontal and vertical region lines are included, for taking the histogram frame into and out of free range mode, and for outputting statistics for each slice in a 3D image. Reset returns the sliding point to its initial position - the point on the line just above the point where the first negative or zero linear correlation coefficient is present. Magnify will double the present magnification and Unmagnify will half the present magnification. Magnifications are only powers of 2.The LUT dialog can be used to set colors and transfer functions of the LUT table used by the 2D histogram display.
The dialog box for brightness and contrast has brightness and contrast sliders, an Apply button, and a Cancel button. The brightness will add an offset ranging from -255 to 255 to every scaled red, green, and blue in the image. Contrast will multiply every original red, green, and blue value by a floating point number ranging from 0.1 to 10.0. Before apply is pressed, slider changes are only temporarily made to the currently displayed slice. If apply is pressed, these changes are permanently made to the histogram image. Pressing cancel keeps all the histogram image in its original state.
The file menu only has 1 simple function - a close ViewJFrameColocalization structure function. The help menu only has 1 simple function - an about colocalization function.
ViewJFrameColocalizationRegression is called in AlgorithmColocalizationRegression. ViewJFrameColocalizationRegression calls ViewJComponentColocalizationRegression
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
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 AlgorithmColocalizationRegression
alg
DOCUMENT ME!private int
bottomPad
DOCUMENT ME!private float[]
colocIntensity1
DOCUMENT ME!private float[]
colocIntensity2
DOCUMENT ME!private float[]
colocSize
DOCUMENT ME!private ViewJComponentColocalizationRegression
componentImage
DOCUMENT ME!private int
componentY
DOCUMENT ME!private ViewJFrameBase
controlFrame
DOCUMENT ME!private ViewControlsImage
controls
DOCUMENT ME!private java.awt.GridBagConstraints
cpGBC
DOCUMENT ME!private java.awt.GridBagLayout
cpGBL
DOCUMENT ME!private java.lang.String
dataLine1
DOCUMENT ME!private java.lang.String
dataLine2
DOCUMENT ME!private ModelImage
destImage
The image containing the 2D histogram.private boolean
doSecondIteration
DOCUMENT ME!private javax.swing.border.Border
etchedBorder
DOCUMENT ME!private int[]
extents
DOCUMENT ME!private javax.swing.JToggleButton
freeRangeButton
DOCUMENT ME!private boolean
freeRangeMode
DOCUMENT ME!private java.awt.GridBagConstraints
gbcTP
DOCUMENT ME!private boolean[]
haveFreeRangeThreshold
true for pixels with calculated freeRangeRThreshold values.private boolean[]
haveThreshold
DOCUMENT ME!private ModelImage
imageA
DOCUMENT ME!private ModelImage
imageB
DOCUMENT ME!private float[]
imageBufferDest
DOCUMENT ME!private javax.swing.JPanel
innerPanel
DOCUMENT ME!private javax.swing.JLabel
labelCurrent
DOCUMENT ME!private javax.swing.JLabel
labelCurrentColoc
private JLabel labelLineFunction;.private javax.swing.JLabel
labelCurrentIntensity1
DOCUMENT ME!private javax.swing.JLabel
labelCurrentIntensity2
DOCUMENT ME!private javax.swing.JLabel
labelLinearCorrelation
DOCUMENT ME!private javax.swing.JLabel
labelPValue
DOCUMENT ME!private int
leftPad
The spaces around the histogram bin area.private float
linearCorrelation
The linear correlation coefficient for all points with either buffer[i] >= threshold1 or secondBuffer[i] >= threshold2.private double
lineMax1
The endpoints of the line segment in (buffer,secondBuffer) values.private double
lineMax2
The endpoints of the line segment in (buffer,secondBuffer) values.private double
lineMin1
The endpoints of the line segment in (buffer,secondBuffer) values.private double
lineMin2
The endpoints of the line segment in (buffer,secondBuffer) values.private javax.swing.JToggleButton
logDisplayButton
DOCUMENT ME!private boolean
logMagDisplay
DOCUMENT ME!private ModelLUT
LUTa
DOCUMENT ME!private ModelLUT
LUTdest
The LUT for the 2D histogram.private double
max1
Minimum and maximum buffer and secondBuffer areas.private double
max2
Minimum and maximum buffer and secondBuffer areas.private ViewMenuBuilder
menuObj
DOCUMENT ME!private double
min1
Minimum and maximum buffer and secondBuffer areas.private double
min2
Minimum and maximum buffer and secondBuffer areas.private int
minimumHeight
DOCUMENT ME!private int
minimumToolBarWidth
DOCUMENT ME!private java.text.NumberFormat
nf
DOCUMENT ME!private int
nVOI
DOCUMENT ME!private float
offset
DOCUMENT ME!private javax.swing.JMenuBar
openingMenuBar
DOCUMENT ME!private int
origBrightness
DOCUMENT ME!private float
origContrast
red, green, and blue origBrightness remains constant until applyButton is pressed, restores brightness if cancelButton is pressed.private int
originalX
DOCUMENT ME!private int
originalY
DOCUMENT ME!private int[]
paintBufferDest
DOCUMENT ME!private int[]
pixBufferDest
DOCUMENT ME!private boolean
pointCalculation
DOCUMENT ME!private VOI
pointVOI
DOCUMENT ME!private javax.swing.border.Border
pressedBorder
DOCUMENT ME!private float
PValue
statistic giving the portion of images generated with randomly scrambled blocks of pixels having a linear correlation coefficient less than that of the actual image.private javax.swing.border.Border
raisedBorder
DOCUMENT ME!private boolean
regionLinesDisplay
DOCUMENT ME!private javax.swing.JToggleButton
regionLinesDisplayButton
DOCUMENT ME!private ModelRGB
RGBTA
set to give 6 digits to the right of the decimal.private int
rightPad
DOCUMENT ME!private float[]
rThreshold
The linear correlation coefficients for all pixels with values either below color1 for buffer or below a*color1 + b for secondBuffer.private double
scale1
bin1 is generated from Math.round(scale1*(buffer[i]-min1)) and bin2 is generated from Math.round(scale2*(secondBuffer[i]-min2)).private double
scale2
bin1 is generated from Math.round(scale1*(buffer[i]-min1)) and bin2 is generated from Math.round(scale2*(secondBuffer[i]-min2)).private javax.swing.JScrollPane
scrollPane
DOCUMENT ME!private int
scrollPaneSize
DOCUMENT ME!private static long
serialVersionUID
Use serialVersionUID for interoperability.private float
slope
The slope and offset of the total least squares line.private javax.swing.JPanel
statusPanel
DOCUMENT ME!private int
structureY
DOCUMENT ME!private boolean
thresholdOn1
If true, the matrix of linear correlation coefficients is taken along color 1 at unity spacings.private javax.swing.JToolBar
toolBar
DOCUMENT ME!private int
topPad
DOCUMENT ME!private javax.swing.JPanel
topPanel
and innerPanel placed in scrollPane.private boolean
useBlue
DOCUMENT ME!private boolean
useGreen
DOCUMENT ME!private boolean
useRed
DOCUMENT ME!private ViewUserInterface
userInterface
DOCUMENT ME!private ViewVOIVector
VOIs
red, green, and blue origContrast remains constant until applyButton is pressed, restores contrast if cancelButton is pressed.private int
xScreen
DOCUMENT ME!private int
yScreen
DOCUMENT ME!private float
zoom
DOCUMENT ME!-
Fields inherited from class gov.nih.mipav.view.ViewJFrameBase
absoluteGoToButton, absoluteGoToPanel, absoluteLabel, absoluteLabelVals, absolutePanel, absoluteXLabel, absoluteXTextField, absoluteYLabel, absoluteYTextField, absoluteZLabel, absoluteZTextField, alphaBlend, defaultLUTa, defaultLUTb, displayMode, IMAGE_A, IMAGE_A_B, IMAGE_B, isClosing, linkedScrolling, linkFrame, linkTriFrame, LUTb, progressBar, scannerLPS_APLabel, scannerLPS_APTextField, scannerLPS_GoToButton, scannerLPS_GoToPanel, scannerLPS_ISLabel, scannerLPS_ISTextField, scannerLPS_RLLabel, scannerLPS_RLTextField, scannerLPSLabel, scannerLPSLabelVals, scannerLPSPanel, scannerRAS_APLabel, scannerRAS_APTextField, scannerRAS_GoToButton, scannerRAS_GoToPanel, scannerRAS_ISLabel, scannerRAS_ISTextField, scannerRAS_RLLabel, scannerRAS_RLTextField, scannerRASLabel, scannerRASLabelVals, scannerRASPanel, scannerTabbedPane, tabbedPane, talGoToButton, talGoToPanel, talXLabel, talXTextField, talYLabel, talYTextField, talZLabel, talZTextField, zoomMode
-
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description ViewJFrameColocalizationRegression(AlgorithmColocalizationRegression alg, ModelImage _imageA, ModelLUT _LUTa, ModelImage _imageB, ModelLUT _LUTb, ModelRGB _RGBTA, ModelImage destImage, ViewJFrameBase controlFrame, boolean useRed, boolean useGreen, boolean useBlue, float slope, float offset, float linearCorrelation, float PValue, boolean[] haveThreshold, float[] rThreshold, float[] colocSize, float[] colocIntensity1, float[] colocIntensity2, double min1, double max1, double min2, double max2, double scale1, double scale2, double lineMin1, double lineMax1, double lineMin2, double lineMax2, boolean thresholdOn1, int leftPad, int rightPad, int bottomPad, int topPad, boolean doSecondIteration, boolean pointCalculation)
Makes a frame of the colocalization histogram.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
Calls various methods depending on the action.private void
addStatusPanel(java.awt.Component c, java.awt.GridBagConstraints gbc, int x, int y, int w, int h)
Method that adds components to the control paenl.private javax.swing.JToolBar
buildColocalizeToolBar(java.awt.event.ActionListener al)
Method to build the toolbar for the Animate frame.private void
buildMenu()
This method builds a menu which contains the option Close ColocalizationRegression.private void
buildScrollPane()
Make a scroll frame and puts an image component into it.private void
buildStatusPanel()
Panel that builds the status display panel.void
cancelBrightness()
Resets current slice's brightness and contrast to original.void
componentResized(java.awt.event.ComponentEvent event)
Resizes frame and all components.void
dispose()
Disposes of components and frame.ViewControlsImage
getControls()
Get control widgets for frame.ModelImage
getImageA()
Accessor that returns the reference to imageA.ModelImage
getImageB()
Accessor that returns the reference to imageB.void
itemStateChanged(java.awt.event.ItemEvent event)
Sets border painted or not painted depending on if the button was selected or deselected.private javax.swing.JButton
makeSeparator()
Makes a separator for the use in the toolbars.private void
modifyStatusPanel()
Panel that builds the status display panel.void
passFreeRangeArrays(boolean[] haveFreeRangeThreshold, float[] freeRangeRThreshold, float[] freeRangeColocSize, float[] freeRangeColocIntensity1, float[] freeRangeColocIntensity2)
Passes arrays needed in free range mode.void
pointCalculate()
DOCUMENT ME!void
removeControls()
Does nothing.void
setActiveImage(int active)
Does nothing.void
setAlphaBlend(int value)
Does nothing.void
setBrightness(int brightness, float contrast)
Sets the brightness and contrast of the component image.void
setControls()
Does nothing.void
setCurrentLabels(java.lang.String str1, java.lang.String str2, java.lang.String str3, java.lang.String str4)
DOCUMENT ME!void
setEnabled(boolean flag)
Does nothing.void
setImageB(ModelImage _imageB)
Does nothing.void
setLUTdest(ModelLUT LUTdest)
DOCUMENT ME!void
setNewVar(float slope, float offset, float linearCorrelation, float PValue, boolean[] haveThreshold, float[] rThreshold, float[] colocSize, float[] colocIntensity1, float[] colocIntensity2, double min1, double max1, double min2, double max2, double scale1, double scale2, double lineMin1, double lineMax1, double lineMin2, double lineMax2, boolean thresholdOn1)
Modifies a frame of the colocalization histogram after mouseRelased has indicated the contour VOI in the source image has been moved.void
setPaintBitmapSwitch(boolean paintBitmapSwitch)
Does nothing.void
setRGBTA(ModelRGB RGBT)
Sets the RGB LUT table for ARGB image A.void
setRGBTB(ModelRGB RGBT)
Sets the RGB LUT table for ARGB image B.void
setSlice(int slice)
Does nothing.void
setTimeSlice(int slice)
Does nothing.void
setTitle()
Set the title of the frame with the image name and magnification.void
stateChanged(javax.swing.event.ChangeEvent e)
Sets values based on knob along slider.protected boolean
testParameter(java.lang.String str, double minValue, double maxValue)
Tests that the entered parameter is in range.void
updateFrame(float sX, float sY)
Does nothing.boolean
updateImageExtents()
Does nothing.boolean
updateImages()
Does nothing.boolean
updateImages(boolean forceShow)
This methods calls the componentImage's update method to redraw the screen.boolean
updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode)
Does nothing.void
windowActivated(java.awt.event.WindowEvent event)
Does nothing.void
windowClosed(java.awt.event.WindowEvent event)
Does nothing.void
windowClosing(java.awt.event.WindowEvent event)
Stops thread, calls close.void
windowDeactivated(java.awt.event.WindowEvent event)
Does nothing.void
windowDeiconified(java.awt.event.WindowEvent event)
Does nothing.void
windowIconified(java.awt.event.WindowEvent event)
Does nothing.void
windowOpened(java.awt.event.WindowEvent event)
Does nothing.-
Methods inherited from class gov.nih.mipav.view.ViewJFrameBase
about, buildLabelPanel, canCloseImageBAfterLoad, close, close, closeImageB, componentHidden, componentMoved, componentShown, finalize, getAlphaBlend, getDefaultLUTa, getDefaultLUTb, getDisplayMode, getImageNameA, getImageNameB, getLastState, getLUTa, getLUTb, getRGBTA, getRGBTB, getTriImg, getUserInterface, handleMaskPopupMenu, handlePaintToMaskPopupMenu, handleZoomPopupMenu, initExtents, initImageBuffer, initLUT, initNumSlices, initPixelBuffer, initResFactor, initResolutions, initRGB, initSlicePositions, initUnits, initZoom, loadAllVOIs, loadAllVOIsFrom, loadImage, loadLUT, loadLUTandTransferFunctionFrom, loadLUTandTransferFunctionFrom, makeString, newFrameBeenCreated, openVOI, openVOI, pickImageFile, save, save, save, saveAllVOIs, saveAllVOIsTo, saveLabels, saveLUT, saveLUTandTransferFunction, saveLUTandTransferFunction, saveLUTAs, saveLUTAs, saveVOI, saveVOIAs, saveVOIAs, saveVOIIntensities, saveVOIIntensitiesTo, setAbsPositionLabels, setEnableCloseImageBAfterLoad, setImageA, setLastState, setLinkedFrame, setLinkedTriFrame, setLUTa, setLUTb, setLUTs, setMessageText, setOpacityInfo, setpaintBitmap, setScannerPosition
-
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, 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, 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, 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
-
alg
private AlgorithmColocalizationRegression alg
DOCUMENT ME!
-
bottomPad
private int bottomPad
DOCUMENT ME!
-
colocIntensity1
private float[] colocIntensity1
DOCUMENT ME!
-
colocIntensity2
private float[] colocIntensity2
DOCUMENT ME!
-
colocSize
private float[] colocSize
DOCUMENT ME!
-
componentImage
private ViewJComponentColocalizationRegression componentImage
DOCUMENT ME!
-
componentY
private int componentY
DOCUMENT ME!
-
controlFrame
private ViewJFrameBase controlFrame
DOCUMENT ME!
-
controls
private ViewControlsImage controls
DOCUMENT ME!
-
cpGBC
private java.awt.GridBagConstraints cpGBC
DOCUMENT ME!
-
cpGBL
private java.awt.GridBagLayout cpGBL
DOCUMENT ME!
-
dataLine1
private java.lang.String dataLine1
DOCUMENT ME!
-
dataLine2
private java.lang.String dataLine2
DOCUMENT ME!
-
destImage
private ModelImage destImage
The image containing the 2D histogram.
-
doSecondIteration
private boolean doSecondIteration
DOCUMENT ME!
-
etchedBorder
private javax.swing.border.Border etchedBorder
DOCUMENT ME!
-
extents
private int[] extents
DOCUMENT ME!
-
freeRangeButton
private javax.swing.JToggleButton freeRangeButton
DOCUMENT ME!
-
freeRangeMode
private boolean freeRangeMode
DOCUMENT ME!
-
gbcTP
private java.awt.GridBagConstraints gbcTP
DOCUMENT ME!
-
haveFreeRangeThreshold
private boolean[] haveFreeRangeThreshold
true for pixels with calculated freeRangeRThreshold values.
-
haveThreshold
private boolean[] haveThreshold
DOCUMENT ME!
-
imageA
private ModelImage imageA
DOCUMENT ME!
-
imageB
private ModelImage imageB
DOCUMENT ME!
-
imageBufferDest
private float[] imageBufferDest
DOCUMENT ME!
-
innerPanel
private javax.swing.JPanel innerPanel
DOCUMENT ME!
-
labelCurrent
private javax.swing.JLabel labelCurrent
DOCUMENT ME!
-
labelCurrentColoc
private javax.swing.JLabel labelCurrentColoc
private JLabel labelLineFunction;.
-
labelCurrentIntensity1
private javax.swing.JLabel labelCurrentIntensity1
DOCUMENT ME!
-
labelCurrentIntensity2
private javax.swing.JLabel labelCurrentIntensity2
DOCUMENT ME!
-
labelLinearCorrelation
private javax.swing.JLabel labelLinearCorrelation
DOCUMENT ME!
-
labelPValue
private javax.swing.JLabel labelPValue
DOCUMENT ME!
-
leftPad
private int leftPad
The spaces around the histogram bin area.
-
linearCorrelation
private float linearCorrelation
The linear correlation coefficient for all points with either buffer[i] >= threshold1 or secondBuffer[i] >= threshold2.
-
lineMin1
private double lineMin1
The endpoints of the line segment in (buffer,secondBuffer) values.
-
lineMax1
private double lineMax1
The endpoints of the line segment in (buffer,secondBuffer) values.
-
lineMin2
private double lineMin2
The endpoints of the line segment in (buffer,secondBuffer) values.
-
lineMax2
private double lineMax2
The endpoints of the line segment in (buffer,secondBuffer) values.
-
logDisplayButton
private javax.swing.JToggleButton logDisplayButton
DOCUMENT ME!
-
logMagDisplay
private boolean logMagDisplay
DOCUMENT ME!
-
LUTa
private ModelLUT LUTa
DOCUMENT ME!
-
LUTdest
private ModelLUT LUTdest
The LUT for the 2D histogram.
-
menuObj
private ViewMenuBuilder menuObj
DOCUMENT ME!
-
min1
private double min1
Minimum and maximum buffer and secondBuffer areas.
-
max1
private double max1
Minimum and maximum buffer and secondBuffer areas.
-
min2
private double min2
Minimum and maximum buffer and secondBuffer areas.
-
max2
private double max2
Minimum and maximum buffer and secondBuffer areas.
-
minimumHeight
private int minimumHeight
DOCUMENT ME!
-
minimumToolBarWidth
private int minimumToolBarWidth
DOCUMENT ME!
-
nf
private java.text.NumberFormat nf
DOCUMENT ME!
-
nVOI
private int nVOI
DOCUMENT ME!
-
offset
private float offset
DOCUMENT ME!
-
openingMenuBar
private javax.swing.JMenuBar openingMenuBar
DOCUMENT ME!
-
origBrightness
private int origBrightness
DOCUMENT ME!
-
origContrast
private float origContrast
red, green, and blue origBrightness remains constant until applyButton is pressed, restores brightness if cancelButton is pressed.
-
originalX
private int originalX
DOCUMENT ME!
-
originalY
private int originalY
DOCUMENT ME!
-
paintBufferDest
private int[] paintBufferDest
DOCUMENT ME!
-
pixBufferDest
private int[] pixBufferDest
DOCUMENT ME!
-
pointCalculation
private boolean pointCalculation
DOCUMENT ME!
-
pointVOI
private VOI pointVOI
DOCUMENT ME!
-
pressedBorder
private javax.swing.border.Border pressedBorder
DOCUMENT ME!
-
PValue
private float PValue
statistic giving the portion of images generated with randomly scrambled blocks of pixels having a linear correlation coefficient less than that of the actual image.
-
raisedBorder
private javax.swing.border.Border raisedBorder
DOCUMENT ME!
-
regionLinesDisplay
private boolean regionLinesDisplay
DOCUMENT ME!
-
regionLinesDisplayButton
private javax.swing.JToggleButton regionLinesDisplayButton
DOCUMENT ME!
-
RGBTA
private ModelRGB RGBTA
set to give 6 digits to the right of the decimal.
-
rightPad
private int rightPad
DOCUMENT ME!
-
rThreshold
private float[] rThreshold
The linear correlation coefficients for all pixels with values either below color1 for buffer or below a*color1 + b for secondBuffer.
-
scale1
private double scale1
bin1 is generated from Math.round(scale1*(buffer[i]-min1)) and bin2 is generated from Math.round(scale2*(secondBuffer[i]-min2)).
-
scale2
private double scale2
bin1 is generated from Math.round(scale1*(buffer[i]-min1)) and bin2 is generated from Math.round(scale2*(secondBuffer[i]-min2)).
-
scrollPane
private javax.swing.JScrollPane scrollPane
DOCUMENT ME!
-
scrollPaneSize
private int scrollPaneSize
DOCUMENT ME!
-
slope
private float slope
The slope and offset of the total least squares line.
-
statusPanel
private javax.swing.JPanel statusPanel
DOCUMENT ME!
-
structureY
private int structureY
DOCUMENT ME!
-
thresholdOn1
private boolean thresholdOn1
If true, the matrix of linear correlation coefficients is taken along color 1 at unity spacings. If false, along color 2.
-
toolBar
private javax.swing.JToolBar toolBar
DOCUMENT ME!
-
topPad
private int topPad
DOCUMENT ME!
-
topPanel
private javax.swing.JPanel topPanel
and innerPanel placed in scrollPane.
-
useBlue
private boolean useBlue
DOCUMENT ME!
-
useGreen
private boolean useGreen
DOCUMENT ME!
-
useRed
private boolean useRed
DOCUMENT ME!
-
userInterface
private ViewUserInterface userInterface
DOCUMENT ME!
-
VOIs
private ViewVOIVector VOIs
red, green, and blue origContrast remains constant until applyButton is pressed, restores contrast if cancelButton is pressed.
-
xScreen
private int xScreen
DOCUMENT ME!
-
yScreen
private int yScreen
DOCUMENT ME!
-
zoom
private float zoom
DOCUMENT ME!
-
-
Constructor Detail
-
ViewJFrameColocalizationRegression
public ViewJFrameColocalizationRegression(AlgorithmColocalizationRegression alg, ModelImage _imageA, ModelLUT _LUTa, ModelImage _imageB, ModelLUT _LUTb, ModelRGB _RGBTA, ModelImage destImage, ViewJFrameBase controlFrame, boolean useRed, boolean useGreen, boolean useBlue, float slope, float offset, float linearCorrelation, float PValue, boolean[] haveThreshold, float[] rThreshold, float[] colocSize, float[] colocIntensity1, float[] colocIntensity2, double min1, double max1, double min2, double max2, double scale1, double scale2, double lineMin1, double lineMax1, double lineMin2, double lineMax2, boolean thresholdOn1, int leftPad, int rightPad, int bottomPad, int topPad, boolean doSecondIteration, boolean pointCalculation)
Makes a frame of the colocalization histogram.- Parameters:
alg
- AlgorithmColocalizationRegression parent_imageA
- Model of imageA_LUTa
- Model of LUT for image A_imageB
- Model of imageB_LUTb
- Model of LUT for image B_RGBTA
- Model RGB LUT for color image (A) else nulldestImage
- The destination imagecontrolFrame
- ViewJFrameBase passed to ViewJComponentColocalizationRegressionuseRed
- DOCUMENT ME!useGreen
- DOCUMENT ME!useBlue
- DOCUMENT ME!slope
- DOCUMENT ME!offset
- DOCUMENT ME!linearCorrelation
- DOCUMENT ME!PValue
- DOCUMENT ME!haveThreshold
- DOCUMENT ME!rThreshold
- DOCUMENT ME!colocSize
- DOCUMENT ME!colocIntensity1
- DOCUMENT ME!colocIntensity2
- DOCUMENT ME!min1
- DOCUMENT ME!max1
- DOCUMENT ME!min2
- DOCUMENT ME!max2
- DOCUMENT ME!scale1
- DOCUMENT ME!scale2
- DOCUMENT ME!lineMin1
- DOCUMENT ME!lineMax1
- DOCUMENT ME!lineMin2
- DOCUMENT ME!lineMax2
- DOCUMENT ME!thresholdOn1
- DOCUMENT ME!leftPad
- DOCUMENT ME!rightPad
- DOCUMENT ME!bottomPad
- DOCUMENT ME!topPad
- DOCUMENT ME!doSecondIteration
- DOCUMENT ME!pointCalculation
- DOCUMENT ME!
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Calls various methods depending on the action.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Specified by:
actionPerformed
in classViewJFrameBase
- Parameters:
event
- event that triggered function
-
cancelBrightness
public void cancelBrightness()
Resets current slice's brightness and contrast to original.
-
componentResized
public void componentResized(java.awt.event.ComponentEvent event)
Resizes frame and all components.- Specified by:
componentResized
in interfacejava.awt.event.ComponentListener
- Overrides:
componentResized
in classViewJFrameBase
- Parameters:
event
- event that triggered function
-
dispose
public void dispose()
Disposes of components and frame.- Overrides:
dispose
in classjava.awt.Window
-
getControls
public ViewControlsImage getControls()
Get control widgets for frame.- Specified by:
getControls
in classViewJFrameBase
- Returns:
- controls
-
getImageA
public ModelImage getImageA()
Accessor that returns the reference to imageA.- Specified by:
getImageA
in classViewJFrameBase
- Returns:
- image
-
getImageB
public ModelImage getImageB()
Accessor that returns the reference to imageB.- Specified by:
getImageB
in classViewJFrameBase
- Returns:
- imageB
-
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent event)
Sets border painted or not painted depending on if the button was selected or deselected. Changes the currently selected script.- Specified by:
itemStateChanged
in interfacejava.awt.event.ItemListener
- Parameters:
event
- Event that triggered this function.
-
passFreeRangeArrays
public void passFreeRangeArrays(boolean[] haveFreeRangeThreshold, float[] freeRangeRThreshold, float[] freeRangeColocSize, float[] freeRangeColocIntensity1, float[] freeRangeColocIntensity2)
Passes arrays needed in free range mode.- Parameters:
haveFreeRangeThreshold
- DOCUMENT ME!freeRangeRThreshold
- DOCUMENT ME!freeRangeColocSize
- DOCUMENT ME!freeRangeColocIntensity1
- DOCUMENT ME!freeRangeColocIntensity2
- DOCUMENT ME!freeRangeColocIntensity2
-
-
pointCalculate
public void pointCalculate()
DOCUMENT ME!
-
removeControls
public void removeControls()
Does nothing.- Specified by:
removeControls
in classViewJFrameBase
-
setActiveImage
public void setActiveImage(int active)
Does nothing.- Specified by:
setActiveImage
in classViewJFrameBase
- Parameters:
active
- DOCUMENT ME!
-
setAlphaBlend
public void setAlphaBlend(int value)
Does nothing.- Specified by:
setAlphaBlend
in classViewJFrameBase
- Parameters:
value
- DOCUMENT ME!
-
setBrightness
public void setBrightness(int brightness, float contrast)
Sets the brightness and contrast of the component image. Set all slices to have the new brightness and contrast. Results in createImage producing an Image img[slice] for every slice.- Parameters:
brightness
- Brightness to set.contrast
- Contrast to set.
-
setControls
public void setControls()
Does nothing.- Specified by:
setControls
in classViewJFrameBase
-
setCurrentLabels
public void setCurrentLabels(java.lang.String str1, java.lang.String str2, java.lang.String str3, java.lang.String str4)
DOCUMENT ME!- Parameters:
str1
- DOCUMENT ME!str2
- DOCUMENT ME!str3
- DOCUMENT ME!str4
- DOCUMENT ME!
-
setEnabled
public void setEnabled(boolean flag)
Does nothing.- Specified by:
setEnabled
in classViewJFrameBase
- Parameters:
flag
- DOCUMENT ME!
-
setImageB
public void setImageB(ModelImage _imageB)
Does nothing.- Specified by:
setImageB
in classViewJFrameBase
- Parameters:
_imageB
- DOCUMENT ME!
-
setLUTdest
public void setLUTdest(ModelLUT LUTdest)
DOCUMENT ME!- Parameters:
LUTdest
- DOCUMENT ME!
-
setNewVar
public void setNewVar(float slope, float offset, float linearCorrelation, float PValue, boolean[] haveThreshold, float[] rThreshold, float[] colocSize, float[] colocIntensity1, float[] colocIntensity2, double min1, double max1, double min2, double max2, double scale1, double scale2, double lineMin1, double lineMax1, double lineMin2, double lineMax2, boolean thresholdOn1)
Modifies a frame of the colocalization histogram after mouseRelased has indicated the contour VOI in the source image has been moved.- Parameters:
slope
- DOCUMENT ME!offset
- DOCUMENT ME!linearCorrelation
- DOCUMENT ME!PValue
- DOCUMENT ME!haveThreshold
- DOCUMENT ME!rThreshold
- DOCUMENT ME!colocSize
- DOCUMENT ME!colocIntensity1
- DOCUMENT ME!colocIntensity2
- DOCUMENT ME!min1
- DOCUMENT ME!max1
- DOCUMENT ME!min2
- DOCUMENT ME!max2
- DOCUMENT ME!scale1
- DOCUMENT ME!scale2
- DOCUMENT ME!lineMin1
- DOCUMENT ME!lineMax1
- DOCUMENT ME!lineMin2
- DOCUMENT ME!lineMax2
- DOCUMENT ME!thresholdOn1
- DOCUMENT ME!
-
setPaintBitmapSwitch
public void setPaintBitmapSwitch(boolean paintBitmapSwitch)
Does nothing.- Specified by:
setPaintBitmapSwitch
in classViewJFrameBase
- Parameters:
paintBitmapSwitch
- DOCUMENT ME!
-
setRGBTA
public void setRGBTA(ModelRGB RGBT)
Sets the RGB LUT table for ARGB image A.- Specified by:
setRGBTA
in classViewJFrameBase
- Parameters:
RGBT
- the new RGB LUT to be applied to the image
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
Sets the RGB LUT table for ARGB image B.- Specified by:
setRGBTB
in classViewJFrameBase
- Parameters:
RGBT
- the new RGB LUT to be applied to the image
-
setSlice
public void setSlice(int slice)
Does nothing.- Specified by:
setSlice
in interfaceViewImageUpdateInterface
- Parameters:
slice
- DOCUMENT ME!
-
setTimeSlice
public void setTimeSlice(int slice)
Does nothing.- Specified by:
setTimeSlice
in interfaceViewImageUpdateInterface
- Parameters:
slice
- DOCUMENT ME!
-
setTitle
public void setTitle()
Set the title of the frame with the image name and magnification.- Specified by:
setTitle
in classViewJFrameBase
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
Sets values based on knob along slider.- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Overrides:
stateChanged
in classViewJFrameBase
- Parameters:
e
- Event that triggered this function
-
updateFrame
public void updateFrame(float sX, float sY)
Does nothing.- Parameters:
sX
- DOCUMENT ME!sY
- DOCUMENT ME!
-
updateImageExtents
public boolean updateImageExtents()
Does nothing.- Specified by:
updateImageExtents
in interfaceViewImageUpdateInterface
- Specified by:
updateImageExtents
in classViewJFrameBase
- Returns:
- DOCUMENT ME!
- See Also:
ViewImageUpdateInterface
-
updateImages
public final boolean updateImages()
Does nothing.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Returns:
- DOCUMENT ME!
-
updateImages
public final boolean updateImages(boolean forceShow)
This methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Parameters:
forceShow
- unused parameter- Returns:
- boolean confirming successful update
-
updateImages
public final boolean updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode)
Does nothing.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Parameters:
LUTa
- DOCUMENT ME!LUTb
- DOCUMENT ME!forceShow
- DOCUMENT ME!interpMode
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
windowActivated
public void windowActivated(java.awt.event.WindowEvent event)
Does nothing.- Specified by:
windowActivated
in interfacejava.awt.event.WindowListener
- Overrides:
windowActivated
in classViewJFrameBase
- Parameters:
event
- DOCUMENT ME!
-
windowClosed
public void windowClosed(java.awt.event.WindowEvent event)
Does nothing.- Specified by:
windowClosed
in interfacejava.awt.event.WindowListener
- Overrides:
windowClosed
in classViewJFrameBase
- Parameters:
event
- DOCUMENT ME!
-
windowClosing
public void windowClosing(java.awt.event.WindowEvent event)
Stops thread, calls close.- Specified by:
windowClosing
in interfacejava.awt.event.WindowListener
- Overrides:
windowClosing
in classViewJFrameBase
- Parameters:
event
- event that triggered function
-
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent event)
Does nothing.- Specified by:
windowDeactivated
in interfacejava.awt.event.WindowListener
- Overrides:
windowDeactivated
in classViewJFrameBase
- Parameters:
event
- DOCUMENT ME!
-
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent event)
Does nothing.- Specified by:
windowDeiconified
in interfacejava.awt.event.WindowListener
- Overrides:
windowDeiconified
in classViewJFrameBase
- Parameters:
event
- DOCUMENT ME!
-
windowIconified
public void windowIconified(java.awt.event.WindowEvent event)
Does nothing.- Specified by:
windowIconified
in interfacejava.awt.event.WindowListener
- Overrides:
windowIconified
in classViewJFrameBase
- Parameters:
event
- DOCUMENT ME!
-
windowOpened
public void windowOpened(java.awt.event.WindowEvent event)
Does nothing.- Specified by:
windowOpened
in interfacejava.awt.event.WindowListener
- Overrides:
windowOpened
in classViewJFrameBase
- Parameters:
event
- DOCUMENT ME!
-
testParameter
protected boolean testParameter(java.lang.String str, double minValue, double maxValue)
Tests that the entered parameter is in range.- Parameters:
str
- the value entered by the userminValue
- the minimum value this variable may be set tomaxValue
- the maximum value this variable may be set to- Returns:
- boolean result of test
-
addStatusPanel
private void addStatusPanel(java.awt.Component c, java.awt.GridBagConstraints gbc, int x, int y, int w, int h)
Method that adds components to the control paenl.- Parameters:
c
- component added to the control panelgbc
- GridBagConstraints of added componentx
- grdix locationy
- gridy locationw
- gridwidthh
- gridheight
-
buildColocalizeToolBar
private javax.swing.JToolBar buildColocalizeToolBar(java.awt.event.ActionListener al)
Method to build the toolbar for the Animate frame.- Parameters:
al
- Action listener (this frame)- Returns:
- The animation toolbar
-
buildMenu
private void buildMenu()
This method builds a menu which contains the option Close ColocalizationRegression.
-
buildScrollPane
private void buildScrollPane()
Make a scroll frame and puts an image component into it.
-
buildStatusPanel
private void buildStatusPanel()
Panel that builds the status display panel.
-
makeSeparator
private javax.swing.JButton makeSeparator()
Makes a separator for the use in the toolbars.- Returns:
- Separator button.
-
modifyStatusPanel
private void modifyStatusPanel()
Panel that builds the status display panel.
-
-