Class ViewJFrameAnimate
- 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.ViewJFrameAnimate
-
- All Implemented Interfaces:
ViewImageUpdateInterface
,java.awt.event.ActionListener
,java.awt.event.ComponentListener
,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 ViewJFrameAnimate extends ViewJFrameBase implements javax.swing.event.ChangeListener
This class produces a frame surrounding an image whose slices are animated. Tool bar buttons are present for continuous reverse, reverse, continuous forward, forward, pause, stop, magnify, unmagnify, for generating a dialog to set brightness and contrast, and for deleting the current slice from the animation. In continuous forward the images are continuously displayed from start to end over and over again until pause or stop are hit. If pause is hit, the display may be resumed by repushing the continuous forward button. In forward each image is only displayed once from start to finish unless pause or stop are hit. If pause is hit, the display may be resumed by repushing the forward button. Continuous reverse and reverse work the same way as continuous forward and forward except for a reversal in direction. Users can instantly jump from one mode to another without hitting stop ro pause - from continuous forward to continuous reverse for example. Magnify will double the present magnification and Unmagnify will half the present magnification. Magnifications are only powers of 2. However, the scale function can be set to any value in the dialog box called up by JDialogAnimate. This scale function will do a slice by slice bilinear of bspline interpolation to create the initial slices on which the power of 2 magnification may be changed.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 all slices. Pressing cancel keeps all slices in their original state.
Images may also be viewed in a steady state mode. The slider is used to control the number of the slice shown when animation is not occurring. A text field for the desired frames per second is present. The initial default value is 30 per second. This is followed by a text field for the actual frames per second.
The file menu only has 2 simple functions - a save as function and a close animate structure function. The options menu has a view z slice numbers for use for 4D images.
ViewJFrameAnimate is called in ViewJFrameImage.
An animation of a blended image A and image B can be performed. However, all the blending parameters must be set before the animation structure is created. One parameter is alphaBlend for all images. For color only are also the parameters: RaOn, GaOn, BaOn, RbOn, GbOn, BbOn, RGBTA, and RGBTB. Changes in these parmeters that are made after the animation structure is created will not be propagated into the animation structure.
If 4D images are animated, the animation is performed on the fourth time dimension with all the z slices for a given time present in a given frame. The number of rows or columns for the z slices, whether or not a border frame is present around z slices, and the border frame color are all selected in JDialogAnimate before ViewJFrameAnimate is invoked. Note that JDialogAnimate converts all 4D images to 3D images so ViewJFrameAnimate actually is always passed 3D images.
- Version:
- 1.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
ViewJFrameAnimate.CBackForward
continuous backward and forward - continuously cycles from first to last slice unless a pause suspends the loop in 5 millisecond sleep functions or a stop causes the loop to exit.(package private) class
ViewJFrameAnimate.cbfStop
Continuous back and forth has been selected.(package private) class
ViewJFrameAnimate.CForward
continuous forward continuously cycles from first to last slice unless a pause suspends the loop in 5 millisecond sleep functions or a stop causes the loop to exit.(package private) class
ViewJFrameAnimate.cfStop
Threads are used because they are required by the sleep function. cf , fStop, crStop, and rStop set stop to true and keep sleeping for 5 millisecond intervals until the other 3 animation modes have ended.(package private) class
ViewJFrameAnimate.CReverse
continuous reverse continuously cycles from last to frist slice unless a pause suspends the loop in 5 millisecond sleep functions or a stop causes the loop to exit.(package private) class
ViewJFrameAnimate.crStop
Continuous reverse has been selected.(package private) class
ViewJFrameAnimate.Forward
forward cycles a single time from first to last slice unless a pause suspends the loop in 5 millisecond sleep functions or a stop causes the loop to exit.(package private) class
ViewJFrameAnimate.fStop
Forward has been selected.(package private) class
ViewJFrameAnimate.Reverse
reverse cycles a single time from last to first slice unless a pause suspends the loop in 5 millisecond sleep functions or a stop causes the loop to exit.(package private) class
ViewJFrameAnimate.rStop
Reverse has been selected.-
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 float
actualPerSecond
DOCUMENT ME!private float
alphaBlend
DOCUMENT ME!private java.lang.String
aps
set to give 2 digits to the right of the decimal.private javax.swing.JToggleButton
backForthButton
DOCUMENT ME!private boolean
bfRun
DOCUMENT ME!private java.awt.Color
borderCol
z slice.private javax.swing.JButton[]
buttonArray
DOCUMENT ME!private javax.swing.JToggleButton
cForwardButton
DOCUMENT ME!private boolean
cfRun
DOCUMENT ME!private ViewJComponentAnimate
componentImage
with complex images.private int
componentY
DOCUMENT ME!private ViewJFrameBase
controlFrame
DOCUMENT ME!private javax.swing.JPanel
controlPanel
DOCUMENT ME!private ViewControlsImage
controls
DOCUMENT ME!private java.awt.GridBagConstraints
cpGBC
DOCUMENT ME!private java.awt.GridBagLayout
cpGBL
DOCUMENT ME!private javax.swing.JToggleButton
cReverseButton
DOCUMENT ME!private boolean
crRun
DOCUMENT ME!private long
cycleTime
DOCUMENT ME!private javax.swing.JButton
deleteButton
DOCUMENT ME!private boolean
disposeImage
DOCUMENT ME!private javax.swing.border.Border
etchedBorder
DOCUMENT ME!private int[]
extents
DOCUMENT ME!private javax.swing.JToggleButton
forwardButton
DOCUMENT ME!private javax.swing.JSlider
fpsSlider
DOCUMENT ME!private float
framesPerSecond
DOCUMENT ME!private boolean
fRun
DOCUMENT ME!private java.awt.GridBagConstraints
gbcTP
DOCUMENT ME!private ModelImage
imageA
DOCUMENT ME!private ModelImage
imageB
DOCUMENT ME!private float[]
imageBufferA
DOCUMENT ME!private float[]
imageBufferB
DOCUMENT ME!private javax.swing.JPanel
innerPanel
DOCUMENT ME!private javax.swing.JLabel
labelAnimationFrame
DOCUMENT ME!private javax.swing.JLabel
labelFramesPerSecond
DOCUMENT ME!private java.util.Hashtable<java.lang.Integer,javax.swing.JLabel>
labelTable
DOCUMENT ME!private long
localTime
newmsWait = msWait - msElapsed is passed to the sleep function.private long
localTime2
DOCUMENT ME!private boolean
logMagDisplay
DOCUMENT ME!private ModelLUT
LUTa
DOCUMENT ME!private ModelLUT
LUTb
DOCUMENT ME!private ViewMenuBuilder
menuObj
DOCUMENT ME!private int
minimumHeight
DOCUMENT ME!private int
minimumToolBarWidth
DOCUMENT ME!private float
mjpegQuality
DOCUMENT ME!private long
msElapsed
DOCUMENT ME!private long
msWait
DOCUMENT ME!private int
nColumn
DOCUMENT ME!private long
newmsWait
DOCUMENT ME!private java.text.NumberFormat
nf
DOCUMENT ME!private int
nImage
DOCUMENT ME!private int
nRow
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
originalZDim
for 4D originalXDim and originalYDim are xDim and yDim before 4D to 3D conversion.private int[]
paintBuffer
DOCUMENT ME!private boolean
pause
DOCUMENT ME!private javax.swing.JToggleButton
pauseButton
DOCUMENT ME!private int[]
pixBuffer
DOCUMENT ME!private javax.swing.border.Border
pressedBorder
DOCUMENT ME!(package private) ViewJProgressBar
progressBar
currently running.private javax.swing.JButton
recordButton
DOCUMENT ME!private javax.swing.JToggleButton
reverseButton
DOCUMENT ME!private ModelRGB
RGBTA
DOCUMENT ME!private ModelRGB
RGBTB
DOCUMENT ME!private boolean
rRun
currently running.private javax.swing.JScrollPane
scrollPane
DOCUMENT ME!private int
scrollPaneSize
DOCUMENT ME!private static long
serialVersionUID
Use serialVersionUID for interoperability.private boolean
showFrameBorder
DOCUMENT ME!private boolean
showNumbers
equals zDim of original 4D before 4D to 3D conversion.private int[]
sliceOldNumber
red, green, and blue origContrast remains constant until applyButton is pressed, restores contrast if cancelButton is pressed.private javax.swing.JSlider
slider
DOCUMENT ME!private long
startTime
= localTime2 - localTime.private boolean
stop
containing only 5 msec. sleep commands.private javax.swing.JToggleButton
stopButton
DOCUMENT ME!private long
stopTime
= localTime2 - localTime.private int
structureY
DOCUMENT ME!private javax.swing.JTextField
textActualPerSecond
DOCUMENT ME!private javax.swing.JTextField
textAnimationFrame
Note that an attempt to have DocumentListener for textAnimationFrame set the slider value was unsuccessful.private javax.swing.JTextField
textFramesPerSecond
DOCUMENT ME!javax.swing.JToggleButton[]
toggleArray
DOCUMENT ME!private javax.swing.JToolBar
toolBar
DOCUMENT ME!private javax.swing.JPanel
topPanel
and innerPanel placed in scrollPane.private int
xScreen
DOCUMENT ME!private int
yScreen
DOCUMENT ME!private float
zoom
DOCUMENT ME!private int
zShow
DOCUMENT ME!private int
zSlice
DOCUMENT ME!-
Fields inherited from class gov.nih.mipav.view.ViewJFrameBase
absoluteGoToButton, absoluteGoToPanel, absoluteLabel, absoluteLabelVals, absolutePanel, absoluteXLabel, absoluteXTextField, absoluteYLabel, absoluteYTextField, absoluteZLabel, absoluteZTextField, defaultLUTa, defaultLUTb, displayMode, IMAGE_A, IMAGE_A_B, IMAGE_B, isClosing, linkedScrolling, linkFrame, linkTriFrame, 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, userInterface, 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 ViewJFrameAnimate(ModelImage _imageA, ModelLUT _LUTa, ModelImage _imageB, ModelLUT _LUTb, ModelRGB _RGBTA, ModelRGB _RGBTB, ViewJFrameBase controlFrame, int nRow, int nColumn, int originalZDim, boolean showFrameBorder, java.awt.Color borderCol, boolean disposeImage)
Makes a frame of the animated image.
-
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
addControlPanel(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
buildAnimateToolBar(java.awt.event.ActionListener al)
Method to build the toolbar for the Animate frame.private void
buildControlPanel()
Panel that sets the at rest frame number and the desired frames per second and reports the actual frames per second.private void
buildMenu()
This method builds a menu which contains the options Save image as and Close Animate.private void
buildScrollPane()
Make a scroll frame and puts an image component into it.void
cancelBrightness()
Resets current slice's brightness and contrast to original.void
componentResized(java.awt.event.ComponentEvent event)
Resizes frame and all components.private javax.swing.JLabel
createLabel(java.lang.String title)
Helper method to create a label with the proper font and font color.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.private javax.swing.JButton
makeSeparator()
Makes a separator for the use in the toolbars.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
setDisposeImages(boolean doDispose)
DOCUMENT ME!void
setEnabled(boolean flag)
Does nothing.void
setFramesPerSecond(int fps)
Sets the slider value (for invoking save image from dialog).void
setImageB(ModelImage _imageB)
Does nothing.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)
Sets the slice to be displayed and updates title frame.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
-
toggleArray
public javax.swing.JToggleButton[] toggleArray
DOCUMENT ME!
-
progressBar
ViewJProgressBar progressBar
currently running.
-
actualPerSecond
private float actualPerSecond
DOCUMENT ME!
-
alphaBlend
private float alphaBlend
DOCUMENT ME!
-
aps
private java.lang.String aps
set to give 2 digits to the right of the decimal.
-
backForthButton
private javax.swing.JToggleButton backForthButton
DOCUMENT ME!
-
bfRun
private boolean bfRun
DOCUMENT ME!
-
borderCol
private java.awt.Color borderCol
z slice.
-
buttonArray
private javax.swing.JButton[] buttonArray
DOCUMENT ME!
-
cForwardButton
private javax.swing.JToggleButton cForwardButton
DOCUMENT ME!
-
cfRun
private boolean cfRun
DOCUMENT ME!
-
componentImage
private ViewJComponentAnimate componentImage
with complex images.
-
componentY
private int componentY
DOCUMENT ME!
-
controlFrame
private ViewJFrameBase controlFrame
DOCUMENT ME!
-
controlPanel
private javax.swing.JPanel controlPanel
DOCUMENT ME!
-
controls
private ViewControlsImage controls
DOCUMENT ME!
-
cpGBC
private java.awt.GridBagConstraints cpGBC
DOCUMENT ME!
-
cpGBL
private java.awt.GridBagLayout cpGBL
DOCUMENT ME!
-
cReverseButton
private javax.swing.JToggleButton cReverseButton
DOCUMENT ME!
-
crRun
private boolean crRun
DOCUMENT ME!
-
cycleTime
private long cycleTime
DOCUMENT ME!
-
deleteButton
private javax.swing.JButton deleteButton
DOCUMENT ME!
-
disposeImage
private boolean disposeImage
DOCUMENT ME!
-
etchedBorder
private javax.swing.border.Border etchedBorder
DOCUMENT ME!
-
extents
private int[] extents
DOCUMENT ME!
-
forwardButton
private javax.swing.JToggleButton forwardButton
DOCUMENT ME!
-
fpsSlider
private javax.swing.JSlider fpsSlider
DOCUMENT ME!
-
framesPerSecond
private float framesPerSecond
DOCUMENT ME!
-
fRun
private boolean fRun
DOCUMENT ME!
-
gbcTP
private java.awt.GridBagConstraints gbcTP
DOCUMENT ME!
-
imageA
private ModelImage imageA
DOCUMENT ME!
-
imageB
private ModelImage imageB
DOCUMENT ME!
-
imageBufferA
private float[] imageBufferA
DOCUMENT ME!
-
imageBufferB
private float[] imageBufferB
DOCUMENT ME!
-
innerPanel
private javax.swing.JPanel innerPanel
DOCUMENT ME!
-
labelAnimationFrame
private javax.swing.JLabel labelAnimationFrame
DOCUMENT ME!
-
labelFramesPerSecond
private javax.swing.JLabel labelFramesPerSecond
DOCUMENT ME!
-
labelTable
private java.util.Hashtable<java.lang.Integer,javax.swing.JLabel> labelTable
DOCUMENT ME!
-
localTime
private long localTime
newmsWait = msWait - msElapsed is passed to the sleep function.
-
localTime2
private long localTime2
DOCUMENT ME!
-
logMagDisplay
private boolean logMagDisplay
DOCUMENT ME!
-
LUTa
private ModelLUT LUTa
DOCUMENT ME!
-
LUTb
private ModelLUT LUTb
DOCUMENT ME!
-
menuObj
private ViewMenuBuilder menuObj
DOCUMENT ME!
-
minimumHeight
private int minimumHeight
DOCUMENT ME!
-
minimumToolBarWidth
private int minimumToolBarWidth
DOCUMENT ME!
-
mjpegQuality
private float mjpegQuality
DOCUMENT ME!
-
msElapsed
private long msElapsed
DOCUMENT ME!
-
msWait
private long msWait
DOCUMENT ME!
-
nColumn
private int nColumn
DOCUMENT ME!
-
newmsWait
private long newmsWait
DOCUMENT ME!
-
nf
private java.text.NumberFormat nf
DOCUMENT ME!
-
nImage
private int nImage
DOCUMENT ME!
-
nRow
private int nRow
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.
-
originalZDim
private int originalZDim
for 4D originalXDim and originalYDim are xDim and yDim before 4D to 3D conversion.
-
paintBuffer
private int[] paintBuffer
DOCUMENT ME!
-
pause
private boolean pause
DOCUMENT ME!
-
pauseButton
private javax.swing.JToggleButton pauseButton
DOCUMENT ME!
-
pixBuffer
private int[] pixBuffer
DOCUMENT ME!
-
pressedBorder
private javax.swing.border.Border pressedBorder
DOCUMENT ME!
-
recordButton
private javax.swing.JButton recordButton
DOCUMENT ME!
-
reverseButton
private javax.swing.JToggleButton reverseButton
DOCUMENT ME!
-
RGBTA
private ModelRGB RGBTA
DOCUMENT ME!
-
RGBTB
private ModelRGB RGBTB
DOCUMENT ME!
-
rRun
private boolean rRun
currently running.
-
scrollPane
private javax.swing.JScrollPane scrollPane
DOCUMENT ME!
-
scrollPaneSize
private int scrollPaneSize
DOCUMENT ME!
-
showFrameBorder
private boolean showFrameBorder
DOCUMENT ME!
-
showNumbers
private boolean showNumbers
equals zDim of original 4D before 4D to 3D conversion.
-
sliceOldNumber
private int[] sliceOldNumber
red, green, and blue origContrast remains constant until applyButton is pressed, restores contrast if cancelButton is pressed.
-
slider
private javax.swing.JSlider slider
DOCUMENT ME!
-
startTime
private long startTime
= localTime2 - localTime.
-
stopTime
private long stopTime
= localTime2 - localTime.
-
stop
private boolean stop
containing only 5 msec. sleep commands.
-
stopButton
private javax.swing.JToggleButton stopButton
DOCUMENT ME!
-
structureY
private int structureY
DOCUMENT ME!
-
textActualPerSecond
private javax.swing.JTextField textActualPerSecond
DOCUMENT ME!
-
textAnimationFrame
private javax.swing.JTextField textAnimationFrame
Note that an attempt to have DocumentListener for textAnimationFrame set the slider value was unsuccessful.
-
textFramesPerSecond
private javax.swing.JTextField textFramesPerSecond
DOCUMENT ME!
-
toolBar
private javax.swing.JToolBar toolBar
DOCUMENT ME!
-
topPanel
private javax.swing.JPanel topPanel
and innerPanel placed in scrollPane.
-
xScreen
private int xScreen
DOCUMENT ME!
-
yScreen
private int yScreen
DOCUMENT ME!
-
zoom
private float zoom
DOCUMENT ME!
-
zShow
private int zShow
DOCUMENT ME!
-
zSlice
private int zSlice
DOCUMENT ME!
-
-
Constructor Detail
-
ViewJFrameAnimate
public ViewJFrameAnimate(ModelImage _imageA, ModelLUT _LUTa, ModelImage _imageB, ModelLUT _LUTb, ModelRGB _RGBTA, ModelRGB _RGBTB, ViewJFrameBase controlFrame, int nRow, int nColumn, int originalZDim, boolean showFrameBorder, java.awt.Color borderCol, boolean disposeImage)
Makes a frame of the animated image.- Parameters:
_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 null_RGBTB
- Model RGB LUT for color image (B) else nullcontrolFrame
- ViewJFrameBase passed to ViewJComponentAnimatenRow
- rows of z images in 4D imagesnColumn
- columns of z images in 4D imagesoriginalZDim
- for 4D images equals zDim before 4D to 3D conversionshowFrameBorder
- puts colored borders around z images in 4D imagesborderCol
- color of the z image bordersdisposeImage
- dispose of imageA and imageB on frame close
-
-
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
-
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
-
setDisposeImages
public void setDisposeImages(boolean doDispose)
DOCUMENT ME!- Parameters:
doDispose
- DOCUMENT ME!
-
setEnabled
public void setEnabled(boolean flag)
Does nothing.- Specified by:
setEnabled
in classViewJFrameBase
- Parameters:
flag
- DOCUMENT ME!
-
setFramesPerSecond
public void setFramesPerSecond(int fps)
Sets the slider value (for invoking save image from dialog).- Parameters:
fps
- int frames per second
-
setImageB
public void setImageB(ModelImage _imageB)
Does nothing.- Specified by:
setImageB
in classViewJFrameBase
- Parameters:
_imageB
- 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)
Sets the slice to be displayed and updates title frame.- Specified by:
setSlice
in interfaceViewImageUpdateInterface
- Parameters:
slice
- indicates image slice to be displayed
-
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
-
addControlPanel
private void addControlPanel(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
-
buildAnimateToolBar
private javax.swing.JToolBar buildAnimateToolBar(java.awt.event.ActionListener al)
Method to build the toolbar for the Animate frame.- Parameters:
al
- Action listener (this frame)- Returns:
- The animation toolbar
-
buildControlPanel
private void buildControlPanel()
Panel that sets the at rest frame number and the desired frames per second and reports the actual frames per second.
-
buildMenu
private void buildMenu()
This method builds a menu which contains the options Save image as and Close Animate.
-
buildScrollPane
private void buildScrollPane()
Make a scroll frame and puts an image component into it.
-
createLabel
private javax.swing.JLabel createLabel(java.lang.String title)
Helper method to create a label with the proper font and font color.- Parameters:
title
- Text of the label.- Returns:
- New label.
-
makeSeparator
private javax.swing.JButton makeSeparator()
Makes a separator for the use in the toolbars.- Returns:
- Separator button.
-
-