Package gov.nih.mipav.view
Class ViewJComponentColocalizationRegression
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- gov.nih.mipav.view.ViewJComponentBase
-
- gov.nih.mipav.view.ViewJComponentColocalizationRegression
-
- All Implemented Interfaces:
java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
public class ViewJComponentColocalizationRegression extends ViewJComponentBase implements java.awt.event.MouseMotionListener, java.awt.event.MouseListener
DOCUMENT ME!- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private AlgorithmColocalizationRegression
alg
DOCUMENT ME!private int
bin1
DOCUMENT ME!private int
bin2
DOCUMENT ME!private int
blue
DOCUMENT ME!private int
bottomPad
DOCUMENT ME!private int
brightness
DOCUMENT ME!private float[]
colocIntensity1
DOCUMENT ME!private float[]
colocIntensity2
DOCUMENT ME!private float[]
colocSize
DOCUMENT ME!private float
contrast
DOCUMENT ME!private ModelImage
destImage
DOCUMENT ME!private boolean
doSecondIteration
DOCUMENT ME!private ViewJComponentEditImage
editImageFrameA
DOCUMENT ME!private ViewJComponentEditImage
editImageFrameB
DOCUMENT ME!private float
firstIndex
DOCUMENT ME!protected ViewJFrameBase
frame
frame - frame where the component image is displayed.private float[]
freeRangeColocIntensity1
DOCUMENT ME!private float[]
freeRangeColocIntensity2
DOCUMENT ME!private float[]
freeRangeColocSize
DOCUMENT ME!private boolean
freeRangeMode
DOCUMENT ME!private float[]
freeRangeRThreshold
DOCUMENT ME!private int
green
DOCUMENT ME!private boolean
haveFiltered
DOCUMENT ME!private boolean[]
haveFreeRangeThreshold
DOCUMENT ME!private boolean[]
haveThreshold
DOCUMENT ME!protected ModelImage
imageA
imageA - model for image A.protected ModelImage
imageB
imageB - model for image B.private float[]
imageBufferDest
DOCUMENT ME!private java.awt.Image
imgDest
DOCUMENT ME!protected int
interpMode
DOCUMENT ME!private int
leftPad
DOCUMENT ME!private float
linearCorrelation
DOCUMENT ME!private int
lineMin
DOCUMENT ME!private double
lineOffset
DOCUMENT ME!private double
lineSlope
DOCUMENT ME!private VOI
lineVOI
DOCUMENT ME!private ViewJFrameColocalizationRegression
localizeFrame
DOCUMENT ME!private boolean
logMagDisplay
DOCUMENT ME!private int[]
lutBufferRemappedDest
DOCUMENT ME!private ModelLUT
LUTdest
LUTa - lookup table for destImage.private double
max1
DOCUMENT ME!private double
max2
DOCUMENT ME!private double
maximumx
DOCUMENT ME!private java.awt.image.MemoryImageSource
memImageDest
DOCUMENT ME!private double
min1
DOCUMENT ME!private double
min2
DOCUMENT ME!private double
minimumx
DOCUMENT ME!private int
nVOI
DOCUMENT ME!float
OPACITY
Opacity value used by the paint brush. value = 1.0 - opaque value = 0.25 - default (mostly see through)private float
originalLineOffset
DOCUMENT ME!private float
originalLineSlope
DOCUMENT ME!private java.util.BitSet
paintBitmapDest
Buffer used to indicate if the pixel location is painted (true) or unpainted (false).private int[]
paintBufferDest
Buffer that displays the combined paintBitmap and pixBuffer buffers.private int[]
pixBufferDest
Buffer used to store ARGB images of the image presently being displayed.private VOI
pointVOI
DOCUMENT ME!private int
red
DOCUMENT ME!private boolean
regionLinesDisplay
DOCUMENT ME!private float
resX
DOCUMENT ME!private float
resY
DOCUMENT ME!protected ModelRGB
RGBTA
true if selected red, green, blue components present in RGB image.protected ModelRGB
RGBTB
DOCUMENT ME!private int
rightPad
DOCUMENT ME!private float[]
rThreshold
DOCUMENT ME!private double
scale1
DOCUMENT ME!private double
scale2
DOCUMENT ME!private float
secondIndex
DOCUMENT ME!private static long
serialVersionUID
Use serialVersionUID for interoperability.private int
tDim
Note that xDim and yDim refer to destImage, while zDim and tDim refer to imageA.private boolean
thresholdOn1
DOCUMENT ME!private int
topPad
DOCUMENT ME!private boolean
useBlue
DOCUMENT ME!private boolean
useGreen
DOCUMENT ME!private boolean
useRed
DOCUMENT ME!private ViewUserInterface
userInterface
DOCUMENT ME!private ViewVOIVector
VOIs
DOCUMENT ME!private float[]
xArray
DOCUMENT ME!private double
xdiff
DOCUMENT ME!private int
xDim
Note that xDim and yDim refer to destImage, while zDim and tDim refer to imageA.private float[]
yArray
DOCUMENT ME!private double
ydiff
DOCUMENT ME!private int
yDim
Note that xDim and yDim refer to destImage, while zDim and tDim refer to imageA.private float[]
zArray
DOCUMENT ME!private int
zDim
Note that xDim and yDim refer to destImage, while zDim and tDim refer to imageA.private float
zoomX
DOCUMENT ME!private float
zoomY
DOCUMENT ME!-
Fields inherited from class gov.nih.mipav.view.ViewJComponentBase
ANNOTATION, BOTH, CENTER_VOI, CUBE_BOUNDS, DEFAULT, DELETE_POINT, DROPPER_PAINT, ELLIPSE, ERASER_PAINT, IMAGE_A, IMAGE_B, imageDim, img, imgB, INTERPOLATE_A, INTERPOLATE_B, INTERPOLATE_BOTH, lastMouseX, lastMouseY, LEVELSET, LINE, LIVEWIRE, MAG_REGION, memImageA, memImageB, MOVE, MOVE_INTERSECTION_POINT, MOVE_POINT, MOVE_VOIPOINT, NEAREST_BOTH, NEW_POINT, NEW_VOI, OUT_OF_BOUNDS, PAINT_CAN, PAINT_VASC, PAINT_VOI, POINT_VOI, POLYLINE, POLYLINE_SLICE_VOI, PROBE, PROTRACTOR, QUICK_LUT, RECTANGLE, RECTANGLE3D, resolutionX, resolutionY, RETRACE, ROTATE, SELECT, showSliceNumber, sliceString, SMOOTH, SPLIT_VOI, textColor, TRANSLATE, VOI_3D, WAND, WIN_REGION, ZOOMING_IN, ZOOMING_OUT
-
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 ViewJComponentColocalizationRegression(AlgorithmColocalizationRegression alg, ViewJFrameBase _frame, ViewJFrameColocalizationRegression localizeFrame, ModelImage _imageA, ModelImage _imageB, ModelImage destImage, ModelLUT LUTdest, float[] imageBufferDest, boolean useRed, boolean useGreen, boolean useBlue, float originalLineSlope, float originalLineOffset, 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[] pixBufferDest, int[] paintBufferDest, float zoom, int[] extents, boolean logMagDisplay, boolean regionLinesDisplay, int leftPad, int rightPad, int bottomPad, int topPad, boolean doSecondIteration, float linearCorrelation, ViewUserInterface userInterface)
Constructor: ImageA and ImageB are expected to be of the same dimensionality !!
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
buildImageDestObject(ModelLUT _LUTdest, boolean forceShow)
Shows the 2D histogram image.void
dispose(boolean gcFlag)
Sets all variables to null, disposes, and garbage collects.void
finalizeLocal()
Clean up some resources!int
getblue()
Accessor that returns int blue.int
getgreen()
Accessor that returns int green.ModelImage
getImageA()
Accessor that returns the imageA.ModelImage
getImageB()
Accessor that returns the imageB.float
getOPACITY()
Accessor that returns float OPACITY.java.util.BitSet
getpaintBitmapDest()
Accessor that returns BitSet paintBitmap.java.awt.Dimension
getPreferredSize()
Size set to object size.int
getred()
Accessor that returns int red.java.awt.Dimension
getSize(java.awt.Dimension wh)
Gets the size of the object taking into account the zoom.float
getZoomX()
Magnification in the x - dimension.float
getZoomY()
Magnification in the y - dimension.void
importImageDest(int[] data)
Creates a Image object form an array of ints that have been formatted (packed) properly (i.e. aRGB)void
mouseClicked(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!void
mouseDragged(java.awt.event.MouseEvent mouseEvent)
mouseDragged only updates the histogram display header when the mouse passes over a point for which the linear correlation coefficient and colocalizations have already been calculated.void
mouseEntered(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!void
mouseExited(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!void
mouseMoved(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!void
mousePressed(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!void
mouseReleased(java.awt.event.MouseEvent mouseEvent)
If the correlation coefficient and colocalizations have not already been calculated at the mouse release point, then a call to AlgorithmColocalizationRegression calculates them.void
paintComponent(java.awt.Graphics g)
Paints the image and border.void
passFreeRangeArrays(boolean[] haveFreeRangeThreshold, float[] freeRangeRThreshold, float[] freeRangeColocSize, float[] freeRangeColocIntensity1, float[] freeRangeColocIntensity2)
Passes arrays needed in free range mode.void
setBrightness(int brightness, float contrast)
Method to set the brightness and contrast of the animate images.void
setFreeRangeMode(boolean freeRangeMode)
Accessor that sets freeRangeMode.void
setLogMagDisplay(boolean logMagDisplay)
DOCUMENT ME!void
setNewVar(float originalLineSlope, float originalLineOffset, 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, float linearCorrelation)
Modifies component after mouseReleased in contour VOI indicating that the VOI has been moved.void
setPaintMaskDest(java.util.BitSet mask)
Accessor that sets the paint mask.void
setPosition(int xS, int yS)
DOCUMENT ME!void
setRegionLinesDisplay(boolean regionLinesDisplay)
DOCUMENT ME!void
setRGBTA(ModelRGB RGBT)
Sets the RGB table for the ARGB image A.void
setRGBTB(ModelRGB RGBT)
Sets the RGB table for the ARGB image B.void
setZoom(float zX, float zY)
Sets the magnification in both x and y directions.void
update()
Method to call paint without erasing background this reduces flicker!void
update(java.awt.Graphics g)
Method to call paint without erasing background this reduces flicker!-
Methods inherited from class gov.nih.mipav.view.ViewJComponentBase
disposeLocal, finalize, getImage, getInterpMode, getLastMouseX, getLastMouseY, getResolutionX, getResolutionY, getScaledX, getScaledY, getSelectedPaintColor, getShowMagIntensityEnabled, importImage, importImageB, LocalToScreen, makePaintBitmapBorder, makePaintImage, paintCursorBoxComponent, paintWindowComponent, paintWindowComponent, ScreenToLocal, setInterpolationMode, setResolutions, setShowSliceNumber, setSliceString, setTextColor, setZoomExact
-
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, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, 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, updateUI
-
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, getAccessibleContext, 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
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
OPACITY
public float OPACITY
Opacity value used by the paint brush. value = 1.0 - opaque value = 0.25 - default (mostly see through)
-
frame
protected ViewJFrameBase frame
frame - frame where the component image is displayed.
-
imageA
protected ModelImage imageA
imageA - model for image A.
-
imageB
protected ModelImage imageB
imageB - model for image B.
-
interpMode
protected int interpMode
DOCUMENT ME!
-
RGBTA
protected ModelRGB RGBTA
true if selected red, green, blue components present in RGB image.
-
RGBTB
protected ModelRGB RGBTB
DOCUMENT ME!
-
alg
private AlgorithmColocalizationRegression alg
DOCUMENT ME!
-
bin1
private int bin1
DOCUMENT ME!
-
bin2
private int bin2
DOCUMENT ME!
-
bottomPad
private int bottomPad
DOCUMENT ME!
-
brightness
private int brightness
DOCUMENT ME!
-
colocIntensity1
private float[] colocIntensity1
DOCUMENT ME!
-
colocIntensity2
private float[] colocIntensity2
DOCUMENT ME!
-
colocSize
private float[] colocSize
DOCUMENT ME!
-
contrast
private float contrast
DOCUMENT ME!
-
destImage
private ModelImage destImage
DOCUMENT ME!
-
doSecondIteration
private boolean doSecondIteration
DOCUMENT ME!
-
editImageFrameA
private ViewJComponentEditImage editImageFrameA
DOCUMENT ME!
-
editImageFrameB
private ViewJComponentEditImage editImageFrameB
DOCUMENT ME!
-
firstIndex
private float firstIndex
DOCUMENT ME!
-
freeRangeColocIntensity1
private float[] freeRangeColocIntensity1
DOCUMENT ME!
-
freeRangeColocIntensity2
private float[] freeRangeColocIntensity2
DOCUMENT ME!
-
freeRangeColocSize
private float[] freeRangeColocSize
DOCUMENT ME!
-
freeRangeMode
private boolean freeRangeMode
DOCUMENT ME!
-
freeRangeRThreshold
private float[] freeRangeRThreshold
DOCUMENT ME!
-
haveFiltered
private boolean haveFiltered
DOCUMENT ME!
-
haveFreeRangeThreshold
private boolean[] haveFreeRangeThreshold
DOCUMENT ME!
-
haveThreshold
private boolean[] haveThreshold
DOCUMENT ME!
-
imageBufferDest
private float[] imageBufferDest
DOCUMENT ME!
-
imgDest
private java.awt.Image imgDest
DOCUMENT ME!
-
leftPad
private int leftPad
DOCUMENT ME!
-
linearCorrelation
private float linearCorrelation
DOCUMENT ME!
-
lineMin
private int lineMin
DOCUMENT ME!
-
lineOffset
private double lineOffset
DOCUMENT ME!
-
lineSlope
private double lineSlope
DOCUMENT ME!
-
lineVOI
private VOI lineVOI
DOCUMENT ME!
-
localizeFrame
private ViewJFrameColocalizationRegression localizeFrame
DOCUMENT ME!
-
logMagDisplay
private boolean logMagDisplay
DOCUMENT ME!
-
lutBufferRemappedDest
private int[] lutBufferRemappedDest
DOCUMENT ME!
-
LUTdest
private ModelLUT LUTdest
LUTa - lookup table for destImage.
-
memImageDest
private java.awt.image.MemoryImageSource memImageDest
DOCUMENT ME!
-
min1
private double min1
DOCUMENT ME!
-
max1
private double max1
DOCUMENT ME!
-
min2
private double min2
DOCUMENT ME!
-
max2
private double max2
DOCUMENT ME!
-
minimumx
private double minimumx
DOCUMENT ME!
-
maximumx
private double maximumx
DOCUMENT ME!
-
nVOI
private int nVOI
DOCUMENT ME!
-
originalLineOffset
private float originalLineOffset
DOCUMENT ME!
-
originalLineSlope
private float originalLineSlope
DOCUMENT ME!
-
paintBitmapDest
private java.util.BitSet paintBitmapDest
Buffer used to indicate if the pixel location is painted (true) or unpainted (false).
-
paintBufferDest
private int[] paintBufferDest
Buffer that displays the combined paintBitmap and pixBuffer buffers.
-
pixBufferDest
private int[] pixBufferDest
Buffer used to store ARGB images of the image presently being displayed.
-
pointVOI
private VOI pointVOI
DOCUMENT ME!
-
red
private int red
DOCUMENT ME!
-
green
private int green
DOCUMENT ME!
-
blue
private int blue
DOCUMENT ME!
-
regionLinesDisplay
private boolean regionLinesDisplay
DOCUMENT ME!
-
resX
private float resX
DOCUMENT ME!
-
resY
private float resY
DOCUMENT ME!
-
rightPad
private int rightPad
DOCUMENT ME!
-
rThreshold
private float[] rThreshold
DOCUMENT ME!
-
scale1
private double scale1
DOCUMENT ME!
-
scale2
private double scale2
DOCUMENT ME!
-
secondIndex
private float secondIndex
DOCUMENT ME!
-
thresholdOn1
private boolean thresholdOn1
DOCUMENT ME!
-
topPad
private int topPad
DOCUMENT ME!
-
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
DOCUMENT ME!
-
xArray
private float[] xArray
DOCUMENT ME!
-
xdiff
private double xdiff
DOCUMENT ME!
-
ydiff
private double ydiff
DOCUMENT ME!
-
xDim
private int xDim
Note that xDim and yDim refer to destImage, while zDim and tDim refer to imageA.
-
yDim
private int yDim
Note that xDim and yDim refer to destImage, while zDim and tDim refer to imageA.
-
zDim
private int zDim
Note that xDim and yDim refer to destImage, while zDim and tDim refer to imageA.
-
tDim
private int tDim
Note that xDim and yDim refer to destImage, while zDim and tDim refer to imageA.
-
yArray
private float[] yArray
DOCUMENT ME!
-
zArray
private float[] zArray
DOCUMENT ME!
-
zoomX
private float zoomX
DOCUMENT ME!
-
zoomY
private float zoomY
DOCUMENT ME!
-
-
Constructor Detail
-
ViewJComponentColocalizationRegression
public ViewJComponentColocalizationRegression(AlgorithmColocalizationRegression alg, ViewJFrameBase _frame, ViewJFrameColocalizationRegression localizeFrame, ModelImage _imageA, ModelImage _imageB, ModelImage destImage, ModelLUT LUTdest, float[] imageBufferDest, boolean useRed, boolean useGreen, boolean useBlue, float originalLineSlope, float originalLineOffset, 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[] pixBufferDest, int[] paintBufferDest, float zoom, int[] extents, boolean logMagDisplay, boolean regionLinesDisplay, int leftPad, int rightPad, int bottomPad, int topPad, boolean doSecondIteration, float linearCorrelation, ViewUserInterface userInterface)
Constructor: ImageA and ImageB are expected to be of the same dimensionality !!- Parameters:
alg
- AlgorithmColocalizationRegression parent_frame
- frame where the controls are obtainedlocalizeFrame
- frame where 2D histogram is displayed_imageA
- Model of the image that will be displayed_imageB
- Model of the image that will be displayeddestImage
- Image with histogram informationLUTdest
- LUT used to display destImageimageBufferDest
- storage buffer used to display destImageuseRed
- DOCUMENT ME!useGreen
- DOCUMENT ME!useBlue
- DOCUMENT ME!originalLineSlope
- DOCUMENT ME!originalLineOffset
- 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!pixBufferDest
- storage buffer used to build a displayable imagepaintBufferDest
- DOCUMENT ME!zoom
- initial magnification of imageextents
- initial display dimensions of the imagelogMagDisplay
- display log magnitude of imageregionLinesDisplay
- DOCUMENT ME!leftPad
- DOCUMENT ME!rightPad
- DOCUMENT ME!bottomPad
- DOCUMENT ME!topPad
- DOCUMENT ME!doSecondIteration
- DOCUMENT ME!linearCorrelation
- DOCUMENT ME!userInterface
- DOCUMENT ME!
-
-
Method Detail
-
buildImageDestObject
public boolean buildImageDestObject(ModelLUT _LUTdest, boolean forceShow)
Shows the 2D histogram image.- Parameters:
_LUTdest
- LUTdest - to change to new LUT for imageA else nullforceShow
- forces this method to import image and recalculate java image- Returns:
- boolean to indicate if the show was successful
-
dispose
public void dispose(boolean gcFlag)
Sets all variables to null, disposes, and garbage collects.- Overrides:
dispose
in classViewJComponentBase
- Parameters:
gcFlag
- if true garbage collector should be called.
-
finalizeLocal
public void finalizeLocal()
Clean up some resources!
-
getblue
public int getblue()
Accessor that returns int blue.- Returns:
- blue
-
getgreen
public int getgreen()
Accessor that returns int green.- Returns:
- green
-
getImageA
public ModelImage getImageA()
Accessor that returns the imageA.- Returns:
- imageA
-
getImageB
public ModelImage getImageB()
Accessor that returns the imageB.- Returns:
- imageB
-
getOPACITY
public float getOPACITY()
Accessor that returns float OPACITY.- Returns:
- OPACITY
-
getpaintBitmapDest
public java.util.BitSet getpaintBitmapDest()
Accessor that returns BitSet paintBitmap.- Returns:
- paintBitmap
-
getPreferredSize
public java.awt.Dimension getPreferredSize()
Size set to object size.- Overrides:
getPreferredSize
in classViewJComponentBase
- Returns:
- dimension with the size
-
getred
public int getred()
Accessor that returns int red.- Returns:
- red
-
getSize
public java.awt.Dimension getSize(java.awt.Dimension wh)
Gets the size of the object taking into account the zoom.- Overrides:
getSize
in classViewJComponentBase
- Parameters:
wh
- dimension- Returns:
- dimension with the size
-
getZoomX
public float getZoomX()
Magnification in the x - dimension.- Overrides:
getZoomX
in classViewJComponentBase
- Returns:
- magnificaiton in the x - dimension
-
getZoomY
public float getZoomY()
Magnification in the y - dimension.- Overrides:
getZoomY
in classViewJComponentBase
- Returns:
- magnificaiton in the y - dimension
-
importImageDest
public void importImageDest(int[] data)
Creates a Image object form an array of ints that have been formatted (packed) properly (i.e. aRGB)- Parameters:
data
- Data (image) to be displayed that has been formatted (packed) properly (i.e. aRGB)
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
- Parameters:
mouseEvent
- DOCUMENT ME!
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent mouseEvent)
mouseDragged only updates the histogram display header when the mouse passes over a point for which the linear correlation coefficient and colocalizations have already been calculated.- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
- Parameters:
mouseEvent
- DOCUMENT ME!
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
- Parameters:
mouseEvent
- DOCUMENT ME!
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
- Parameters:
mouseEvent
- DOCUMENT ME!
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!- Specified by:
mouseMoved
in interfacejava.awt.event.MouseMotionListener
- Parameters:
mouseEvent
- DOCUMENT ME!
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent mouseEvent)
DOCUMENT ME!- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Parameters:
mouseEvent
- DOCUMENT ME!
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent mouseEvent)
If the correlation coefficient and colocalizations have not already been calculated at the mouse release point, then a call to AlgorithmColocalizationRegression calculates them.- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- Parameters:
mouseEvent
- DOCUMENT ME!
-
paintComponent
public void paintComponent(java.awt.Graphics g)
Paints the image and border.- Overrides:
paintComponent
in classViewJComponentBase
- Parameters:
g
- Graphics handle
-
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!
-
setBrightness
public void setBrightness(int brightness, float contrast)
Method to set the brightness and contrast of the animate images.- Parameters:
brightness
- int going from -255 to 255contrast
- float scale factor
-
setFreeRangeMode
public void setFreeRangeMode(boolean freeRangeMode)
Accessor that sets freeRangeMode.- Parameters:
freeRangeMode
- DOCUMENT ME!
-
setLogMagDisplay
public void setLogMagDisplay(boolean logMagDisplay)
DOCUMENT ME!- Parameters:
logMagDisplay
- DOCUMENT ME!
-
setNewVar
public void setNewVar(float originalLineSlope, float originalLineOffset, 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, float linearCorrelation)
Modifies component after mouseReleased in contour VOI indicating that the VOI has been moved.- Parameters:
originalLineSlope
- DOCUMENT ME!originalLineOffset
- 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!linearCorrelation
- DOCUMENT ME!
-
setPaintMaskDest
public void setPaintMaskDest(java.util.BitSet mask)
Accessor that sets the paint mask.- Parameters:
mask
- DOCUMENT ME!
-
setPosition
public void setPosition(int xS, int yS)
DOCUMENT ME!- Parameters:
xS
- DOCUMENT ME!yS
- DOCUMENT ME!
-
setRegionLinesDisplay
public void setRegionLinesDisplay(boolean regionLinesDisplay)
DOCUMENT ME!- Parameters:
regionLinesDisplay
- DOCUMENT ME!
-
setRGBTA
public void setRGBTA(ModelRGB RGBT)
Sets the RGB table for the ARGB image A.- Parameters:
RGBT
- RGB table
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
Sets the RGB table for the ARGB image B.- Parameters:
RGBT
- RGB table
-
setZoom
public void setZoom(float zX, float zY)
Sets the magnification in both x and y directions.- Overrides:
setZoom
in classViewJComponentBase
- Parameters:
zX
- zoom in the x directionzY
- zoom in the y direction
-
update
public void update()
Method to call paint without erasing background this reduces flicker!
-
update
public void update(java.awt.Graphics g)
Method to call paint without erasing background this reduces flicker!- Overrides:
update
in classViewJComponentBase
- Parameters:
g
- Graphics handle
-
-