Class ViewJFrameTriImage
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- gov.nih.mipav.view.ViewJFrameBase
-
- gov.nih.mipav.view.ViewJFrameTriImage
-
- All Implemented Interfaces:
VOIManagerInterfaceListener
,ViewImageUpdateInterface
,java.awt.event.ActionListener
,java.awt.event.ComponentListener
,java.awt.event.ItemListener
,java.awt.event.KeyListener
,java.awt.event.MouseListener
,java.awt.event.WindowListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.ChangeListener
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
- Direct Known Subclasses:
ViewJFrameMultimodalitySingleViewer
,ViewJFrameMultimodalityViewer
public class ViewJFrameTriImage extends ViewJFrameBase implements java.awt.event.ItemListener, javax.swing.event.ChangeListener, java.awt.event.KeyListener, java.awt.event.MouseListener, VOIManagerInterfaceListener
This program works with 3D and 4D images. Makes a frame and puts 3 images into it - an XY image in the upper left quadrant, a ZY image in the upper right quadrant, and a XZ image in the lower left quadrant. The XY image always has increasing X going from left to right and increasing Y going from top to bottom. If the image orientation is FileInfoBase.UNKNOWN_ORIENT, the ZY image has Z increasing from left to right and Y increasing from top to bottom. If the image orientation is known, the ZY image has Y increasing from left to right and Z increasing from bottom to top. The XZ image always has X increasing from left to right. If the orientation is unknown, Z increases from top to bottom. If the orientation is known, Z increases from bottom to top. If the image orientation is known XY has an axial slice, ZY has a sagittal slice, and XZ has a coronal slice. The lower right quadrant displays the X, Y, and Z coordinates of the point selected.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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
ViewJFrameTriImage.OkColorListener
Listener to pass to JColorChooser when user wants to change the color of the paint.(package private) class
ViewJFrameTriImage.PaintBoxRenderer
DOCUMENT ME!-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JToggleButton
addPointToggleButton
Toggle buttons for voi/pointsstatic float
ATLAS_AC_TO_ANT
Dimensions used for Talairach coordinates - anterior.static float
ATLAS_AC_TO_INF
Dimensions used for Talairach coordinates - inferior.static float
ATLAS_AC_TO_LAT
Dimensions used for Talairach coordinates - lateral.static float
ATLAS_AC_TO_PC
AC to PC dimension.static float
ATLAS_AC_TO_SUP
Dimensions used for Talairach coordinates - superior.static float
ATLAS_BBOX_ANT
Dimensions used for Talairach view clipping box - anterior.static float
ATLAS_BBOX_INF
Dimensions used for Talairach view clipping box - inferior.static float
ATLAS_BBOX_INF_NEW
Dimensions used for Talairach view clipping box - inferior new. 3/06/96: extra 10 mm for cerebellum .static float
ATLAS_BBOX_LAT
Dimensions used for Talairach view clipping box - lateral.static float
ATLAS_BBOX_POS
Dimensions used for Talairach view clipping box - posterior.static float
ATLAS_BBOX_SUP
Dimensions used for Talairach view clipping box - superior.static float
ATLAS_PC_TO_POS
Dimensions used for Talairach coordinates - posterior.static int
AXIAL_A
DOCUMENT ME!static int
AXIAL_AB
DOCUMENT ME!static int
AXIAL_B
DOCUMENT ME!javax.swing.JToggleButton
bogusBorderPaintButton
javax.swing.JToggleButton
borderPaintButton
protected javax.swing.JToggleButton[]
btnInvisible
DOCUMENT ME!protected int
bufferFactor
1 for black and white, 4 for color.protected boolean
centerButtonSelected
DOCUMENT ME!protected javax.swing.JCheckBox
chkShowTalairachGrid
"Show talairach grid" checkbox.protected javax.swing.JCheckBox
chkShowTalairachGridMarkers
"Show talairach gridmarkers" checkbox.protected java.awt.Color
color
Color of the paint.protected ViewJColorChooser
colorChooser
Color chooser to use when selecting paint color.protected javax.swing.JButton
colorPaintButton
Button for changing the color of the paint.protected ViewControlsImage
controls
Used to obtain initial paint opacity and color.protected java.util.Vector<CoordinateChangeListener>
coordinateListeners
A list of CoordinateChangeListeners who want to know about changes to the coordinate currently pointed to by the tri-image frame's crosshairs.static int
CORONAL_A
DOCUMENT ME!static int
CORONAL_AB
DOCUMENT ME!static int
CORONAL_B
DOCUMENT ME!protected javax.swing.JSpinner
crosshairSpinner
Spinner component for the crosshair gap size.protected Point3D
currentAbsolutePositionLabels
The current values of the absolute position labels.private int
currentOrientation
protected static int
DEFAULT_OPTIMAL_ZOOM
Constant to determine how many pixels would be optimal for the image to be initially zoomed to.protected int
defaultPreferredHeight
The default hight of the window, if it cannot be calculated.protected javax.swing.JToggleButton
dropperPaintToggleButton
Toggle buttons for voi/pointsprotected int[]
extents
Extents of image.protected static java.lang.String
IMAGE_ALIGN_TOOLBAR
protected javax.swing.JToolBar
imageAlignToolBar
protected javax.swing.JToolBar
imageToolBar
Image control toolbar.protected javax.swing.JToggleButton
indivMagButton
refs to indiviadual frame zooming in and out buttons.protected javax.swing.JToggleButton
indivMinButton
refs to indiviadual frame zooming in and out buttons.protected javax.swing.JSpinner
intensitySpinner
Spinner component for the paint intensity.protected javax.swing.JLabel
iTalLabel
talaraich intensity label*protected javax.swing.JTextField
labelXTal
Label the Talairach position x value in the image volume.protected javax.swing.JTextField
labelYTal
Label the Talairach position y value in the image volume.protected javax.swing.JTextField
labelZTal
Label the Talairach position z value in the image volume.protected javax.swing.JButton
leastSquaresButton
DOCUMENT ME!protected javax.swing.JButton
magButton
refs to the magnify and minimize buttonstatic int
MAX_INITIAL_TRI_IMAGES
Maximum number of initial tri-images!protected ViewMenuBuilder
menuObj
Menu items storage.protected javax.swing.JButton
minButton
refs to the magnify and minimize buttonprotected static int
NUM_INVISIBLE_BUTTONS
We 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 java.lang.String
OLD_LAYOUT
A constant for which to test in the actionPerformed.protected boolean
oldLayout
DOCUMENT ME!protected float
OPACITY
Opacity of paint.protected static java.lang.String
PAINT_TOOLBAR
protected javax.swing.JComboBox
paintBox
Box holding the list of available paint brushes.private boolean
paintBrushLocked
used with the above to say the paint brush has been changed, waiting to change back.protected java.lang.String[]
paintBrushNames
List of built-in and user-defined paint brushes.protected javax.swing.JToggleButton
paintCanToggleButton
Toggle buttons for voi/pointsprotected javax.swing.JToolBar
paintToolBar
Paint tool bar.protected static java.lang.String
PANEL_PLUGIN
A constant for which to test in the actionPerformed.protected javax.swing.JPanel
panelActiveImage
Panel for deciding which image is active; appears when 2 images are loaded.protected javax.swing.JPanel
panelToolbar
Panel that holds the toolbars.protected java.awt.GridBagConstraints
panelToolBarGBC
protected ViewJFrameImage
parentFrame
Reference to the parent window.protected java.awt.Component
pluginPanel
Reference to the plug-in panel in the 2x2 (old) layout.private int
quickPaintBrushIndex
int used for quick-key painting for speedier paint brush access.protected javax.swing.JRadioButton
radioImageA
Radio button for selecting image A as active.protected javax.swing.JRadioButton
radioImageB
Radio button for selecting image B as active.protected javax.swing.JRadioButton
radioImageBoth
Radio button for selecting both images as active.protected float[]
resols
Resolutions of image.protected ModelRGB
RGBTa
RGB tables for imageA and imageBprotected ModelRGB
RGBTb
RGB tables for imageA and imageBstatic int
SAGITTAL_A
DOCUMENT ME!static int
SAGITTAL_AB
DOCUMENT ME!static int
SAGITTAL_B
DOCUMENT ME!protected javax.swing.JCheckBox
scrollButton
The button that indicates whether this triframe is linked with tri-frames of similar dimensionality.protected boolean
scrollOriginalCrosshair
Flag telling the crosshair movement to update slice in original image frame.javax.swing.JScrollPane[]
scrollPane
DOCUMENT ME!private static long
serialVersionUID
Use serialVersionUID for interoperability.protected boolean
showTalairachGrid
Flag for showing the Talairach grid on the component images.protected boolean
showTalairachPosition
Flag for showing the Talairach position on the component images.private double
spinnerDefaultValue
Used to setup the paint spinner.private double
spinnerMax
Used to setup the paint spinner.private double
spinnerMin
Used to setup the paint spinner.private double
spinnerStep
Used to setup the paint spinner.protected javax.swing.JPanel
talairachPanel
Panel for Talairach position display.protected int
tDim
Time dimension of the original image.protected javax.swing.JSlider
tImageSlider
Slider for 4D images, time dimension.protected ViewToolBarBuilder
toolbarBuilder
Toolbar builder reference.protected javax.swing.JButton
tpSplineButton
DOCUMENT ME!protected javax.swing.JToggleButton
traverseButton
Button for traversing the images.ViewJComponentTriImage[]
triImage
DOCUMENT ME!javax.swing.JPanel[]
triImagePanel
DOCUMENT ME!protected int
tSlice
Time slice that this image is on.javax.swing.JLabel
tTalVoxLabel
talairach voxel label *protected int[]
units
Units of image - mm, inches, etc.protected boolean
useInfNew
if true use cerebellum-adjusted static variable.(package private) static int
v
protected javax.swing.JPanel
viewPanel
Panel for switching between radiological and neurological viewing conventions.protected static java.lang.String
VOI_TOOLBAR
protected javax.swing.ButtonGroup
VOIGroup
protected VOIManagerInterface
voiManager
The VOI managers for each triComponentprotected javax.swing.JMenu
voiMenu
Menu displaying VOI optionsprivate CubeBounds
volumeBounds
Volume Boundary may be changed for cropping the volume.protected int[]
volumeCenter
The point to become center of transformed image.protected VolumePositionFrame
volumePositionFrame
Reference to the volume coordinate frame.protected javax.swing.JPanel
volumePositionPanel
Reference to the volume coordinate panel when it is in the plug-in position.protected javax.swing.JLabel
xTalLabel
protected javax.swing.JLabel
yTalLabel
protected float
zoom
Magnification for image.protected javax.swing.JLabel
zTalLabel
-
Fields inherited from class gov.nih.mipav.view.ViewJFrameBase
absoluteGoToButton, absoluteGoToPanel, absoluteLabel, absoluteLabelVals, absolutePanel, absoluteXLabel, absoluteXTextField, absoluteYLabel, absoluteYTextField, absoluteZLabel, absoluteZTextField, alphaBlend, defaultLUTa, defaultLUTb, displayMode, IMAGE_A, IMAGE_A_B, IMAGE_B, 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, zoomMode
-
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description ViewJFrameTriImage(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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
absoluteGoTo()
Method that goes to the absolute voxel coordinate that is enteredvoid
actionPerformed(java.awt.event.ActionEvent event)
Calls various methods depending on the action.void
addCoordinateChangeListener(CoordinateChangeListener listener)
Add someone who wants to be notified about crosshair coordinate changes.void
addSphereVOIs(VOI annotations)
void
addTabbedPane()
Called when the volumePositionFrame closes, the volumePositionPanel is again displayed in the window:.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.private void
adjustScrollbars(int x, int y, javax.swing.JScrollPane scrollPane)
DOCUMENT ME!protected void
buildActiveImagePanel()
Builds the active image panel for choosing which image (A, B, or BOTH) to perform operations on.protected void
buildDisabledTextButton(java.lang.String text, java.lang.String toolTip, java.lang.String action, javax.swing.JToolBar toolbar)
Helper method to build a text button for the toolbar.protected void
buildIconButton(java.lang.String icon, java.lang.String toolTip, java.lang.String action, java.lang.String iconroll, javax.swing.JToolBar toolbar)
Helper method to build an icon button for the toolbar.protected void
buildImageAlignToolBar()
private void
buildLabels()
Convenience method created to simplify configureFrame().protected void
buildLUTs()
Convenience method created to simplify configureFrame().protected javax.swing.JToolBar
buildMagToolBar(int boxLayout)
Builds the image toolbar for zoomingprotected javax.swing.JMenuBar
buildMenu()
Builds menus for the tri-planar view.protected javax.swing.JButton
buildNamedTextButton(java.lang.String text, java.lang.String toolTip, java.lang.String action, javax.swing.JToolBar toolbar)
Helper method to build a text button for the toolbar.protected javax.swing.JToolBar
buildPaintToolBar(int boxLayout)
Builds the paint toolbarprotected void
buildProgressBar(java.lang.String imageName, java.lang.String message, int start, int end)
Constructs progress bar.protected java.util.Hashtable<java.lang.Integer,javax.swing.JLabel>
buildTImageSliderLabels(int min, int max)
Builds the slider labels for the time slider.protected void
buildToggleButton(java.lang.String icon, java.lang.String toolTip, java.lang.String action, java.lang.String iconroll, javax.swing.ButtonGroup group, javax.swing.JToolBar toolbar)
Helper method to build a toggle button for the toolbar.protected void
buildToggleButton(java.lang.String icon, java.lang.String toolTip, java.lang.String action, java.lang.String iconroll, javax.swing.ButtonGroup group, javax.swing.JToolBar toolbar, boolean selected)
Helper method to build a toggle button for the toolbar.protected javax.swing.JMenu
buildToolbarMenu(boolean showPaintToolbar)
protected void
buildToolbars()
Builds the toolbars for the tri-planar view.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.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.protected void
cleanVolumePositionPanel()
Clears the volumePositionPanel, so it can be recreated when the volumePositionFrame is closed:.void
closeImageB()
Closes the image B and performs cleanup.protected void
configureFrame()
Constructs main frame structures for 3 images (image A only) or 9 images (image A and image B).void
create3DVOI(boolean bIntersection)
void
disposeLocal()
Should be called when window is closing to perform cleanup.protected void
doOldLayout()
This is an alternative layout arrangement.void
enableBoth(boolean bEnable)
protected void
finalize()
DOCUMENT ME!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).ModelImage
getActiveImage()
ModelLUT
getActiveLUT()
ModelRGB
getActiveRGB()
int
getAxialComponentSlice()
Gets the axial position of the slice.CubeBounds
getBoundedVolume()
Returns the crop bounding volume as a CubeBounds object.int[]
getCenter()
Sets the x coordinate of the point to be the center of the transformed image.WildMagic.LibFoundation.Mathematics.Vector3f
getCenterPt()
ViewControlsImage
getControls()
Gets reference to control widgets for frame.int
getCoronalComponentSlice()
Gets the y position of the slice.int
getCurrentOrientation()
Point3D
getCurrentPositionLabels()
Get the last point that the position labels got set to.javax.swing.JFrame
getFrame()
ModelImage
getImageA()
Accessor that returns the reference to imageA.ModelImage
getImageB()
Accessor that returns the reference to imageB.ViewJFrameTriImage
getLinkedTriFrame()
Gets the linked ViewJFrameTriImage.protected float
getOptimalZoom(int desiredWidth, int desiredHeight)
Calculates the optimal zoom value for an image based on the two parameters desiredWidth and desiredHeight.ViewJFrameImage
getParentFrame()
Returns a reference to the ViewJFrameImage object that is the parent of this frame.int
getSagittalComponentSlice()
Gets the x position of the slice.int
getSelectedImage()
Returns an integer which represents the image that is selected.ViewJComponentTriImage
getTriImage(int index)
Returns a reference to one of the component tri-image components.javax.swing.JLabel
gettTalVoxLabel()
VOIManagerInterface
getVOIManager()
java.awt.Color
getXSliceHairColor()
Gets the color of the X slice crosshair.java.awt.Color
getYSliceHairColor()
Gets the color of the Y slice crosshair.java.awt.Color
getZSliceHairColor()
Gets the color of the Z slice crosshair.protected void
handleLeastSquares()
Method handles transformations for least squares algorithm in the tri-planar frame.protected void
handlePluginPanelSelection()
This method will load a plug-in into the plug-in area of the tri-planar frame.protected void
handleTPSpline()
DOCUMENT ME!protected void
init()
Initialize the the image orientations and call the frame layout method 'configureFrame()'.protected void
initProgressBar()
Initializes the progress bar.protected void
initVOI()
Initialize the 3D VOI interface.boolean
isFocusable()
Always returns true.protected boolean
isMultipleSameSizeTriImages()
Helper method to establish if there are images of the same dimensionality so that a dialog can be created.void
itemStateChanged(java.awt.event.ItemEvent event)
Does setBorderPainted for the appropriate button.void
keyPressed(java.awt.event.KeyEvent e)
keyPressed event method for KeyListener.void
keyReleased(java.awt.event.KeyEvent e)
keyReleased event method for KeyListener.void
keyTyped(java.awt.event.KeyEvent e)
DOCUMENT ME!protected javax.swing.JButton
makeSeparator()
Makes a separator for the use in the toolbars.void
maskToPaint()
void
mouseClicked(java.awt.event.MouseEvent event)
DOCUMENT ME!void
mouseEntered(java.awt.event.MouseEvent event)
DOCUMENT ME!void
mouseExited(java.awt.event.MouseEvent event)
DOCUMENT ME!void
mousePressed(java.awt.event.MouseEvent event)
DOCUMENT ME!void
mouseReleased(java.awt.event.MouseEvent event)
DOCUMENT ME!void
paintToShortMask()
void
paintToUbyteMask()
void
PointerActive(boolean bActive)
WildMagic.LibFoundation.Mathematics.Vector3f
PropDown(int iActive)
WildMagic.LibFoundation.Mathematics.Vector3f
PropUp(int iActive)
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.void
removeCoordinateChangeListener(CoordinateChangeListener listener)
Remove a coordinate change listener from this frame's list.private void
scannerLPSGoTo()
Method that goes to the lps coordinate that is enteredprivate void
scannerRASGoTo()
Method that goes to the ras coordinate that is enteredvoid
setActiveImage(int active)
Set the active image for drawing VOIs.void
setActiveImage(ModelImage kImage)
void
setAlphaBlend(int value)
Sets the alpha blending of parameter for two image displaying.void
setCenter(int i, int j, int k)
sets the crosshair positions and slices for each of the triImages.void
setCenter(int i, int j, int k, boolean checkLinkedScroll)
sets the crosshair positions and slices for each of the triImages.void
setCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
void
setControls()
Sets the menu and controls (i.e. toolbars) of the main frame!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.void
setCurrentOrientation(int currentOrientation)
void
setCursor(java.awt.Cursor kCursor)
void
setDefault()
Sets modes in all images to ViewJComponentBase.DEFAULT.void
setEnabled(boolean flag)
Controls whether or not the images/VOIs of the frame can be modified.void
setImageA(ModelImage image)
Changes imageA to a new model image reference.protected void
setImageActiveInTriComponents(int activeImage)
DOCUMENT ME!void
setImageB(ModelImage _imageB)
Accessor that sets the reference to imageB.void
setImageB(ModelImage _imageB, boolean disposeOldB)
Accessor that sets the reference to imageB.void
setImageSelectorPanelVisible(boolean visible)
this method either shows or hides the image selector panel, based on the value of the parameter.void
setIntensityDropper(float intensityDropper)
Sets paint intensity in axial image.void
setIntensityPaintName(float intensityDropper)
Sets integer value on intensityPaintButton.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 truevoid
setLUTa(ModelLUT LUT)
Accessor that sets the LUT.void
setLUTb(ModelLUT LUT)
Accessor that sets the LUT.void
setModified()
protected void
setOldLayout(boolean bLayout)
Transition between the 2x2 window layout and 3x1 window layout: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.void
setPaintColor(java.awt.Color color)
Sets the color of the paint.void
setPaintMask(java.util.BitSet mask)
void
setPositionLabels(int x, int y, int z)
Sets the labels which show the absolute position within the image volume and the patient position.void
setRGBTA(ModelRGB RGBT)
Sets the RGB table for ARGB image A.void
setRGBTB(ModelRGB RGBT)
Sets the RGB table for image B.void
setSlice(int slice)
Does nothing.void
setSlices(int x, int y, int z)
Sets the slice index for each plane in the frame and components.void
setSlicesFromFrame(int x, int y, int z)
Called from the "normal" image component, sets the slices for the tri planar view to display.private void
setSpinnerValues(int type)
Sets the spinner values based on image type.protected void
setTalairachPositionLabels(int x, int y, int z)
Sets the labels that refer to Talairach position within the image.void
setTimeSlice(int slice)
Sets the slice to be displayed and updates title frame.void
setTimeSlice(int slice, boolean checkedLinkedScroll)
Sets the slice to be displayed and updates title frame.void
setTitle()
Sets the title bar for the tri-image frame.void
setTraverseButton()
Sets the traverse button to selected.void
settTalVoxLabelText(java.lang.String text)
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.void
setVolumeCenter(int x, int y, int z)
Sets the x coordinate of the point to be the center of the transformed image.void
setVolumeCenter(Point3D newVolumeCenter)
Sets the x coordinate of the point to be the center of the transformed image.void
setXSliceHairColor(java.awt.Color c)
Sets the color of the X slice crosshairs.void
setYSliceHairColor(java.awt.Color c)
Sets the color of the Y slice crosshairs.void
setZSliceHairColor(java.awt.Color c)
Sets the color of the Z slice crosshairs.void
stateChanged(javax.swing.event.ChangeEvent e)
Sets values based on knob along time slider.private void
talairachGoTo()
Method that goes to the talairach coordinate that is enteredvoid
updateData()
protected void
updateHistoLUTFrame(int imageAorB)
Deprecated.boolean
updateImageExtents()
Do nothing - required by ViewJFrameBase.boolean
updateImages()
This methods calls the componentImage's update method to redraw the screen.boolean
updateImages(boolean forceShow)
This methods calls the componentImage's update method to redraw the screen.boolean
updateImages(boolean forceShow, int interpMode)
This methods calls the componentImage's update method to redraw the screen.boolean
updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode)
This methods calls the componentImage's update method to redraw the screen.void
updateImageSubset(ViewJComponentTriImage triImage)
DOCUMENT ME!protected void
updateLayout()
This method should be called whenever the layout of the tri-images has changed.protected void
updatePaint(java.util.BitSet paintMap)
The purpose of this method is to set the paint bitmap so that it is the same for all 9 images.void
windowClosing(java.awt.event.WindowEvent event)
Closes window and disposes of frame and component.void
windowOpened(java.awt.event.WindowEvent event)
Does nothing.protected void
zoomInFrame(int frame)
this method will zoom in a particular frame.protected void
zoomOutFrame(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, windowIconified
-
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, 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, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
IMAGE_ALIGN_TOOLBAR
protected static final java.lang.String IMAGE_ALIGN_TOOLBAR
- See Also:
- Constant Field Values
-
VOI_TOOLBAR
protected static final java.lang.String VOI_TOOLBAR
- See Also:
- Constant Field Values
-
PAINT_TOOLBAR
protected static final java.lang.String PAINT_TOOLBAR
- See Also:
- Constant Field Values
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
ATLAS_BBOX_LAT
public static final float ATLAS_BBOX_LAT
Dimensions used for Talairach view clipping box - lateral.- See Also:
- Constant Field Values
-
ATLAS_BBOX_ANT
public static final float ATLAS_BBOX_ANT
Dimensions used for Talairach view clipping box - anterior.- See Also:
- Constant Field Values
-
ATLAS_BBOX_POS
public static final float ATLAS_BBOX_POS
Dimensions used for Talairach view clipping box - posterior.- See Also:
- Constant Field Values
-
ATLAS_BBOX_INF
public static final float ATLAS_BBOX_INF
Dimensions used for Talairach view clipping box - inferior.- See Also:
- Constant Field Values
-
ATLAS_BBOX_SUP
public static final float ATLAS_BBOX_SUP
Dimensions used for Talairach view clipping box - superior.- See Also:
- Constant Field Values
-
ATLAS_BBOX_INF_NEW
public static final float ATLAS_BBOX_INF_NEW
Dimensions used for Talairach view clipping box - inferior new. 3/06/96: extra 10 mm for cerebellum .- See Also:
- Constant Field Values
-
ATLAS_AC_TO_LAT
public static final float ATLAS_AC_TO_LAT
Dimensions used for Talairach coordinates - lateral.- See Also:
- Constant Field Values
-
ATLAS_AC_TO_ANT
public static final float ATLAS_AC_TO_ANT
Dimensions used for Talairach coordinates - anterior.- See Also:
- Constant Field Values
-
ATLAS_PC_TO_POS
public static final float ATLAS_PC_TO_POS
Dimensions used for Talairach coordinates - posterior.- See Also:
- Constant Field Values
-
ATLAS_AC_TO_INF
public static final float ATLAS_AC_TO_INF
Dimensions used for Talairach coordinates - inferior.- See Also:
- Constant Field Values
-
ATLAS_AC_TO_SUP
public static final float ATLAS_AC_TO_SUP
Dimensions used for Talairach coordinates - superior.- See Also:
- Constant Field Values
-
ATLAS_AC_TO_PC
public static final float ATLAS_AC_TO_PC
AC to PC dimension.- See Also:
- Constant Field Values
-
AXIAL_A
public static final int AXIAL_A
DOCUMENT ME!- See Also:
- Constant Field Values
-
SAGITTAL_A
public static final int SAGITTAL_A
DOCUMENT ME!- See Also:
- Constant Field Values
-
CORONAL_A
public static final int CORONAL_A
DOCUMENT ME!- See Also:
- Constant Field Values
-
AXIAL_AB
public static final int AXIAL_AB
DOCUMENT ME!- See Also:
- Constant Field Values
-
SAGITTAL_AB
public static final int SAGITTAL_AB
DOCUMENT ME!- See Also:
- Constant Field Values
-
CORONAL_AB
public static final int CORONAL_AB
DOCUMENT ME!- See Also:
- Constant Field Values
-
AXIAL_B
public static final int AXIAL_B
DOCUMENT ME!- See Also:
- Constant Field Values
-
SAGITTAL_B
public static final int SAGITTAL_B
DOCUMENT ME!- See Also:
- Constant Field Values
-
CORONAL_B
public static final int CORONAL_B
DOCUMENT ME!- See Also:
- Constant Field Values
-
NUM_INVISIBLE_BUTTONS
protected static final int NUM_INVISIBLE_BUTTONS
We 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:
- Constant Field Values
-
MAX_INITIAL_TRI_IMAGES
public static final int MAX_INITIAL_TRI_IMAGES
Maximum number of initial tri-images!- See Also:
- Constant Field Values
-
OLD_LAYOUT
protected static final java.lang.String OLD_LAYOUT
A constant for which to test in the actionPerformed.- See Also:
- Constant Field Values
-
PANEL_PLUGIN
protected static final java.lang.String PANEL_PLUGIN
A constant for which to test in the actionPerformed.- See Also:
- Constant Field Values
-
DEFAULT_OPTIMAL_ZOOM
protected static final int DEFAULT_OPTIMAL_ZOOM
Constant to determine how many pixels would be optimal for the image to be initially zoomed to.- See Also:
- Constant Field Values
-
scrollPane
public javax.swing.JScrollPane[] scrollPane
DOCUMENT ME!
-
triImage
public ViewJComponentTriImage[] triImage
DOCUMENT ME!
-
triImagePanel
public javax.swing.JPanel[] triImagePanel
DOCUMENT ME!
-
btnInvisible
protected javax.swing.JToggleButton[] btnInvisible
DOCUMENT ME!
-
bufferFactor
protected int bufferFactor
1 for black and white, 4 for color.
-
centerButtonSelected
protected boolean centerButtonSelected
DOCUMENT ME!
-
chkShowTalairachGrid
protected javax.swing.JCheckBox chkShowTalairachGrid
"Show talairach grid" checkbox.
-
chkShowTalairachGridMarkers
protected javax.swing.JCheckBox chkShowTalairachGridMarkers
"Show talairach gridmarkers" checkbox.
-
color
protected java.awt.Color color
Color of the paint.
-
colorChooser
protected ViewJColorChooser colorChooser
Color chooser to use when selecting paint color.
-
colorPaintButton
protected javax.swing.JButton colorPaintButton
Button for changing the color of the paint.
-
controls
protected ViewControlsImage controls
Used to obtain initial paint opacity and color.
-
coordinateListeners
protected java.util.Vector<CoordinateChangeListener> 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
protected javax.swing.JSpinner crosshairSpinner
Spinner component for the crosshair gap size.
-
currentAbsolutePositionLabels
protected Point3D currentAbsolutePositionLabels
The current values of the absolute position labels.
-
defaultPreferredHeight
protected int defaultPreferredHeight
The default hight of the window, if it cannot be calculated.
-
extents
protected int[] extents
Extents of image.
-
imageToolBar
protected javax.swing.JToolBar imageToolBar
Image control toolbar.
-
VOIGroup
protected javax.swing.ButtonGroup VOIGroup
-
imageAlignToolBar
protected javax.swing.JToolBar imageAlignToolBar
-
intensitySpinner
protected javax.swing.JSpinner intensitySpinner
Spinner component for the paint intensity.
-
talairachPanel
protected javax.swing.JPanel talairachPanel
Panel for Talairach position display.
-
viewPanel
protected javax.swing.JPanel viewPanel
Panel for switching between radiological and neurological viewing conventions.
-
labelXTal
protected javax.swing.JTextField labelXTal
Label the Talairach position x value in the image volume.
-
labelYTal
protected javax.swing.JTextField labelYTal
Label the Talairach position y value in the image volume.
-
labelZTal
protected javax.swing.JTextField labelZTal
Label the Talairach position z value in the image volume.
-
xTalLabel
protected javax.swing.JLabel xTalLabel
-
yTalLabel
protected javax.swing.JLabel yTalLabel
-
zTalLabel
protected javax.swing.JLabel zTalLabel
-
menuObj
protected ViewMenuBuilder menuObj
Menu items storage.
-
oldLayout
protected boolean oldLayout
DOCUMENT ME!
-
OPACITY
protected float OPACITY
Opacity of paint.
-
paintBrushNames
protected java.lang.String[] paintBrushNames
List of built-in and user-defined paint brushes.
-
paintToolBar
protected javax.swing.JToolBar paintToolBar
Paint tool bar.
-
borderPaintButton
public javax.swing.JToggleButton borderPaintButton
-
bogusBorderPaintButton
public javax.swing.JToggleButton bogusBorderPaintButton
-
panelActiveImage
protected javax.swing.JPanel panelActiveImage
Panel for deciding which image is active; appears when 2 images are loaded.
-
panelToolbar
protected javax.swing.JPanel panelToolbar
Panel that holds the toolbars.
-
panelToolBarGBC
protected java.awt.GridBagConstraints panelToolBarGBC
-
parentFrame
protected ViewJFrameImage parentFrame
Reference to the parent window.
-
pluginPanel
protected java.awt.Component pluginPanel
Reference to the plug-in panel in the 2x2 (old) layout.
-
radioImageA
protected javax.swing.JRadioButton radioImageA
Radio button for selecting image A as active.
-
radioImageB
protected javax.swing.JRadioButton radioImageB
Radio button for selecting image B as active.
-
radioImageBoth
protected javax.swing.JRadioButton radioImageBoth
Radio button for selecting both images as active.
-
resols
protected float[] resols
Resolutions of image.
-
scrollOriginalCrosshair
protected boolean scrollOriginalCrosshair
Flag telling the crosshair movement to update slice in original image frame.
-
showTalairachGrid
protected boolean showTalairachGrid
Flag for showing the Talairach grid on the component images.
-
showTalairachPosition
protected boolean showTalairachPosition
Flag for showing the Talairach position on the component images.
-
tDim
protected int tDim
Time dimension of the original image.
-
tImageSlider
protected javax.swing.JSlider tImageSlider
Slider for 4D images, time dimension.
-
traverseButton
protected javax.swing.JToggleButton traverseButton
Button for traversing the images.
-
tSlice
protected int tSlice
Time slice that this image is on.
-
units
protected int[] units
Units of image - mm, inches, etc.
-
useInfNew
protected boolean useInfNew
if true use cerebellum-adjusted static variable.
-
volumeCenter
protected int[] volumeCenter
The point to become center of transformed image.
-
volumePositionFrame
protected VolumePositionFrame volumePositionFrame
Reference to the volume coordinate frame.
-
volumePositionPanel
protected javax.swing.JPanel volumePositionPanel
Reference to the volume coordinate panel when it is in the plug-in position.
-
zoom
protected float zoom
Magnification for image.
-
addPointToggleButton
protected javax.swing.JToggleButton addPointToggleButton
Toggle buttons for voi/points
-
dropperPaintToggleButton
protected javax.swing.JToggleButton dropperPaintToggleButton
Toggle buttons for voi/points
-
paintCanToggleButton
protected javax.swing.JToggleButton paintCanToggleButton
Toggle buttons for voi/points
-
indivMagButton
protected javax.swing.JToggleButton indivMagButton
refs to indiviadual frame zooming in and out buttons.
-
indivMinButton
protected javax.swing.JToggleButton indivMinButton
refs to indiviadual frame zooming in and out buttons.
-
leastSquaresButton
protected javax.swing.JButton leastSquaresButton
DOCUMENT ME!
-
magButton
protected javax.swing.JButton magButton
refs to the magnify and minimize button.*
-
minButton
protected javax.swing.JButton minButton
refs to the magnify and minimize button.*
-
paintBox
protected javax.swing.JComboBox paintBox
Box holding the list of available paint brushes.
-
paintBrushLocked
private boolean paintBrushLocked
used with the above to say the paint brush has been changed, waiting to change back.
-
quickPaintBrushIndex
private int quickPaintBrushIndex
int used for quick-key painting for speedier paint brush access.
-
scrollButton
protected javax.swing.JCheckBox scrollButton
The button that indicates whether this triframe is linked with tri-frames of similar dimensionality.
-
spinnerDefaultValue
private double spinnerDefaultValue
Used to setup the paint spinner.
-
spinnerMin
private double spinnerMin
Used to setup the paint spinner.
-
spinnerMax
private double spinnerMax
Used to setup the paint spinner.
-
spinnerStep
private double spinnerStep
Used to setup the paint spinner.
-
toolbarBuilder
protected ViewToolBarBuilder toolbarBuilder
Toolbar builder reference.
-
tpSplineButton
protected javax.swing.JButton tpSplineButton
DOCUMENT ME!
-
volumeBounds
private CubeBounds volumeBounds
Volume Boundary may be changed for cropping the volume.
-
voiMenu
protected javax.swing.JMenu voiMenu
Menu displaying VOI options
-
voiManager
protected VOIManagerInterface voiManager
The VOI managers for each triComponent
-
iTalLabel
protected javax.swing.JLabel iTalLabel
talaraich intensity label*
-
tTalVoxLabel
public javax.swing.JLabel tTalVoxLabel
talairach voxel label *
-
currentOrientation
private int currentOrientation
-
RGBTa
protected ModelRGB RGBTa
RGB tables for imageA and imageB
-
RGBTb
protected ModelRGB RGBTb
RGB tables for imageA and imageB
-
v
static int v
-
-
Constructor Detail
-
ViewJFrameTriImage
public ViewJFrameTriImage(ModelImage _imageA, ModelImage _imageB)
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 Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Calls various methods depending on the action.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Specified by:
actionPerformed
in classViewJFrameBase
- Parameters:
event
- event that triggered function
-
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
public void addCoordinateChangeListener(CoordinateChangeListener listener)
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:
closeImageB
in 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
public CubeBounds 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:
getCenterPt
in interfaceVOIManagerInterfaceListener
-
getControls
public ViewControlsImage getControls()
Gets reference to control widgets for frame.- Specified by:
getControls
in classViewJFrameBase
- Returns:
- controls
-
getCoronalComponentSlice
public int getCoronalComponentSlice()
Gets the y position of the slice.- Returns:
- The y location in the slice.
-
getCurrentPositionLabels
public Point3D getCurrentPositionLabels()
Get the last point that the position labels got set to.- Returns:
- the current values for the absolute position labels
-
getImageA
public ModelImage getImageA()
Accessor that returns the reference to imageA.- Specified by:
getImageA
in classViewJFrameBase
- Returns:
- image
-
getImageB
public ModelImage getImageB()
Accessor that returns the reference to imageB.- Specified by:
getImageB
in classViewJFrameBase
- Returns:
- imageB
-
getLinkedTriFrame
public ViewJFrameTriImage getLinkedTriFrame()
Gets the linked ViewJFrameTriImage.- Returns:
- linkedFrame
-
getParentFrame
public ViewJFrameImage 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
public ViewJComponentTriImage getTriImage(int index)
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
public java.awt.Color getXSliceHairColor()
Gets the color of the X slice crosshair.- Returns:
- Color the color of the X slice crosshair
-
getYSliceHairColor
public java.awt.Color getYSliceHairColor()
Gets the color of the Y slice crosshair.- Returns:
- Color the color of the Y slice crosshair
-
getZSliceHairColor
public java.awt.Color 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:
isFocusable
in classjava.awt.Component
- Returns:
- boolean always returns true
-
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent event)
Does setBorderPainted for the appropriate button.- Specified by:
itemStateChanged
in interfacejava.awt.event.ItemListener
- Parameters:
event
- Event that triggered this function
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed event method for KeyListener.- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
- Parameters:
e
- KeyEvent
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased event method for KeyListener.- Specified by:
keyReleased
in interfacejava.awt.event.KeyListener
- Parameters:
e
- KeyEvent
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)
DOCUMENT ME!- Specified by:
keyTyped
in interfacejava.awt.event.KeyListener
- Parameters:
e
- DOCUMENT ME!
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
- Parameters:
event
- DOCUMENT ME!
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
- Parameters:
event
- DOCUMENT ME!
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
- Parameters:
event
- DOCUMENT ME!
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Parameters:
event
- DOCUMENT ME!
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- 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:
removeControls
in classViewJFrameBase
-
removeCoordinateChangeListener
public void removeCoordinateChangeListener(CoordinateChangeListener listener)
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:
setActiveImage
in interfaceVOIManagerInterfaceListener
- Specified by:
setActiveImage
in 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:
setAlphaBlend
in 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:
setCenter
in 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:
setControls
in 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:
setEnabled
in classViewJFrameBase
- Parameters:
flag
- if true the image/VOIs can be modified; if false image/VOIs can NOT be modified
-
setImageA
public void setImageA(ModelImage image)
Changes imageA to a new model image reference. Swaps the references in the frame and all the component images.- Overrides:
setImageA
in classViewJFrameBase
- Parameters:
image
- the new image to use
-
setImageB
public void setImageB(ModelImage _imageB)
Accessor that sets the reference to imageB. Includes changing the frame's reference and the references the components keep.- Specified by:
setImageB
in classViewJFrameBase
- Parameters:
_imageB
- image to set the frame to
-
setImageB
public void setImageB(ModelImage _imageB, boolean disposeOldB)
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
public void setLUTa(ModelLUT LUT)
Accessor that sets the LUT.- Overrides:
setLUTa
in classViewJFrameBase
- Parameters:
LUT
- the LUT
-
setLUTb
public void setLUTb(ModelLUT LUT)
Accessor that sets the LUT.- Overrides:
setLUTb
in 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:
setPaintBitmapSwitch
in classViewJFrameBase
- Parameters:
paintBitmapSwitch
- if true don't do a getMask on the new actve image
-
setPaintColor
public void setPaintColor(java.awt.Color color)
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
public void setRGBTA(ModelRGB RGBT)
Sets the RGB table for ARGB image A.- Specified by:
setRGBTA
in classViewJFrameBase
- Parameters:
RGBT
- the new RGB transfer functions for imageA
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
Sets the RGB table for image B.- Specified by:
setRGBTB
in 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:
setSlice
in 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:
setTimeSlice
in 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:
setTitle
in classViewJFrameBase
-
setTraverseButton
public void setTraverseButton()
Sets the traverse button to selected.
-
setVolumeCenter
public void setVolumeCenter(Point3D newVolumeCenter)
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
public void setXSliceHairColor(java.awt.Color c)
Sets the color of the X slice crosshairs.- Parameters:
c
- Color the color to set the X slice to
-
setYSliceHairColor
public void setYSliceHairColor(java.awt.Color c)
Sets the color of the Y slice crosshairs.- Parameters:
c
- Color the color to set the Y slice to
-
setZSliceHairColor
public void setZSliceHairColor(java.awt.Color c)
Sets the color of the Z slice crosshairs.- Parameters:
c
- Color the color to set the Z slice to
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
Sets values based on knob along time slider.- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Overrides:
stateChanged
in classViewJFrameBase
- Parameters:
e
- Event that triggered this function
-
updateImageExtents
public boolean updateImageExtents()
Do nothing - required by ViewJFrameBase.- Specified by:
updateImageExtents
in interfaceViewImageUpdateInterface
- Specified by:
updateImageExtents
in classViewJFrameBase
- Returns:
- always false
- See Also:
ViewImageUpdateInterface
-
updateImages
public boolean updateImages()
This methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImages
in 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:
updateImages
in 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
public boolean updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode)
This methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImages
in 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
public void updateImageSubset(ViewJComponentTriImage triImage)
DOCUMENT ME!- Parameters:
triImage
- DOCUMENT ME!
-
windowClosing
public void windowClosing(java.awt.event.WindowEvent event)
Closes window and disposes of frame and component.- Specified by:
windowClosing
in interfacejava.awt.event.WindowListener
- Overrides:
windowClosing
in classViewJFrameBase
- Parameters:
event
- Event that triggered function
-
windowOpened
public void windowOpened(java.awt.event.WindowEvent event)
Description copied from class:ViewJFrameBase
Does nothing.- Specified by:
windowOpened
in interfacejava.awt.event.WindowListener
- Overrides:
windowOpened
in 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(java.lang.String text, java.lang.String toolTip, java.lang.String action, javax.swing.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(java.lang.String icon, java.lang.String toolTip, java.lang.String action, java.lang.String iconroll, javax.swing.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
protected javax.swing.JMenuBar buildMenu()
Builds menus for the tri-planar view.- Returns:
- the tri-image frame menu bar
-
buildToolbarMenu
protected javax.swing.JMenu buildToolbarMenu(boolean showPaintToolbar)
-
buildNamedTextButton
protected javax.swing.JButton buildNamedTextButton(java.lang.String text, java.lang.String toolTip, java.lang.String action, javax.swing.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
protected void buildProgressBar(java.lang.String imageName, java.lang.String message, int start, int end)
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
protected java.util.Hashtable<java.lang.Integer,javax.swing.JLabel> buildTImageSliderLabels(int min, int max)
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(java.lang.String icon, java.lang.String toolTip, java.lang.String action, java.lang.String iconroll, javax.swing.ButtonGroup group, javax.swing.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(java.lang.String icon, java.lang.String toolTip, java.lang.String action, java.lang.String iconroll, javax.swing.ButtonGroup group, javax.swing.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
protected javax.swing.JToolBar buildMagToolBar(int boxLayout)
Builds the image toolbar for zooming- Parameters:
boxLayout
- the layout to apply- Returns:
- imageToolBar
-
buildPaintToolBar
protected javax.swing.JToolBar buildPaintToolBar(int boxLayout)
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
public javax.swing.JLabel gettTalVoxLabel()
-
settTalVoxLabelText
public void settTalVoxLabelText(java.lang.String text)
-
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
protected void finalize() throws java.lang.Throwable
DOCUMENT ME!- Overrides:
finalize
in classViewJFrameBase
- Throws:
java.lang.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:
true
if there are images to operate on.
-
makeSeparator
protected javax.swing.JButton 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
protected void updatePaint(java.util.BitSet paintMap)
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
private void adjustScrollbars(int x, int y, javax.swing.JScrollPane scrollPane)
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
public javax.swing.JFrame getFrame()
- Specified by:
getFrame
in interfaceVOIManagerInterfaceListener
-
PointerActive
public void PointerActive(boolean bActive)
- Specified by:
PointerActive
in interfaceVOIManagerInterfaceListener
-
PropDown
public WildMagic.LibFoundation.Mathematics.Vector3f PropDown(int iActive)
- Specified by:
PropDown
in interfaceVOIManagerInterfaceListener
-
PropUp
public WildMagic.LibFoundation.Mathematics.Vector3f PropUp(int iActive)
- Specified by:
PropUp
in interfaceVOIManagerInterfaceListener
-
create3DVOI
public void create3DVOI(boolean bIntersection)
- Specified by:
create3DVOI
in interfaceVOIManagerInterfaceListener
-
setCursor
public void setCursor(java.awt.Cursor kCursor)
- Specified by:
setCursor
in interfaceVOIManagerInterfaceListener
- Overrides:
setCursor
in classjava.awt.Window
-
getActiveImage
public ModelImage getActiveImage()
- Specified by:
getActiveImage
in interfaceVOIManagerInterfaceListener
-
setModified
public void setModified()
- Specified by:
setModified
in interfaceVOIManagerInterfaceListener
-
updateData
public void updateData()
- Specified by:
updateData
in interfaceVOIManagerInterfaceListener
-
setActiveImage
public void setActiveImage(ModelImage kImage)
- Specified by:
setActiveImage
in interfaceVOIManagerInterfaceListener
-
getActiveLUT
public ModelLUT getActiveLUT()
- Specified by:
getActiveLUT
in interfaceVOIManagerInterfaceListener
-
getActiveRGB
public ModelRGB getActiveRGB()
- Specified by:
getActiveRGB
in interfaceVOIManagerInterfaceListener
-
getVOIManager
public VOIManagerInterface getVOIManager()
- Specified by:
getVOIManager
in interfaceVOIManagerInterfaceListener
-
setPaintMask
public void setPaintMask(java.util.BitSet mask)
- Specified by:
setPaintMask
in interfaceVOIManagerInterfaceListener
-
paintToShortMask
public void paintToShortMask()
- Specified by:
paintToShortMask
in interfaceVOIManagerInterfaceListener
-
paintToUbyteMask
public void paintToUbyteMask()
- Specified by:
paintToUbyteMask
in interfaceVOIManagerInterfaceListener
-
maskToPaint
public void maskToPaint()
- Specified by:
maskToPaint
in interfaceVOIManagerInterfaceListener
-
setCurrentOrientation
public void setCurrentOrientation(int currentOrientation)
-
getCurrentOrientation
public int getCurrentOrientation()
-
addSphereVOIs
public void addSphereVOIs(VOI annotations)
- Specified by:
addSphereVOIs
in interfaceVOIManagerInterfaceListener
-
-