Class ViewJFrameAnimate
- All Implemented Interfaces:
ViewImageUpdateInterface,ActionListener,ComponentListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,RootPaneContainer,WindowConstants
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classcontinuous 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) classContinuous back and forth has been selected.(package private) classcontinuous 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) classThreads 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) classcontinuous 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) classContinuous reverse has been selected.(package private) classforward 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) classForward has been selected.(package private) classreverse 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) classReverse has been selected.Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrameNested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatDOCUMENT ME!private floatDOCUMENT ME!private Stringset to give 2 digits to the right of the decimal.private JToggleButtonDOCUMENT ME!private booleanDOCUMENT ME!private Colorz slice.private JButton[]DOCUMENT ME!private JToggleButtonDOCUMENT ME!private booleanDOCUMENT ME!private ViewJComponentAnimatewith complex images.private intDOCUMENT ME!private ViewJFrameBaseDOCUMENT ME!private JPanelDOCUMENT ME!private ViewControlsImageDOCUMENT ME!private GridBagConstraintsDOCUMENT ME!private GridBagLayoutDOCUMENT ME!private JToggleButtonDOCUMENT ME!private booleanDOCUMENT ME!private longDOCUMENT ME!private JButtonDOCUMENT ME!private booleanDOCUMENT ME!private BorderDOCUMENT ME!private int[]DOCUMENT ME!private JToggleButtonDOCUMENT ME!private JSliderDOCUMENT ME!private floatDOCUMENT ME!private booleanDOCUMENT ME!private GridBagConstraintsDOCUMENT ME!private ModelImageDOCUMENT ME!private ModelImageDOCUMENT ME!private float[]DOCUMENT ME!private float[]DOCUMENT ME!private JPanelDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!DOCUMENT ME!private longnewmsWait = msWait - msElapsed is passed to the sleep function.private longDOCUMENT ME!private booleanDOCUMENT ME!private ModelLUTDOCUMENT ME!private ModelLUTDOCUMENT ME!private ViewMenuBuilderDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private floatDOCUMENT ME!private longDOCUMENT ME!private longDOCUMENT ME!private intDOCUMENT ME!private longDOCUMENT ME!private NumberFormatDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private JMenuBarDOCUMENT ME!private intDOCUMENT ME!private floatred, green, and blue origBrightness remains constant until applyButton is pressed, restores brightness if cancelButton is pressed.private intfor 4D originalXDim and originalYDim are xDim and yDim before 4D to 3D conversion.private int[]DOCUMENT ME!private booleanDOCUMENT ME!private JToggleButtonDOCUMENT ME!private int[]DOCUMENT ME!private BorderDOCUMENT ME!(package private) ViewJProgressBarcurrently running.private JButtonDOCUMENT ME!private JToggleButtonDOCUMENT ME!private ModelRGBDOCUMENT ME!private ModelRGBDOCUMENT ME!private booleancurrently running.private JScrollPaneDOCUMENT ME!private intDOCUMENT ME!private static final longUse serialVersionUID for interoperability.private booleanDOCUMENT ME!private booleanequals zDim of original 4D before 4D to 3D conversion.private int[]red, green, and blue origContrast remains constant until applyButton is pressed, restores contrast if cancelButton is pressed.private JSliderDOCUMENT ME!private long= localTime2 - localTime.private booleancontaining only 5 msec. sleep commands.private JToggleButtonDOCUMENT ME!private long= localTime2 - localTime.private intDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldNote that an attempt to have DocumentListener for textAnimationFrame set the slider value was unsuccessful.private JTextFieldDOCUMENT ME!DOCUMENT ME!private JToolBarDOCUMENT ME!private JPaneland innerPanel placed in scrollPane.private intDOCUMENT ME!private intDOCUMENT ME!private floatDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT 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, zoomModeFields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields 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_CURSORFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionViewJFrameAnimate(ModelImage _imageA, ModelLUT _LUTa, ModelImage _imageB, ModelLUT _LUTb, ModelRGB _RGBTA, ModelRGB _RGBTB, ViewJFrameBase controlFrame, int nRow, int nColumn, int originalZDim, boolean showFrameBorder, Color borderCol, boolean disposeImage) Makes a frame of the animated image. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Calls various methods depending on the action.private voidaddControlPanel(Component c, GridBagConstraints gbc, int x, int y, int w, int h) Method that adds components to the control paenl.private JToolBarMethod to build the toolbar for the Animate frame.private voidPanel that sets the at rest frame number and the desired frames per second and reports the actual frames per second.private voidThis method builds a menu which contains the options Save image as and Close Animate.private voidMake a scroll frame and puts an image component into it.voidResets current slice's brightness and contrast to original.voidcomponentResized(ComponentEvent event) Resizes frame and all components.private JLabelcreateLabel(String title) Helper method to create a label with the proper font and font color.voiddispose()Disposes of components and frame.Get control widgets for frame.Accessor that returns the reference to imageA.Accessor that returns the reference to imageB.private JButtonMakes a separator for the use in the toolbars.voidDoes nothing.voidsetActiveImage(int active) Does nothing.voidsetAlphaBlend(int value) Does nothing.voidsetBrightness(int brightness, float contrast) Sets the brightness and contrast of the component image.voidDoes nothing.voidsetDisposeImages(boolean doDispose) DOCUMENT ME!voidsetEnabled(boolean flag) Does nothing.voidsetFramesPerSecond(int fps) Sets the slider value (for invoking save image from dialog).voidsetImageB(ModelImage _imageB) Does nothing.voidsetPaintBitmapSwitch(boolean paintBitmapSwitch) Does nothing.voidSets the RGB LUT table for ARGB image A.voidSets the RGB LUT table for ARGB image B.voidsetSlice(int slice) Sets the slice to be displayed and updates title frame.voidsetTimeSlice(int slice) Does nothing.voidsetTitle()Set the title of the frame with the image name and magnification.voidSets values based on knob along slider.protected booleantestParameter(String str, double minValue, double maxValue) Tests that the entered parameter is in range.voidupdateFrame(float sX, float sY) Does nothing.booleanDoes nothing.final booleanDoes nothing.final booleanupdateImages(boolean forceShow) This methods calls the componentImage's update method to redraw the screen.final booleanupdateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode) Does nothing.voidwindowActivated(WindowEvent event) Does nothing.voidwindowClosed(WindowEvent event) Does nothing.voidwindowClosing(WindowEvent event) Stops thread, calls close.voidwindowDeactivated(WindowEvent event) Does nothing.voidwindowDeiconified(WindowEvent event) Does nothing.voidwindowIconified(WindowEvent event) Does nothing.voidwindowOpened(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, setScannerPositionMethods 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, updateMethods 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, setUndecoratedMethods 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, toFrontMethods 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, validateTreeMethods 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
toggleArray
DOCUMENT ME! -
progressBar
ViewJProgressBar progressBarcurrently running. -
actualPerSecond
private float actualPerSecondDOCUMENT ME! -
alphaBlend
private float alphaBlendDOCUMENT ME! -
aps
set to give 2 digits to the right of the decimal. -
backForthButton
DOCUMENT ME! -
bfRun
private boolean bfRunDOCUMENT ME! -
borderCol
z slice. -
buttonArray
DOCUMENT ME! -
cForwardButton
DOCUMENT ME! -
cfRun
private boolean cfRunDOCUMENT ME! -
componentImage
with complex images. -
componentY
private int componentYDOCUMENT ME! -
controlFrame
DOCUMENT ME! -
controlPanel
DOCUMENT ME! -
controls
DOCUMENT ME! -
cpGBC
DOCUMENT ME! -
cpGBL
DOCUMENT ME! -
cReverseButton
DOCUMENT ME! -
crRun
private boolean crRunDOCUMENT ME! -
cycleTime
private long cycleTimeDOCUMENT ME! -
deleteButton
DOCUMENT ME! -
disposeImage
private boolean disposeImageDOCUMENT ME! -
etchedBorder
DOCUMENT ME! -
extents
private int[] extentsDOCUMENT ME! -
forwardButton
DOCUMENT ME! -
fpsSlider
DOCUMENT ME! -
framesPerSecond
private float framesPerSecondDOCUMENT ME! -
fRun
private boolean fRunDOCUMENT ME! -
gbcTP
DOCUMENT ME! -
imageA
DOCUMENT ME! -
imageB
DOCUMENT ME! -
imageBufferA
private float[] imageBufferADOCUMENT ME! -
imageBufferB
private float[] imageBufferBDOCUMENT ME! -
innerPanel
DOCUMENT ME! -
labelAnimationFrame
DOCUMENT ME! -
labelFramesPerSecond
DOCUMENT ME! -
labelTable
DOCUMENT ME! -
localTime
private long localTimenewmsWait = msWait - msElapsed is passed to the sleep function. -
localTime2
private long localTime2DOCUMENT ME! -
logMagDisplay
private boolean logMagDisplayDOCUMENT ME! -
LUTa
DOCUMENT ME! -
LUTb
DOCUMENT ME! -
minimumHeight
private int minimumHeightDOCUMENT ME! -
minimumToolBarWidth
private int minimumToolBarWidthDOCUMENT ME! -
mjpegQuality
private float mjpegQualityDOCUMENT ME! -
msElapsed
private long msElapsedDOCUMENT ME! -
msWait
private long msWaitDOCUMENT ME! -
nColumn
private int nColumnDOCUMENT ME! -
newmsWait
private long newmsWaitDOCUMENT ME! -
nf
DOCUMENT ME! -
nImage
private int nImageDOCUMENT ME! -
nRow
private int nRowDOCUMENT ME! -
openingMenuBar
DOCUMENT ME! -
origBrightness
private int origBrightnessDOCUMENT ME! -
origContrast
private float origContrastred, green, and blue origBrightness remains constant until applyButton is pressed, restores brightness if cancelButton is pressed. -
originalZDim
private int originalZDimfor 4D originalXDim and originalYDim are xDim and yDim before 4D to 3D conversion. -
paintBuffer
private int[] paintBufferDOCUMENT ME! -
pause
private boolean pauseDOCUMENT ME! -
pauseButton
DOCUMENT ME! -
pixBuffer
private int[] pixBufferDOCUMENT ME! -
pressedBorder
DOCUMENT ME! -
recordButton
DOCUMENT ME! -
reverseButton
DOCUMENT ME! -
RGBTA
DOCUMENT ME! -
RGBTB
DOCUMENT ME! -
rRun
private boolean rRuncurrently running. -
scrollPane
DOCUMENT ME! -
scrollPaneSize
private int scrollPaneSizeDOCUMENT ME! -
showFrameBorder
private boolean showFrameBorderDOCUMENT ME! -
showNumbers
private boolean showNumbersequals zDim of original 4D before 4D to 3D conversion. -
sliceOldNumber
private int[] sliceOldNumberred, green, and blue origContrast remains constant until applyButton is pressed, restores contrast if cancelButton is pressed. -
slider
DOCUMENT ME! -
startTime
private long startTime= localTime2 - localTime. -
stopTime
private long stopTime= localTime2 - localTime. -
stop
private boolean stopcontaining only 5 msec. sleep commands. -
stopButton
DOCUMENT ME! -
structureY
private int structureYDOCUMENT ME! -
textActualPerSecond
DOCUMENT ME! -
textAnimationFrame
Note that an attempt to have DocumentListener for textAnimationFrame set the slider value was unsuccessful. -
textFramesPerSecond
DOCUMENT ME! -
toolBar
DOCUMENT ME! -
topPanel
and innerPanel placed in scrollPane. -
xScreen
private int xScreenDOCUMENT ME! -
yScreen
private int yScreenDOCUMENT ME! -
zoom
private float zoomDOCUMENT ME! -
zShow
private int zShowDOCUMENT ME! -
zSlice
private int zSliceDOCUMENT ME!
-
-
Constructor Details
-
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, 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 Details
-
actionPerformed
Calls various methods depending on the action.- Specified by:
actionPerformedin interfaceActionListener- Specified by:
actionPerformedin classViewJFrameBase- Parameters:
event- event that triggered function
-
cancelBrightness
public void cancelBrightness()Resets current slice's brightness and contrast to original. -
componentResized
Resizes frame and all components.- Specified by:
componentResizedin interfaceComponentListener- Overrides:
componentResizedin classViewJFrameBase- Parameters:
event- event that triggered function
-
dispose
public void dispose()Disposes of components and frame. -
getControls
Get control widgets for frame.- Specified by:
getControlsin classViewJFrameBase- Returns:
- controls
-
getImageA
Accessor that returns the reference to imageA.- Specified by:
getImageAin classViewJFrameBase- Returns:
- image
-
getImageB
Accessor that returns the reference to imageB.- Specified by:
getImageBin classViewJFrameBase- Returns:
- imageB
-
removeControls
public void removeControls()Does nothing.- Specified by:
removeControlsin classViewJFrameBase
-
setActiveImage
public void setActiveImage(int active) Does nothing.- Specified by:
setActiveImagein classViewJFrameBase- Parameters:
active- DOCUMENT ME!
-
setAlphaBlend
public void setAlphaBlend(int value) Does nothing.- Specified by:
setAlphaBlendin 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:
setControlsin classViewJFrameBase
-
setDisposeImages
public void setDisposeImages(boolean doDispose) DOCUMENT ME!- Parameters:
doDispose- DOCUMENT ME!
-
setEnabled
public void setEnabled(boolean flag) Does nothing.- Specified by:
setEnabledin 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
Does nothing.- Specified by:
setImageBin classViewJFrameBase- Parameters:
_imageB- DOCUMENT ME!
-
setPaintBitmapSwitch
public void setPaintBitmapSwitch(boolean paintBitmapSwitch) Does nothing.- Specified by:
setPaintBitmapSwitchin classViewJFrameBase- Parameters:
paintBitmapSwitch- DOCUMENT ME!
-
setRGBTA
Sets the RGB LUT table for ARGB image A.- Specified by:
setRGBTAin classViewJFrameBase- Parameters:
RGBT- the new RGB LUT to be applied to the image
-
setRGBTB
Sets the RGB LUT table for ARGB image B.- Specified by:
setRGBTBin 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:
setSlicein interfaceViewImageUpdateInterface- Parameters:
slice- indicates image slice to be displayed
-
setTimeSlice
public void setTimeSlice(int slice) Does nothing.- Specified by:
setTimeSlicein interfaceViewImageUpdateInterface- Parameters:
slice- DOCUMENT ME!
-
setTitle
public void setTitle()Set the title of the frame with the image name and magnification.- Specified by:
setTitlein classViewJFrameBase
-
stateChanged
Sets values based on knob along slider.- Specified by:
stateChangedin interfaceChangeListener- Overrides:
stateChangedin 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:
updateImageExtentsin interfaceViewImageUpdateInterface- Specified by:
updateImageExtentsin classViewJFrameBase- Returns:
- DOCUMENT ME!
- See Also:
-
updateImages
public final boolean updateImages()Does nothing.- Specified by:
updateImagesin 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:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
forceShow- unused parameter- Returns:
- boolean confirming successful update
-
updateImages
Does nothing.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
LUTa- DOCUMENT ME!LUTb- DOCUMENT ME!forceShow- DOCUMENT ME!interpMode- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
windowActivated
Does nothing.- Specified by:
windowActivatedin interfaceWindowListener- Overrides:
windowActivatedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
windowClosed
Does nothing.- Specified by:
windowClosedin interfaceWindowListener- Overrides:
windowClosedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
windowClosing
Stops thread, calls close.- Specified by:
windowClosingin interfaceWindowListener- Overrides:
windowClosingin classViewJFrameBase- Parameters:
event- event that triggered function
-
windowDeactivated
Does nothing.- Specified by:
windowDeactivatedin interfaceWindowListener- Overrides:
windowDeactivatedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
windowDeiconified
Does nothing.- Specified by:
windowDeiconifiedin interfaceWindowListener- Overrides:
windowDeiconifiedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
windowIconified
Does nothing.- Specified by:
windowIconifiedin interfaceWindowListener- Overrides:
windowIconifiedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
windowOpened
Does nothing.- Specified by:
windowOpenedin interfaceWindowListener- Overrides:
windowOpenedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
testParameter
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
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
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
Helper method to create a label with the proper font and font color.- Parameters:
title- Text of the label.- Returns:
- New label.
-
makeSeparator
Makes a separator for the use in the toolbars.- Returns:
- Separator button.
-