Class ViewJFrameTriImage
- All Implemented Interfaces:
VOIManagerInterfaceListener,ViewImageUpdateInterface,ActionListener,ComponentListener,ItemListener,KeyListener,MouseListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,RootPaneContainer,WindowConstants
- Direct Known Subclasses:
ViewJFrameMultimodalitySingleViewer,ViewJFrameMultimodalityViewer
There are 2 menus - a file menu and an options menu. The file menu only has a close frame command. The Options menu has a Show Axes command,a Show Crosshairs command, a show Talairach grid, a show Talairach position command, and a Link to another image command.
There are 2 rows of toolbar buttons. The first row has 15 toolbar buttons:
1.) Traverse image with pressed mouse button. As you traverse the XY image, the XY image is unchanged. The X slice
shown in the ZY image changes and the Y coordinate in the ZY image changes. The Z coordinate in the ZY image remains
unchanged. The Y slice shown in the XZ image changes and the X coordinate in the XZ image changes. The Z coordinate
shown in the XZ image remains unchanged. Analagous operation for traversing the ZY and XZ slices.
2.) Magnify image 2.0X. Note that magnification is always a power of 2.
3.) Magnify image 0.5X.
4.) Set image magnification to 1.0X.
5.) Draw a line VOI which can be used for measurement. 6.) Identify center of volume to determine translations.
Centers are moved with mouse dragging operations. Plus sign markers appear to show the new center for each image.
Otherwise, operation is similar to the traverse command. The centers disappear when traverse mode is entered.
7.) Alignment tool to determine rotations. Protractors with 2 line segments intersecting in a common point appear in
all 3 images. By putting a cursor at the tip of a protractor line segment and pressing the mouse button, it is
possible to shrink, grow, or rotate the line segment. The thicker line segment is the reference line segment which
will always click into a vertical or horizontal orientation(whichever is closer) when the mouse button is released.
The thinner line segment can be left in any orientation. The angle is measured in degrees by going clockwise from the
thick reference segment to the thinner segment. When the mouse button is pressed with the cursor on the protractor,
the angle in degrees will appear. If the cursor is placed over a part of the protractor other than a nonintersecting
line segment end and the mouse button is pressed, then the protractor can be moved unchanged in size and angle.
8.) Apply rotations and translations. An apply transformation matrix dialog appears. Under Destination radio buttons
for new image and replace image are present. Under interpolation a combo box with trilinear, bspline 3rd order, and
bspline 4rth order are present. Apply and cancel buttons are present on the bottom of the dialog. For 4D images apply
the same transformation to all time slices.
9.) Add a non center point to all images.
10.) New VOI.
11.) Delete a non center point from all images.
12.) Bounding cube to set boundaries for cropping.
13.) Crop the image using the bounding cube boundaries. For 4D images apply the same cropping to all time slices.
14.) (**REMOVED**)Bring up a dialog for placing markers to create a new image in the AC-PC aligned view.
15.) (**REMOVED**)Bring up a dialog for placing markers to create a new Talairach space image from an image in the
AC-PC aligned view.
The second toolbar row is a paint toolbar with 14 buttons:
1.) Draw using a brush.
2.) Pick up a color from an image.
3.) Fills an area with the desired color - the Paint Grow dialog box appears. The box has an upper bound slider, a
lower bound slider, and text fields for entering maximum size and maximum distance. Apply and cancel buttons are
present.
4.) Erases a portion of the image.
5.) Erases all paint.
6.) Draw using small size.
7.) Draw using medium size.
8.) Draw using large size.
9.) Change intensity level of the paint - a desired paint intensity dialog box appears. The box tells the minimum and
maximum allowed intensity levels. The user inputs inputs the desired intensity level. Apply and cancel buttons are
present. Pressing the apply button causes the desired intensity level to be placed in intensityDropper. The initial
desired intensity level is 1.
10.) Change paint color - a pick paint color dialog box appears. If controls is not null, the original value of color
is given by color = controls.getTools().paintColor; Otherwise, the original value is taken as new Color(255,0,0).
11.) Change opacity of paint - a paint opacity dialog box appears. If controls is not null, the original value of
opacity is given by OPACITY = controls.getTools().opacity; Otherwise, the original value is taken as 0.25. The dialog
box has a slider whose value can be varied from 0 to 1.
12.) Commit - Changes image where painted. The painted pixels are given values equal to intensityDropper and the
paint is erased.
13.) Undo last paint region created by a mouse release.
14.) Calculate volume of paint.
If imageA and imageB are both loaded, an Active Image Panel with 3 radio buttons, image A, imageB, and both appears. Commit paint changes and apply rotations and translations may be selected for imageA, imageB, or both.
With 4D images a slider for the fourth time dimension appears below the second toolbar.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classListener to pass to JColorChooser when user wants to change the color of the paint.(package private) classDOCUMENT ME!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 TypeFieldDescriptionprotected JToggleButtonToggle buttons for voi/pointsstatic final floatDimensions used for Talairach coordinates - anterior.static final floatDimensions used for Talairach coordinates - inferior.static final floatDimensions used for Talairach coordinates - lateral.static final floatAC to PC dimension.static final floatDimensions used for Talairach coordinates - superior.static final floatDimensions used for Talairach view clipping box - anterior.static final floatDimensions used for Talairach view clipping box - inferior.static final floatDimensions used for Talairach view clipping box - inferior new. 3/06/96: extra 10 mm for cerebellum .static final floatDimensions used for Talairach view clipping box - lateral.static final floatDimensions used for Talairach view clipping box - posterior.static final floatDimensions used for Talairach view clipping box - superior.static final floatDimensions used for Talairach coordinates - posterior.static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!protected JToggleButton[]DOCUMENT ME!protected int1 for black and white, 4 for color.protected booleanDOCUMENT ME!protected JCheckBox"Show talairach grid" checkbox.protected JCheckBox"Show talairach gridmarkers" checkbox.protected ColorColor of the paint.protected ViewJColorChooserColor chooser to use when selecting paint color.protected JButtonButton for changing the color of the paint.protected ViewControlsImageUsed to obtain initial paint opacity and color.protected Vector<CoordinateChangeListener> A list of CoordinateChangeListeners who want to know about changes to the coordinate currently pointed to by the tri-image frame's crosshairs.static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!protected JSpinnerSpinner component for the crosshair gap size.protected Point3DThe current values of the absolute position labels.private intprotected static final intConstant to determine how many pixels would be optimal for the image to be initially zoomed to.protected intThe default hight of the window, if it cannot be calculated.protected JToggleButtonToggle buttons for voi/pointsprotected int[]Extents of image.protected static final Stringprotected JToolBarprotected JToolBarImage control toolbar.protected JToggleButtonrefs to indiviadual frame zooming in and out buttons.protected JToggleButtonrefs to indiviadual frame zooming in and out buttons.protected JSpinnerSpinner component for the paint intensity.protected JLabeltalaraich intensity label*protected JTextFieldLabel the Talairach position x value in the image volume.protected JTextFieldLabel the Talairach position y value in the image volume.protected JTextFieldLabel the Talairach position z value in the image volume.protected JButtonDOCUMENT ME!protected JButtonrefs to the magnify and minimize buttonstatic final intMaximum number of initial tri-images!protected ViewMenuBuilderMenu items storage.protected JButtonrefs to the magnify and minimize buttonprotected static final intWe want to be able to toggle the bounding box button, but don't want it to be part of any other button group.protected static final StringA constant for which to test in the actionPerformed.protected booleanDOCUMENT ME!protected floatOpacity of paint.protected static final Stringprotected JComboBoxBox holding the list of available paint brushes.private booleanused with the above to say the paint brush has been changed, waiting to change back.protected String[]List of built-in and user-defined paint brushes.protected JToggleButtonToggle buttons for voi/pointsprotected JToolBarPaint tool bar.protected static final StringA constant for which to test in the actionPerformed.protected JPanelPanel for deciding which image is active; appears when 2 images are loaded.protected JPanelPanel that holds the toolbars.protected GridBagConstraintsprotected ViewJFrameImageReference to the parent window.protected ComponentReference to the plug-in panel in the 2x2 (old) layout.private intint used for quick-key painting for speedier paint brush access.protected JRadioButtonRadio button for selecting image A as active.protected JRadioButtonRadio button for selecting image B as active.protected JRadioButtonRadio button for selecting both images as active.protected float[]Resolutions of image.protected ModelRGBRGB tables for imageA and imageBprotected ModelRGBRGB tables for imageA and imageBstatic final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!protected JCheckBoxThe button that indicates whether this triframe is linked with tri-frames of similar dimensionality.protected booleanFlag telling the crosshair movement to update slice in original image frame.DOCUMENT ME!private static final longUse serialVersionUID for interoperability.protected booleanFlag for showing the Talairach grid on the component images.protected booleanFlag for showing the Talairach position on the component images.private doubleUsed to setup the paint spinner.private doubleUsed to setup the paint spinner.private doubleUsed to setup the paint spinner.private doubleUsed to setup the paint spinner.protected JPanelPanel for Talairach position display.protected intTime dimension of the original image.protected JSliderSlider for 4D images, time dimension.protected ViewToolBarBuilderToolbar builder reference.protected JButtonDOCUMENT ME!protected JToggleButtonButton for traversing the images.DOCUMENT ME!JPanel[]DOCUMENT ME!protected intTime slice that this image is on.talairach voxel label *protected int[]Units of image - mm, inches, etc.protected booleanif true use cerebellum-adjusted static variable.(package private) static intprotected JPanelPanel for switching between radiological and neurological viewing conventions.protected static final Stringprotected ButtonGroupprotected VOIManagerInterfaceThe VOI managers for each triComponentprotected JMenuMenu displaying VOI optionsprivate CubeBoundsVolume Boundary may be changed for cropping the volume.protected int[]The point to become center of transformed image.protected VolumePositionFrameReference to the volume coordinate frame.protected JPanelReference to the volume coordinate panel when it is in the plug-in position.protected JLabelprotected JLabelprotected floatMagnification for image.protected JLabelFields inherited from class gov.nih.mipav.view.ViewJFrameBase
absoluteGoToButton, absoluteGoToPanel, absoluteLabel, absoluteLabelVals, absolutePanel, absoluteXLabel, absoluteXTextField, absoluteYLabel, absoluteYTextField, absoluteZLabel, absoluteZTextField, alphaBlend, defaultLUTa, defaultLUTb, displayMode, IMAGE_A, IMAGE_A_B, IMAGE_B, imageA, imageB, isClosing, linkedScrolling, linkFrame, linkTriFrame, LUTa, LUTb, progressBar, scannerLPS_APLabel, scannerLPS_APTextField, scannerLPS_GoToButton, scannerLPS_GoToPanel, scannerLPS_ISLabel, scannerLPS_ISTextField, scannerLPS_RLLabel, scannerLPS_RLTextField, scannerLPSLabel, scannerLPSLabelVals, scannerLPSPanel, scannerRAS_APLabel, scannerRAS_APTextField, scannerRAS_GoToButton, scannerRAS_GoToPanel, scannerRAS_ISLabel, scannerRAS_ISTextField, scannerRAS_RLLabel, scannerRAS_RLTextField, scannerRASLabel, scannerRASLabelVals, scannerRASPanel, scannerTabbedPane, tabbedPane, talGoToButton, talGoToPanel, talXLabel, talXTextField, talYLabel, talYTextField, talZLabel, talZTextField, 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
ConstructorsConstructorDescriptionViewJFrameTriImage(ModelImage _imageA, ModelImage _imageB) Creates a JFrameBase without calling gui initialization, init() must be called after pre-processing has completed.ViewJFrameTriImage(ModelImage _imageA, ModelLUT LUTa, ModelImage _imageB, ModelLUT LUTb, ViewControlsImage controls, ViewJFrameImage parent) Make a frame and puts an image component into it.ViewJFrameTriImage(ModelImage _imageA, ModelLUT LUTa, ModelRGB RGBTa, ModelImage _imageB, ModelLUT LUTb, ModelRGB RGBTb, ViewControlsImage controls, ViewJFrameImage parent) -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod that goes to the absolute voxel coordinate that is enteredvoidactionPerformed(ActionEvent event) Calls various methods depending on the action.voidAdd someone who wants to be notified about crosshair coordinate changes.voidaddSphereVOIs(VOI annotations) voidCalled when the volumePositionFrame closes, the volumePositionPanel is again displayed in the window:.private voidadjustScrollbars(int frame, int x, int y) This method adjust the scrollbars to area where user clicked when doing individual frame zooming in and out.private voidadjustScrollbars(int x, int y, JScrollPane scrollPane) DOCUMENT ME!protected voidBuilds the active image panel for choosing which image (A, B, or BOTH) to perform operations on.protected voidbuildDisabledTextButton(String text, String toolTip, String action, JToolBar toolbar) Helper method to build a text button for the toolbar.protected voidHelper method to build an icon button for the toolbar.protected voidprivate voidConvenience method created to simplify configureFrame().protected voidConvenience method created to simplify configureFrame().protected JToolBarbuildMagToolBar(int boxLayout) Builds the image toolbar for zoomingprotected JMenuBarBuilds menus for the tri-planar view.protected JButtonbuildNamedTextButton(String text, String toolTip, String action, JToolBar toolbar) Helper method to build a text button for the toolbar.protected JToolBarbuildPaintToolBar(int boxLayout) Builds the paint toolbarprotected voidbuildProgressBar(String imageName, String message, int start, int end) Constructs progress bar.buildTImageSliderLabels(int min, int max) Builds the slider labels for the time slider.protected voidbuildToggleButton(String icon, String toolTip, String action, String iconroll, ButtonGroup group, JToolBar toolbar) Helper method to build a toggle button for the toolbar.protected voidbuildToggleButton(String icon, String toolTip, String action, String iconroll, ButtonGroup group, JToolBar toolbar, boolean selected) Helper method to build a toggle button for the toolbar.protected JMenubuildToolbarMenu(boolean showPaintToolbar) protected voidBuilds the toolbars for the tri-planar view.protected ViewJComponentTriImagebuildTriImage(ModelImage imageA, ModelLUT lutA, ModelRGB RGBTa, ModelImage imageB, ModelLUT lutB, ModelRGB RGBTb, int orientation) This method creates an image from the two ModelImage objects and ModelLUT objects passed as parameters.protected voidBuilds the volume position panel, which is the panel that sits in the plug-in area of the 2x2 tri-planar layout.protected final voidClears the volumePositionPanel, so it can be recreated when the volumePositionFrame is closed:.voidCloses the image B and performs cleanup.protected voidConstructs main frame structures for 3 images (image A only) or 9 images (image A and image B).voidcreate3DVOI(boolean bIntersection) voidShould be called when window is closing to perform cleanup.protected voidThis is an alternative layout arrangement.voidenableBoth(boolean bEnable) protected voidfinalize()DOCUMENT ME!protected voidfireCoordinateChange(int i, int j, int k) Tell coordinate change listeners about a coordinate change (after changing the coordinate to image volume space from the tri-planar space).intGets the axial position of the slice.Returns the crop bounding volume as a CubeBounds object.int[]Sets the x coordinate of the point to be the center of the transformed image.WildMagic.LibFoundation.Mathematics.Vector3fGets reference to control widgets for frame.intGets the y position of the slice.intGet the last point that the position labels got set to.getFrame()Accessor that returns the reference to imageA.Accessor that returns the reference to imageB.Gets the linked ViewJFrameTriImage.protected floatgetOptimalZoom(int desiredWidth, int desiredHeight) Calculates the optimal zoom value for an image based on the two parameters desiredWidth and desiredHeight.Returns a reference to the ViewJFrameImage object that is the parent of this frame.intGets the x position of the slice.intReturns an integer which represents the image that is selected.getTriImage(int index) Returns a reference to one of the component tri-image components.Gets the color of the X slice crosshair.Gets the color of the Y slice crosshair.Gets the color of the Z slice crosshair.protected voidMethod handles transformations for least squares algorithm in the tri-planar frame.protected voidThis method will load a plug-in into the plug-in area of the tri-planar frame.protected voidDOCUMENT ME!protected voidinit()Initialize the the image orientations and call the frame layout method 'configureFrame()'.protected voidInitializes the progress bar.protected voidinitVOI()Initialize the 3D VOI interface.booleanAlways returns true.protected booleanHelper method to establish if there are images of the same dimensionality so that a dialog can be created.voiditemStateChanged(ItemEvent event) Does setBorderPainted for the appropriate button.voidkeyPressed event method for KeyListener.voidkeyReleased event method for KeyListener.voidDOCUMENT ME!protected JButtonMakes a separator for the use in the toolbars.voidvoidmouseClicked(MouseEvent event) DOCUMENT ME!voidmouseEntered(MouseEvent event) DOCUMENT ME!voidmouseExited(MouseEvent event) DOCUMENT ME!voidmousePressed(MouseEvent event) DOCUMENT ME!voidmouseReleased(MouseEvent event) DOCUMENT ME!voidvoidvoidPointerActive(boolean bActive) WildMagic.LibFoundation.Mathematics.Vector3fPropDown(int iActive) WildMagic.LibFoundation.Mathematics.Vector3fPropUp(int iActive) voidRemoves the menu and controls of the main frame so that a new frame can load the main frame with the proper controls.voidRemove a coordinate change listener from this frame's list.private voidMethod that goes to the lps coordinate that is enteredprivate voidMethod that goes to the ras coordinate that is enteredvoidsetActiveImage(int active) Set the active image for drawing VOIs.voidsetActiveImage(ModelImage kImage) voidsetAlphaBlend(int value) Sets the alpha blending of parameter for two image displaying.voidsetCenter(int i, int j, int k) sets the crosshair positions and slices for each of the triImages.voidsetCenter(int i, int j, int k, boolean checkLinkedScroll) sets the crosshair positions and slices for each of the triImages.voidsetCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter) voidSets the menu and controls (i.e. toolbars) of the main frame!voidsetCrop(WildMagic.LibFoundation.Mathematics.Vector3f lower, WildMagic.LibFoundation.Mathematics.Vector3f upper) Sets the new crop volume in the ViewJComponentTriImage frames and sets the volumeBounds.voidsetCurrentOrientation(int currentOrientation) voidvoidSets modes in all images to ViewJComponentBase.DEFAULT.voidsetEnabled(boolean flag) Controls whether or not the images/VOIs of the frame can be modified.voidsetImageA(ModelImage image) Changes imageA to a new model image reference.protected voidsetImageActiveInTriComponents(int activeImage) DOCUMENT ME!voidsetImageB(ModelImage _imageB) Accessor that sets the reference to imageB.voidsetImageB(ModelImage _imageB, boolean disposeOldB) Accessor that sets the reference to imageB.voidsetImageSelectorPanelVisible(boolean visible) this method either shows or hides the image selector panel, based on the value of the parameter.voidsetIntensityDropper(float intensityDropper) Sets paint intensity in axial image.voidsetIntensityPaintName(float intensityDropper) Sets integer value on intensityPaintButton.voidsetLinkButtonSelected(boolean selected) Sets whether the linking button should be set for this image, implies that this image will be linked to another tri-frame when truevoidAccessor that sets the LUT.voidAccessor that sets the LUT.voidprotected voidsetOldLayout(boolean bLayout) Transition between the 2x2 window layout and 3x1 window layout:voidsetPaintBitmapSwitch(boolean paintBitmapSwitch) When switching the active image, take the paintBitmap of the previous active image as the paintBitmap of the new active image Currenlty unused.voidsetPaintColor(Color color) Sets the color of the paint.voidsetPaintMask(BitSet mask) voidsetPositionLabels(int x, int y, int z) Sets the labels which show the absolute position within the image volume and the patient position.voidSets the RGB table for ARGB image A.voidSets the RGB table for image B.voidsetSlice(int slice) Does nothing.voidsetSlices(int x, int y, int z) Sets the slice index for each plane in the frame and components.voidsetSlicesFromFrame(int x, int y, int z) Called from the "normal" image component, sets the slices for the tri planar view to display.private voidsetSpinnerValues(int type) Sets the spinner values based on image type.protected voidsetTalairachPositionLabels(int x, int y, int z) Sets the labels that refer to Talairach position within the image.voidsetTimeSlice(int slice) Sets the slice to be displayed and updates title frame.voidsetTimeSlice(int slice, boolean checkedLinkedScroll) Sets the slice to be displayed and updates title frame.voidsetTitle()Sets the title bar for the tri-image frame.voidSets the traverse button to selected.voidsettTalVoxLabelText(String text) private voidsetVolumeBounds(WildMagic.LibFoundation.Mathematics.Vector3f lower, WildMagic.LibFoundation.Mathematics.Vector3f upper) Sets the CubeBounds data member volumeBounds to the crop volume defined by the lower and upper volume points.voidsetVolumeCenter(int x, int y, int z) Sets the x coordinate of the point to be the center of the transformed image.voidsetVolumeCenter(Point3D newVolumeCenter) Sets the x coordinate of the point to be the center of the transformed image.voidSets the color of the X slice crosshairs.voidSets the color of the Y slice crosshairs.voidSets the color of the Z slice crosshairs.voidSets values based on knob along time slider.private voidMethod that goes to the talairach coordinate that is enteredvoidprotected voidupdateHistoLUTFrame(int imageAorB) Deprecated.booleanDo nothing - required by ViewJFrameBase.booleanThis methods calls the componentImage's update method to redraw the screen.booleanupdateImages(boolean forceShow) This methods calls the componentImage's update method to redraw the screen.booleanupdateImages(boolean forceShow, int interpMode) This methods calls the componentImage's update method to redraw the screen.booleanupdateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode) This methods calls the componentImage's update method to redraw the screen.voidupdateImageSubset(ViewJComponentTriImage triImage) DOCUMENT ME!protected voidThis method should be called whenever the layout of the tri-images has changed.protected voidupdatePaint(BitSet paintMap) The purpose of this method is to set the paint bitmap so that it is the same for all 9 images.voidwindowClosing(WindowEvent event) Closes window and disposes of frame and component.voidwindowOpened(WindowEvent event) Does nothing.protected voidzoomInFrame(int frame) this method will zoom in a particular frame.protected voidzoomOutFrame(int frame) this method will zoom out a particular frame.Methods inherited from class gov.nih.mipav.view.ViewJFrameBase
about, buildLabelPanel, canCloseImageBAfterLoad, close, close, componentHidden, componentMoved, componentResized, componentShown, 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, setLastState, setLinkedFrame, setLinkedTriFrame, setLUTs, setMessageText, setOpacityInfo, setpaintBitmap, setScannerPosition, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconifiedMethods 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, dispose, 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, 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, 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
-
IMAGE_ALIGN_TOOLBAR
- See Also:
-
VOI_TOOLBAR
- See Also:
-
PAINT_TOOLBAR
- See Also:
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
ATLAS_BBOX_LAT
public static final float ATLAS_BBOX_LATDimensions used for Talairach view clipping box - lateral.- See Also:
-
ATLAS_BBOX_ANT
public static final float ATLAS_BBOX_ANTDimensions used for Talairach view clipping box - anterior.- See Also:
-
ATLAS_BBOX_POS
public static final float ATLAS_BBOX_POSDimensions used for Talairach view clipping box - posterior.- See Also:
-
ATLAS_BBOX_INF
public static final float ATLAS_BBOX_INFDimensions used for Talairach view clipping box - inferior.- See Also:
-
ATLAS_BBOX_SUP
public static final float ATLAS_BBOX_SUPDimensions used for Talairach view clipping box - superior.- See Also:
-
ATLAS_BBOX_INF_NEW
public static final float ATLAS_BBOX_INF_NEWDimensions used for Talairach view clipping box - inferior new. 3/06/96: extra 10 mm for cerebellum .- See Also:
-
ATLAS_AC_TO_LAT
public static final float ATLAS_AC_TO_LATDimensions used for Talairach coordinates - lateral.- See Also:
-
ATLAS_AC_TO_ANT
public static final float ATLAS_AC_TO_ANTDimensions used for Talairach coordinates - anterior.- See Also:
-
ATLAS_PC_TO_POS
public static final float ATLAS_PC_TO_POSDimensions used for Talairach coordinates - posterior.- See Also:
-
ATLAS_AC_TO_INF
public static final float ATLAS_AC_TO_INFDimensions used for Talairach coordinates - inferior.- See Also:
-
ATLAS_AC_TO_SUP
public static final float ATLAS_AC_TO_SUPDimensions used for Talairach coordinates - superior.- See Also:
-
ATLAS_AC_TO_PC
public static final float ATLAS_AC_TO_PCAC to PC dimension.- See Also:
-
AXIAL_A
public static final int AXIAL_ADOCUMENT ME!- See Also:
-
SAGITTAL_A
public static final int SAGITTAL_ADOCUMENT ME!- See Also:
-
CORONAL_A
public static final int CORONAL_ADOCUMENT ME!- See Also:
-
AXIAL_AB
public static final int AXIAL_ABDOCUMENT ME!- See Also:
-
SAGITTAL_AB
public static final int SAGITTAL_ABDOCUMENT ME!- See Also:
-
CORONAL_AB
public static final int CORONAL_ABDOCUMENT ME!- See Also:
-
AXIAL_B
public static final int AXIAL_BDOCUMENT ME!- See Also:
-
SAGITTAL_B
public static final int SAGITTAL_BDOCUMENT ME!- See Also:
-
CORONAL_B
public static final int CORONAL_BDOCUMENT ME!- See Also:
-
NUM_INVISIBLE_BUTTONS
protected static final int NUM_INVISIBLE_BUTTONSWe want to be able to toggle the bounding box button, but don't want it to be part of any other button group. The button group can't be programmatically set to "unselected" after its already been selected. To emulate this behavior, I'm adding an invisible button to the button group that will be "toggled" on and off when the user clicks the bounding box button. These two buttons will act as the button group.- See Also:
-
MAX_INITIAL_TRI_IMAGES
public static final int MAX_INITIAL_TRI_IMAGESMaximum number of initial tri-images!- See Also:
-
OLD_LAYOUT
A constant for which to test in the actionPerformed.- See Also:
-
PANEL_PLUGIN
A constant for which to test in the actionPerformed.- See Also:
-
DEFAULT_OPTIMAL_ZOOM
protected static final int DEFAULT_OPTIMAL_ZOOMConstant to determine how many pixels would be optimal for the image to be initially zoomed to.- See Also:
-
scrollPane
DOCUMENT ME! -
triImage
DOCUMENT ME! -
triImagePanel
DOCUMENT ME! -
btnInvisible
DOCUMENT ME! -
bufferFactor
protected int bufferFactor1 for black and white, 4 for color. -
centerButtonSelected
protected boolean centerButtonSelectedDOCUMENT ME! -
chkShowTalairachGrid
"Show talairach grid" checkbox. -
chkShowTalairachGridMarkers
"Show talairach gridmarkers" checkbox. -
color
Color of the paint. -
colorChooser
Color chooser to use when selecting paint color. -
colorPaintButton
Button for changing the color of the paint. -
controls
Used to obtain initial paint opacity and color. -
coordinateListeners
A list of CoordinateChangeListeners who want to know about changes to the coordinate currently pointed to by the tri-image frame's crosshairs. -
crosshairSpinner
Spinner component for the crosshair gap size. -
currentAbsolutePositionLabels
The current values of the absolute position labels. -
defaultPreferredHeight
protected int defaultPreferredHeightThe default hight of the window, if it cannot be calculated. -
extents
protected int[] extentsExtents of image. -
imageToolBar
Image control toolbar. -
VOIGroup
-
imageAlignToolBar
-
intensitySpinner
Spinner component for the paint intensity. -
talairachPanel
Panel for Talairach position display. -
viewPanel
Panel for switching between radiological and neurological viewing conventions. -
labelXTal
Label the Talairach position x value in the image volume. -
labelYTal
Label the Talairach position y value in the image volume. -
labelZTal
Label the Talairach position z value in the image volume. -
xTalLabel
-
yTalLabel
-
zTalLabel
-
oldLayout
protected boolean oldLayoutDOCUMENT ME! -
OPACITY
protected float OPACITYOpacity of paint. -
paintBrushNames
List of built-in and user-defined paint brushes. -
paintToolBar
Paint tool bar. -
borderPaintButton
-
bogusBorderPaintButton
-
panelActiveImage
Panel for deciding which image is active; appears when 2 images are loaded. -
panelToolbar
Panel that holds the toolbars. -
panelToolBarGBC
-
parentFrame
Reference to the parent window. -
pluginPanel
Reference to the plug-in panel in the 2x2 (old) layout. -
radioImageA
Radio button for selecting image A as active. -
radioImageB
Radio button for selecting image B as active. -
radioImageBoth
Radio button for selecting both images as active. -
resols
protected float[] resolsResolutions of image. -
scrollOriginalCrosshair
protected boolean scrollOriginalCrosshairFlag telling the crosshair movement to update slice in original image frame. -
showTalairachGrid
protected boolean showTalairachGridFlag for showing the Talairach grid on the component images. -
showTalairachPosition
protected boolean showTalairachPositionFlag for showing the Talairach position on the component images. -
tDim
protected int tDimTime dimension of the original image. -
tImageSlider
Slider for 4D images, time dimension. -
traverseButton
Button for traversing the images. -
tSlice
protected int tSliceTime slice that this image is on. -
units
protected int[] unitsUnits of image - mm, inches, etc. -
useInfNew
protected boolean useInfNewif true use cerebellum-adjusted static variable. -
volumeCenter
protected int[] volumeCenterThe point to become center of transformed image. -
volumePositionFrame
Reference to the volume coordinate frame. -
volumePositionPanel
Reference to the volume coordinate panel when it is in the plug-in position. -
zoom
protected float zoomMagnification for image. -
addPointToggleButton
Toggle buttons for voi/points -
dropperPaintToggleButton
Toggle buttons for voi/points -
paintCanToggleButton
Toggle buttons for voi/points -
indivMagButton
refs to indiviadual frame zooming in and out buttons. -
indivMinButton
refs to indiviadual frame zooming in and out buttons. -
leastSquaresButton
DOCUMENT ME! -
magButton
refs to the magnify and minimize button.* -
minButton
refs to the magnify and minimize button.* -
paintBox
Box holding the list of available paint brushes. -
paintBrushLocked
private boolean paintBrushLockedused with the above to say the paint brush has been changed, waiting to change back. -
quickPaintBrushIndex
private int quickPaintBrushIndexint used for quick-key painting for speedier paint brush access. -
scrollButton
The button that indicates whether this triframe is linked with tri-frames of similar dimensionality. -
spinnerDefaultValue
private double spinnerDefaultValueUsed to setup the paint spinner. -
spinnerMin
private double spinnerMinUsed to setup the paint spinner. -
spinnerMax
private double spinnerMaxUsed to setup the paint spinner. -
spinnerStep
private double spinnerStepUsed to setup the paint spinner. -
toolbarBuilder
Toolbar builder reference. -
tpSplineButton
DOCUMENT ME! -
volumeBounds
Volume Boundary may be changed for cropping the volume. -
voiMenu
Menu displaying VOI options -
voiManager
The VOI managers for each triComponent -
iTalLabel
talaraich intensity label* -
tTalVoxLabel
talairach voxel label * -
currentOrientation
private int currentOrientation -
RGBTa
RGB tables for imageA and imageB -
RGBTb
RGB tables for imageA and imageB -
v
static int v
-
-
Constructor Details
-
ViewJFrameTriImage
Creates a JFrameBase without calling gui initialization, init() must be called after pre-processing has completed.- Parameters:
_imageA- First image to display_imageB- Second loaded image
-
ViewJFrameTriImage
public ViewJFrameTriImage(ModelImage _imageA, ModelLUT LUTa, ModelImage _imageB, ModelLUT LUTb, ViewControlsImage controls, ViewJFrameImage parent) Make a frame and puts an image component into it.- Parameters:
_imageA- First image to displayLUTa- LUT of the imageA (if null grayscale LUT is constructed)_imageB- Second loaded imageLUTb- LUT of the imageBcontrols- controls used to obtain initial OPACITY and colorparent- main user interface frame.
-
ViewJFrameTriImage
public ViewJFrameTriImage(ModelImage _imageA, ModelLUT LUTa, ModelRGB RGBTa, ModelImage _imageB, ModelLUT LUTb, ModelRGB RGBTb, ViewControlsImage controls, ViewJFrameImage parent)
-
-
Method Details
-
actionPerformed
Calls various methods depending on the action.- Specified by:
actionPerformedin interfaceActionListener- Specified by:
actionPerformedin classViewJFrameBase- Parameters:
event- event that triggered function
-
scannerRASGoTo
private void scannerRASGoTo()Method that goes to the ras coordinate that is entered -
scannerLPSGoTo
private void scannerLPSGoTo()Method that goes to the lps coordinate that is entered -
absoluteGoTo
public void absoluteGoTo()Method that goes to the absolute voxel coordinate that is entered -
talairachGoTo
private void talairachGoTo()Method that goes to the talairach coordinate that is entered -
addCoordinateChangeListener
Add someone who wants to be notified about crosshair coordinate changes.- Parameters:
listener- the listener
-
addTabbedPane
public void addTabbedPane()Called when the volumePositionFrame closes, the volumePositionPanel is again displayed in the window:. -
closeImageB
public void closeImageB()Closes the image B and performs cleanup.- Overrides:
closeImageBin classViewJFrameBase
-
disposeLocal
public void disposeLocal()Should be called when window is closing to perform cleanup. -
enableBoth
public void enableBoth(boolean bEnable) -
getAxialComponentSlice
public int getAxialComponentSlice()Gets the axial position of the slice.- Returns:
- The axial location in the slice.
-
getBoundedVolume
Returns the crop bounding volume as a CubeBounds object.- Returns:
- volumeBounds the crop volume
-
getCenter
public int[] getCenter()Sets the x coordinate of the point to be the center of the transformed image.- Returns:
- DOCUMENT ME!
-
getCenterPt
public WildMagic.LibFoundation.Mathematics.Vector3f getCenterPt()- Specified by:
getCenterPtin interfaceVOIManagerInterfaceListener
-
getControls
Gets reference to control widgets for frame.- Specified by:
getControlsin classViewJFrameBase- Returns:
- controls
-
getCoronalComponentSlice
public int getCoronalComponentSlice()Gets the y position of the slice.- Returns:
- The y location in the slice.
-
getCurrentPositionLabels
Get the last point that the position labels got set to.- Returns:
- the current values for the absolute position labels
-
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
-
getLinkedTriFrame
Gets the linked ViewJFrameTriImage.- Returns:
- linkedFrame
-
getParentFrame
Returns a reference to the ViewJFrameImage object that is the parent of this frame.- Returns:
- a reference to the ViewJFrameImage object that is the parent of this frame
-
getSagittalComponentSlice
public int getSagittalComponentSlice()Gets the x position of the slice.- Returns:
- The x location in the slice.
-
getSelectedImage
public int getSelectedImage()Returns an integer which represents the image that is selected. The possible values are ViewJComponentBase.BOTH, ViewJComponentBase.IMAGE_A, ViewJComponentBase.IMAGE_B- Returns:
- int the image that is selected in the active image panel
-
getTriImage
Returns a reference to one of the component tri-image components.- Parameters:
index- int the index of the component tri-image to get. Possibilies are AXIAL_A, AXIAL_B, AXIAL_AB, CORONAL_A, CORONAL_B, CORONAL_AB, SAGITTAL_A, SAGITTAL_B, SAGITTAL_AB- Returns:
- ViewJComponentTriImage
-
getXSliceHairColor
Gets the color of the X slice crosshair.- Returns:
- Color the color of the X slice crosshair
-
getYSliceHairColor
Gets the color of the Y slice crosshair.- Returns:
- Color the color of the Y slice crosshair
-
getZSliceHairColor
Gets the color of the Z slice crosshair.- Returns:
- Color the color of the Z slice crosshair
-
isFocusable
public boolean isFocusable()Always returns true.- Overrides:
isFocusablein classComponent- Returns:
- boolean always returns true
-
itemStateChanged
Does setBorderPainted for the appropriate button.- Specified by:
itemStateChangedin interfaceItemListener- Parameters:
event- Event that triggered this function
-
keyPressed
keyPressed event method for KeyListener.- Specified by:
keyPressedin interfaceKeyListener- Parameters:
e- KeyEvent
-
keyReleased
keyReleased event method for KeyListener.- Specified by:
keyReleasedin interfaceKeyListener- Parameters:
e- KeyEvent
-
keyTyped
DOCUMENT ME!- Specified by:
keyTypedin interfaceKeyListener- Parameters:
e- DOCUMENT ME!
-
mouseClicked
DOCUMENT ME!- Specified by:
mouseClickedin interfaceMouseListener- Parameters:
event- DOCUMENT ME!
-
mouseEntered
DOCUMENT ME!- Specified by:
mouseEnteredin interfaceMouseListener- Parameters:
event- DOCUMENT ME!
-
mouseExited
DOCUMENT ME!- Specified by:
mouseExitedin interfaceMouseListener- Parameters:
event- DOCUMENT ME!
-
mousePressed
DOCUMENT ME!- Specified by:
mousePressedin interfaceMouseListener- Parameters:
event- DOCUMENT ME!
-
mouseReleased
DOCUMENT ME!- Specified by:
mouseReleasedin interfaceMouseListener- Parameters:
event- DOCUMENT ME!
-
removeControls
public void removeControls()Removes the menu and controls of the main frame so that a new frame can load the main frame with the proper controls. Currently unused.- Specified by:
removeControlsin classViewJFrameBase
-
removeCoordinateChangeListener
Remove a coordinate change listener from this frame's list.- Parameters:
listener- a coordinate change listener (hopefully in the list..)
-
setActiveImage
public void setActiveImage(int active) Set the active image for drawing VOIs. VOIs are only drawn in the active image. In addition, algorithms are executed on the active window.- Specified by:
setActiveImagein interfaceVOIManagerInterfaceListener- Specified by:
setActiveImagein classViewJFrameBase- Parameters:
active- ViewJComponentBase.IMAGE_A or ViewJComponentBase.IMAGE_B
-
setAlphaBlend
public void setAlphaBlend(int value) Sets the alpha blending of parameter for two image displaying.- Specified by:
setAlphaBlendin classViewJFrameBase- Parameters:
value- amount [0,100] that is the percentage of Image A to be displayed
-
setCenter
public void setCenter(int i, int j, int k) sets the crosshair positions and slices for each of the triImages. The inputs are in FileCoordinates, and are passed to the triImages in FileCoordinates. Each triImage converts from FileCoordinates to the local PatientCoordinate space, based on the triImage orientation (FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL).- Parameters:
i- model space coordinatej- model space coordinatek- model space coordinate
-
setCenter
public void setCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter) - Specified by:
setCenterin interfaceVOIManagerInterfaceListener
-
setCenter
public void setCenter(int i, int j, int k, boolean checkLinkedScroll) sets the crosshair positions and slices for each of the triImages. The inputs are in FileCoordinates, and are passed to the triImages in FileCoordinates. Each triImage converts from FileCoordinates to the local PatientCoordinate space, based on the triImage orientation (FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL).- Parameters:
i- model space coordinatej- model space coordinatek- model space coordinatecheckLinkedScroll- (boolean telling whether to look for linked images to sync scroll... necessary to avoid infinite loop)
-
setControls
public void setControls()Sets the menu and controls (i.e. toolbars) of the main frame! This puts the menus and controls needed to controls the operations of this frame. Different image frames have different menu and controls. Currently unused.- Specified by:
setControlsin classViewJFrameBase
-
setCrop
public void setCrop(WildMagic.LibFoundation.Mathematics.Vector3f lower, WildMagic.LibFoundation.Mathematics.Vector3f upper) Sets the new crop volume in the ViewJComponentTriImage frames and sets the volumeBounds.- Parameters:
lower- the lower corner of the crop volume in File Coordinatesupper- the upper corner of the crop volume in File Coordinates
-
setDefault
public void setDefault()Sets modes in all images to ViewJComponentBase.DEFAULT. -
setEnabled
public void setEnabled(boolean flag) Controls whether or not the images/VOIs of the frame can be modified.- Specified by:
setEnabledin classViewJFrameBase- Parameters:
flag- if true the image/VOIs can be modified; if false image/VOIs can NOT be modified
-
setImageA
Changes imageA to a new model image reference. Swaps the references in the frame and all the component images.- Overrides:
setImageAin classViewJFrameBase- Parameters:
image- the new image to use
-
setImageB
Accessor that sets the reference to imageB. Includes changing the frame's reference and the references the components keep.- Specified by:
setImageBin classViewJFrameBase- Parameters:
_imageB- image to set the frame to
-
setImageB
Accessor that sets the reference to imageB. Includes changing the frame's reference and the references the components keep. UnlikesetImageB(ModelImage)this method matches the functionality ofsetImageA(ModelImage)- Parameters:
_imageB- image to set the frame to
-
setImageSelectorPanelVisible
public void setImageSelectorPanelVisible(boolean visible) this method either shows or hides the image selector panel, based on the value of the parameter.- Parameters:
visible- DOCUMENT ME!
-
setIntensityDropper
public void setIntensityDropper(float intensityDropper) Sets paint intensity in axial image.- Parameters:
intensityDropper- the paint intensity value for the XY image
-
setIntensityPaintName
public void setIntensityPaintName(float intensityDropper) Sets integer value on intensityPaintButton.- Parameters:
intensityDropper- the paint button intensity value to show
-
setLUTa
Accessor that sets the LUT.- Overrides:
setLUTain classViewJFrameBase- Parameters:
LUT- the LUT
-
setLUTb
Accessor that sets the LUT.- Overrides:
setLUTbin classViewJFrameBase- Parameters:
LUT- the LUT
-
setPaintBitmapSwitch
public void setPaintBitmapSwitch(boolean paintBitmapSwitch) When switching the active image, take the paintBitmap of the previous active image as the paintBitmap of the new active image Currenlty unused.- Specified by:
setPaintBitmapSwitchin classViewJFrameBase- Parameters:
paintBitmapSwitch- if true don't do a getMask on the new actve image
-
setPaintColor
Sets the color of the paint.- Parameters:
color- Color the desired color of the paint
-
setPositionLabels
public void setPositionLabels(int x, int y, int z) Sets the labels which show the absolute position within the image volume and the patient position.- Parameters:
x- the x volume coordinatey- the y volume coordinatez- the z volume coordinate
-
setRGBTA
Sets the RGB table for ARGB image A.- Specified by:
setRGBTAin classViewJFrameBase- Parameters:
RGBT- the new RGB transfer functions for imageA
-
setRGBTB
Sets the RGB table for image B.- Specified by:
setRGBTBin classViewJFrameBase- Parameters:
RGBT- the new RGB transfer functions for imageB
-
setLinkButtonSelected
public void setLinkButtonSelected(boolean selected) Sets whether the linking button should be set for this image, implies that this image will be linked to another tri-frame when true -
setSlice
public void setSlice(int slice) Does nothing.- Specified by:
setSlicein interfaceViewImageUpdateInterface- Parameters:
slice- the slice to show
-
setSlices
public void setSlices(int x, int y, int z) Sets the slice index for each plane in the frame and components. Should be zero indexed.- Parameters:
x- slice index in the patienty- slice index in the patientz- slice index in the patient
-
setSlicesFromFrame
public void setSlicesFromFrame(int x, int y, int z) Called from the "normal" image component, sets the slices for the tri planar view to display. Parameters are in terms of the image volume and so must be converted.- Parameters:
x- X Slice of image.y- Y Slice of image.z- Z Slice of image.
-
setTimeSlice
public void setTimeSlice(int slice) Sets the slice to be displayed and updates title frame.- Specified by:
setTimeSlicein interfaceViewImageUpdateInterface- Parameters:
slice- indicates image time-slice (4th dimension) to be displayed
-
setTimeSlice
public void setTimeSlice(int slice, boolean checkedLinkedScroll) Sets the slice to be displayed and updates title frame.- Parameters:
slice- indicates image time-slice (4th dimension) to be displayedcheckedLinkedScroll- whether corresponding tri-frames should also be scrolled
-
setTitle
public void setTitle()Sets the title bar for the tri-image frame. Called for initialization and updating. Displays time series location for 4D volumes.- Specified by:
setTitlein classViewJFrameBase
-
setTraverseButton
public void setTraverseButton()Sets the traverse button to selected. -
setVolumeCenter
Sets the x coordinate of the point to be the center of the transformed image.- Parameters:
newVolumeCenter- The x coordinate of the center.
-
setVolumeCenter
public void setVolumeCenter(int x, int y, int z) Sets the x coordinate of the point to be the center of the transformed image.- Parameters:
x- The x coordinate of the center.y- DOCUMENT ME!z- DOCUMENT ME!
-
setXSliceHairColor
Sets the color of the X slice crosshairs.- Parameters:
c- Color the color to set the X slice to
-
setYSliceHairColor
Sets the color of the Y slice crosshairs.- Parameters:
c- Color the color to set the Y slice to
-
setZSliceHairColor
Sets the color of the Z slice crosshairs.- Parameters:
c- Color the color to set the Z slice to
-
stateChanged
Sets values based on knob along time slider.- Specified by:
stateChangedin interfaceChangeListener- Overrides:
stateChangedin classViewJFrameBase- Parameters:
e- Event that triggered this function
-
updateImageExtents
public boolean updateImageExtents()Do nothing - required by ViewJFrameBase.- Specified by:
updateImageExtentsin interfaceViewImageUpdateInterface- Specified by:
updateImageExtentsin classViewJFrameBase- Returns:
- always false
- See Also:
-
updateImages
public boolean updateImages()This methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Returns:
- boolean confirming successful update
-
updateImages
public 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- forces show to reimport image and calc. java image- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages(boolean forceShow, int interpMode) This methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Parameters:
forceShow- forces show to reimport image and calc. java imageinterpMode-- Returns:
- boolean confirming successful update
-
updateImages
This methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
LUTa- LUT used to update imageALUTb- LUT used to update imageBforceShow- forces show to reimport image and calc. java imageinterpMode- image interpolation method (Nearest or Smooth)- Returns:
- boolean confirming successful update
-
updateImageSubset
DOCUMENT ME!- Parameters:
triImage- DOCUMENT ME!
-
windowClosing
Closes window and disposes of frame and component.- Specified by:
windowClosingin interfaceWindowListener- Overrides:
windowClosingin classViewJFrameBase- Parameters:
event- Event that triggered function
-
windowOpened
Description copied from class:ViewJFrameBaseDoes nothing.- Specified by:
windowOpenedin interfaceWindowListener- Overrides:
windowOpenedin classViewJFrameBase- Parameters:
event- the window event
-
buildActiveImagePanel
protected void buildActiveImagePanel()Builds the active image panel for choosing which image (A, B, or BOTH) to perform operations on. -
buildDisabledTextButton
protected void buildDisabledTextButton(String text, String toolTip, String action, JToolBar toolbar) Helper method to build a text button for the toolbar.- Parameters:
text- Text for button.toolTip- Tool tip to be associated with button.action- Action command for button.toolbar- Tool bar to add this button to.
-
buildIconButton
protected void buildIconButton(String icon, String toolTip, String action, String iconroll, JToolBar toolbar) Helper method to build an icon button for the toolbar.- Parameters:
icon- Name of icon for button.toolTip- Tool tip to be associated with button.action- Action command for button.iconroll- Name of icon for rollover.toolbar- Tool bar to add this button to.
-
buildMenu
Builds menus for the tri-planar view.- Returns:
- the tri-image frame menu bar
-
buildToolbarMenu
-
buildNamedTextButton
protected JButton buildNamedTextButton(String text, String toolTip, String action, JToolBar toolbar) Helper method to build a text button for the toolbar.- Parameters:
text- Text for button.toolTip- Tool tip to be associated with button.action- Action command for button.toolbar- Tool bar to add this button to.- Returns:
- the new named text button
-
buildProgressBar
Constructs progress bar.- Parameters:
imageName- The name of the image.message- Message to be displayed in the framestart- Start (typical = 0)end- End (typical = 100)
-
buildTImageSliderLabels
Builds the slider labels for the time slider.- Parameters:
min- Min value of slidermax- Max value of slider.- Returns:
- Slider labels hash.
-
buildToggleButton
protected void buildToggleButton(String icon, String toolTip, String action, String iconroll, ButtonGroup group, JToolBar toolbar) Helper method to build a toggle button for the toolbar.- Parameters:
icon- Name of icon for button.toolTip- Tool tip to be associated with button.action- Action command for button.iconroll- Name of icon for rollover.group- Button group to add this toggle to.toolbar- Tool bar to add this button to.
-
buildToggleButton
protected void buildToggleButton(String icon, String toolTip, String action, String iconroll, ButtonGroup group, JToolBar toolbar, boolean selected) Helper method to build a toggle button for the toolbar.- Parameters:
icon- Name of icon for button.toolTip- Tool tip to be associated with button.action- Action command for button.iconroll- Name of icon for rollover.group- Button group to add this toggle to.toolbar- Tool bar to add this button to.selected- whether or not the button is initially selected
-
buildToolbars
protected void buildToolbars()Builds the toolbars for the tri-planar view. -
buildMagToolBar
Builds the image toolbar for zooming- Parameters:
boxLayout- the layout to apply- Returns:
- imageToolBar
-
buildPaintToolBar
Builds the paint toolbar- Parameters:
boxLayout- layout to apply- Returns:
- the paintToolBar
-
buildImageAlignToolBar
protected void buildImageAlignToolBar() -
buildTriImage
protected ViewJComponentTriImage buildTriImage(ModelImage imageA, ModelLUT lutA, ModelRGB RGBTa, ModelImage imageB, ModelLUT lutB, ModelRGB RGBTb, int orientation) This method creates an image from the two ModelImage objects and ModelLUT objects passed as parameters.- Parameters:
imageA- ModelImage image AlutA- ModelLUT image A's LUTimageB- ModelImage image BlutB- ModelLUT image B's LUTorientation- the desired orientation of the result image- Returns:
- ViewJComponentTriImage
-
buildVolumePositionPanel
protected void buildVolumePositionPanel()Builds the volume position panel, which is the panel that sits in the plug-in area of the 2x2 tri-planar layout. -
gettTalVoxLabel
-
settTalVoxLabelText
-
configureFrame
protected void configureFrame()Constructs main frame structures for 3 images (image A only) or 9 images (image A and image B). Assumes imageA is not null. Builds the labels for the position frame. Adds the tri-images to this frame's layout. -
doOldLayout
protected void doOldLayout()This is an alternative layout arrangement. It is the original layout before the tri-planar and the dual tri-planar were merged into this class. -
finalize
DOCUMENT ME!- Overrides:
finalizein classViewJFrameBase- Throws:
Throwable- DOCUMENT ME!
-
fireCoordinateChange
protected void fireCoordinateChange(int i, int j, int k) Tell coordinate change listeners about a coordinate change (after changing the coordinate to image volume space from the tri-planar space).- Parameters:
i- the x coordinatej- the y coordinatek- the z coordinate
-
handleLeastSquares
protected void handleLeastSquares()Method handles transformations for least squares algorithm in the tri-planar frame. -
handlePluginPanelSelection
protected void handlePluginPanelSelection()This method will load a plug-in into the plug-in area of the tri-planar frame. The plug-in must extend java.awt.Component, and take this class as the only parameter to its constructor. -
handleTPSpline
protected void handleTPSpline()DOCUMENT ME! -
init
protected void init()Initialize the the image orientations and call the frame layout method 'configureFrame()'. -
initProgressBar
protected void initProgressBar()Initializes the progress bar. Sets the location relative the middle the screen and makes it visible. -
isMultipleSameSizeTriImages
protected boolean isMultipleSameSizeTriImages()Helper method to establish if there are images of the same dimensionality so that a dialog can be created. Used by image calculator, concat, etc.- Returns:
trueif there are images to operate on.
-
makeSeparator
Makes a separator for the use in the toolbars.- Returns:
- Separator for the toolbar.
-
setImageActiveInTriComponents
protected void setImageActiveInTriComponents(int activeImage) DOCUMENT ME!- Parameters:
activeImage- DOCUMENT ME!
-
setTalairachPositionLabels
protected void setTalairachPositionLabels(int x, int y, int z) Sets the labels that refer to Talairach position within the image.- Parameters:
x- Absolute x value in slice.y- Absolute y value in slice.z- Absolute z value in slice.
-
updateHistoLUTFrame
protected void updateHistoLUTFrame(int imageAorB) Deprecated.Displays histoLUT frame.- Parameters:
imageAorB- ViewJComponentBase.IMAGE_A or ViewJComponentBase.IMAGE_B
-
updateLayout
protected void updateLayout()This method should be called whenever the layout of the tri-images has changed. For example, when image B is removed or added, this method should be called so that the frame can resize itself and properly layout the tri-image components. -
updatePaint
The purpose of this method is to set the paint bitmap so that it is the same for all 9 images. The reason it is here is because I couldn't find a way to automatically set the paint bitmap without calling this method. There was a problem because if you were painting in image A, image A/B would also get painted, but not image B. Paint in image A/B resulted in image A also being painted but not image B. Painting in image B resulting in image B being the only image affected. I thought this was weird so I created this method so that all images were painted equally. -- lorsino- Parameters:
paintMap- BitSet the paint bitset object to set the images to
-
adjustScrollbars
DOCUMENT ME!- Parameters:
x- DOCUMENT ME!y- DOCUMENT ME!scrollPane- DOCUMENT ME!
-
adjustScrollbars
private void adjustScrollbars(int frame, int x, int y) This method adjust the scrollbars to area where user clicked when doing individual frame zooming in and out.- Parameters:
frame- DOCUMENT ME!x- inty- int
-
buildLabels
private void buildLabels()Convenience method created to simplify configureFrame(). -
buildLUTs
protected void buildLUTs()Convenience method created to simplify configureFrame(). -
cleanVolumePositionPanel
protected final void cleanVolumePositionPanel()Clears the volumePositionPanel, so it can be recreated when the volumePositionFrame is closed:. -
getOptimalZoom
protected float getOptimalZoom(int desiredWidth, int desiredHeight) Calculates the optimal zoom value for an image based on the two parameters desiredWidth and desiredHeight. Since MIPAV doesn't officially support images with differing zoom values, the zoom value returned will be that value which, when applied to the image, will ensure the image size on screen is no more than both desiredWidth or desiredHeight- Parameters:
desiredWidth- int the ideal width for the image displayed on-screendesiredHeight- int the idea height for the image displayed on-screen- Returns:
- float the zoom value required to show the image on-screen at no more than desiredWidth and no more than desired height
-
setOldLayout
protected void setOldLayout(boolean bLayout) Transition between the 2x2 window layout and 3x1 window layout:- Parameters:
bLayout- the new layout, = 2x2 layout when true and 3x1 when false
-
setSpinnerValues
private void setSpinnerValues(int type) Sets the spinner values based on image type.- Parameters:
type- Image type (BYTE, FLOAT, ...)
-
setVolumeBounds
private void setVolumeBounds(WildMagic.LibFoundation.Mathematics.Vector3f lower, WildMagic.LibFoundation.Mathematics.Vector3f upper) Sets the CubeBounds data member volumeBounds to the crop volume defined by the lower and upper volume points. The CubeBounds are ordered low to high and are checked against the volume extents.- Parameters:
lower- the lower bound in File Coordinatesupper- the upper bound in File Coordinates
-
zoomInFrame
protected void zoomInFrame(int frame) this method will zoom in a particular frame.- Parameters:
frame- frame the frame number
-
zoomOutFrame
protected void zoomOutFrame(int frame) this method will zoom out a particular frame.- Parameters:
frame- frame the frame number
-
initVOI
protected void initVOI()Initialize the 3D VOI interface. -
getFrame
- Specified by:
getFramein interfaceVOIManagerInterfaceListener
-
PointerActive
public void PointerActive(boolean bActive) - Specified by:
PointerActivein interfaceVOIManagerInterfaceListener
-
PropDown
public WildMagic.LibFoundation.Mathematics.Vector3f PropDown(int iActive) - Specified by:
PropDownin interfaceVOIManagerInterfaceListener
-
PropUp
public WildMagic.LibFoundation.Mathematics.Vector3f PropUp(int iActive) - Specified by:
PropUpin interfaceVOIManagerInterfaceListener
-
create3DVOI
public void create3DVOI(boolean bIntersection) - Specified by:
create3DVOIin interfaceVOIManagerInterfaceListener
-
setCursor
- Specified by:
setCursorin interfaceVOIManagerInterfaceListener- Overrides:
setCursorin classWindow
-
getActiveImage
- Specified by:
getActiveImagein interfaceVOIManagerInterfaceListener
-
setModified
public void setModified()- Specified by:
setModifiedin interfaceVOIManagerInterfaceListener
-
updateData
public void updateData()- Specified by:
updateDatain interfaceVOIManagerInterfaceListener
-
setActiveImage
- Specified by:
setActiveImagein interfaceVOIManagerInterfaceListener
-
getActiveLUT
- Specified by:
getActiveLUTin interfaceVOIManagerInterfaceListener
-
getActiveRGB
- Specified by:
getActiveRGBin interfaceVOIManagerInterfaceListener
-
getVOIManager
- Specified by:
getVOIManagerin interfaceVOIManagerInterfaceListener
-
setPaintMask
- Specified by:
setPaintMaskin interfaceVOIManagerInterfaceListener
-
paintToShortMask
public void paintToShortMask()- Specified by:
paintToShortMaskin interfaceVOIManagerInterfaceListener
-
paintToUbyteMask
public void paintToUbyteMask()- Specified by:
paintToUbyteMaskin interfaceVOIManagerInterfaceListener
-
maskToPaint
public void maskToPaint()- Specified by:
maskToPaintin interfaceVOIManagerInterfaceListener
-
setCurrentOrientation
public void setCurrentOrientation(int currentOrientation) -
getCurrentOrientation
public int getCurrentOrientation() -
addSphereVOIs
- Specified by:
addSphereVOIsin interfaceVOIManagerInterfaceListener
-